html - 如何控制 youtube 嵌入直播?

标签 html youtube embed live autoplay

我刚刚了解到 YouTube 直播 URL 是随机变化的。我在 stackoverflow 上找到了这个 "YouTube Live Streaming embed code keeps changing" 所以我知道静态嵌入链接是这个 https://www.youtube.com/embed/live_stream?channel=[channel ID]

我想知道的是如何将 autoplay=1 添加到嵌入链接以及任何其他类似的功能。

30/7/2017 更新 - 此方法不适用于在 iPhone 6+ 上测试的 ios V10.3.3 播放器使 safari 和 chrome 崩溃!

最佳答案

其实很简单,只需要在最后加上参数autoplay=1即可:

https://www.youtube.com/embed/live_stream?channel=[ channel ID]&autoplay=1

关于html - 如何控制 youtube 嵌入直播?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41318675/

相关文章:

html - CSS3 : using head tag does not float elements inside

IOS youtube播放器在加载时显示白屏

android - 在Android的“回收器” View 中制作You-tube视频播放器

youtube - 如何在youtube嵌入中隐藏新标题栏?

xhtml - 如何链接没有字幕的 YouTube 视频?

javascript - 如何将函数附加到表单元素

javascript - Typeahead 不会显示字段

ajax - AJAX 是否可以在 AMP 中加载嵌入?

javascript - 垂直到水平导航

youtube - 无法使用 Youtube API 将我的 Youtube 广播转换为直播