全屏显示YouTube视频的URL语法,并从时间索引开始 [英] URL syntax for Youtube video in fullscreen and start at time index

查看:78
本文介绍了全屏显示YouTube视频的URL语法,并从时间索引开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够修改标准的youtube链接:

I am able to modify a standard youtube link:

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

以全屏模式播放:

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

我想扩充全屏URL,以便它在时间索引处开始.我看了其他示例并尝试失败:

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

建议表示感谢:谢谢

推荐答案

根据YouTube API 播放器参数页,/v/样式的URL用于嵌入式AS3播放器,已弃用.相反,请使用带有 start 参数的 https://www.youtube.com/embed/VIDEO_ID ,例如:

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

此外,为了澄清起见,此URL将占用完整的浏览器窗口,而不是完整的屏幕.

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

使用 iframe 此处使用jQuery 如果您在嵌入代码的网址末尾添加?rel = 0& autoplay = 1"(这样)

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>

应当在加载的视频中播放

个.这是 jsfiddle 上的演示.

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

这篇关于全屏显示YouTube视频的URL语法,并从时间索引开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆