URL syntax for Youtube video in fullscreen and start at time index

半世苍凉 提交于 2021-01-21 22:51:45

问题


I am able to modify a standard youtube link:

https://www.youtube.com/watch?v=R0tHEJl_Y8E

to play in fullscreen mode:

https://www.youtube.com/v/R0tHEJl_Y8E

I would like to augment the fullscreen URL so that it starts at time index. I looked at other examples and unsuccessfully tried:

https://www.youtube.com/v/R0tHEJl_Y8E&/#t=68s

Suggestions are appreciated: thank you


回答1:


According to the YouTube API Player Parameters page, the /v/ style URL was used for the embedded AS3 player and is deprecated. Instead, use https://www.youtube.com/embed/VIDEO_ID, with the start parameter, e.g.:

https://www.youtube.com/embed/R0tHEJl_Y8E?start=68

Also, just to clarify, this URL will take up the full browser window, not the full screen.


A better solution using iframe here with jQuery or simplest here:

If you add '?rel=0&autoplay=1' to the end of the url in the embed code (like this)

<iframe id="video" 
 src="//www.youtube.com/embed/5iiPC-VGFLU?rel=0&autoplay=1"
 frameborder="0"
 allowfullscreen></iframe>

of the video it should play on load. Here's a demo over at jsfiddle.




回答2:


you can the url for fullscreen

https://www.youtube.com/embed/R0tHEJl_Y8E?start=68&fs=1

'fs=1' ==> for full screen button to show
'start=68' ==> 68 is in seconds
'https://www.youtube.com/embed/'--> this will enables the fullscreen mode



回答3:


If you right click on you chose video, it will show an option saying "Copy URL at current time". This copies a URL that starts at your selected period.



来源:https://stackoverflow.com/questions/37402749/url-syntax-for-youtube-video-in-fullscreen-and-start-at-time-index

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!