我在youtube中有一个 channel ,如果我在youtube中有直播,我想在我的网站上显示直播视频。
我已按照https://www.youtube.com/features的指示进行操作,并启用了“实时流”和“嵌入实时流”选项,但是每次我进行实时流时,YouTube都会在播放器上向我显示“离线实时流”。
我已经将iframe这样嵌入到我的网站中
<iframe width="650" height="400" src="https://www.youtube.com/embed/live_stream?channel=myChannelId" allow="autoplay" frameborder="0" allowfullscreen></iframe>
我也尝试过设置这个游戏网址
<iframe width="650" height="400" src="https://gaming.youtube.com/embed/live_stream?channel=myChannelId" allow="autoplay" frameborder="0" allowfullscreen></iframe>
而且我也无法从功能中启用“获利”,因为它已被禁用并且在我国不可用。
有人可以帮我找到解决方案吗?
最佳答案
这对我有用。与您减去允许自动播放属性相同。
<iframe width="100%" height="602" src="https://www.youtube.com/embed/live_stream?channel=MyChannelId" frameborder="0" allowfullscreen></iframe>
短暂的延迟,有时您必须刷新页面。
关于youtube - YouTube直播流嵌入代码显示 “Live stream offline”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51775806/