【问题标题】:URL syntax for Youtube video in fullscreen and start at time index全屏 Youtube 视频的 URL 语法并从时间索引开始
【发布时间】:2016-09-21 00:40:28
【问题描述】:

我可以修改标准的 youtube 链接:

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

以全屏模式播放:

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

我想扩充全屏 URL,使其从时间索引开始。我查看了其他examples 并没有成功尝试:

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

感谢您的建议:谢谢

【问题讨论】:

标签: youtube fullscreen


【解决方案1】:

根据 YouTube API Player Parameters 页面,/v/ 样式 URL 用于嵌入式 AS3 播放器并且已被弃用。相反,请使用 https://www.youtube.com/embed/VIDEO_IDstart 参数,例如:

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

另外,澄清一下,这个 URL 将占据整个浏览器窗口,而不是整个屏幕


使用iframe here with jQuerysimplest here 的更好解决方案:

如果您在嵌入代码中的 url 末尾添加 '?rel=0&autoplay=1'(像这样)

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

它应该在加载时播放的视频。这是jsfiddle 的演示。

【讨论】:

  • 只要 URL 是 youtube.com 就可以很好地工作,但是当 YouTube 提供像 youtu.be/VIDEO_ID 这样的重定向链接时,如果插入 /embed,重定向会失败。但是,如果您使用与重定向链接一起提供的相同 Video_Id 并将其附加到 youtube.com/embed/Video_Id 视频会根据需要全屏播放。但是,将域从 youtu.be 更改为 youtube 是否有效……还是将来会中断?
  • 有没有办法通过直播链接做到这一点?
【解决方案2】:

你可以全屏的网址

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】:

如果您右键单击您选择的视频,它将显示“在当前时间复制 URL”选项。这会复制一个从您选择的时间段开始的 URL。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-08-15
    • 2021-09-17
    • 2013-02-15
    • 2020-04-11
    • 1970-01-01
    • 1970-01-01
    • 2018-02-15
    相关资源
    最近更新 更多