【问题标题】:Youtube Live Stream embed code shows "Live stream offline"Youtube 直播嵌入代码显示“直播离线”
【发布时间】:2019-01-17 10:30:18
【问题描述】:

如果我在 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>

而且我也无法从功能中启用“获利”,因为它已被禁用并且在我们的国家/地区不可用。

谁能帮我找到解决办法?

【问题讨论】:

    标签: youtube embed youtube-iframe-api


    【解决方案1】:

    这对我有用。与您减去允许自动播放属性相同。

    <iframe width="100%" height="602" src="https://www.youtube.com/embed/live_stream?channel=MyChannelId" frameborder="0" allowfullscreen></iframe>
    

    有短暂的延迟,有时您必须刷新页面。

    【讨论】:

      猜你喜欢
      • 2017-01-05
      • 2017-11-20
      • 2014-08-21
      • 2017-06-17
      • 1970-01-01
      • 2019-02-27
      • 2017-05-10
      • 2020-06-08
      • 2019-05-04
      相关资源
      最近更新 更多