我刚刚了解到YouTube实时流网址是随机变化的。我在stackoverflow "YouTube Live Streaming embed code keeps changing"上找到了这个
所以我知道静态嵌入链接是这个https://www.youtube.com/embed/live_stream?channel=[channel ID]
我想知道的是如何将autoplay=1
添加到嵌入链接和任何其他类似函数。
2017年7月30日更新-此方法不适用于在iPhone 6+上测试的ios V10.3.3上,播放器崩溃的Safari和Chrome!
最佳答案
非常简单,只需在最后添加参数autoplay=1
即可:https://www.youtube.com/embed/live_stream?channel=[channel ID]&autoplay=1