【问题标题】:Embedding a YouTube livestream using the channel ID使用频道 ID 嵌入 YouTube 直播
【发布时间】:2019-05-04 20:39:56
【问题描述】:

我正在使用带有 C# 的 asp.net,我需要一个页面来显示来自我的 youtube 频道的实时流。

我想使用频道 ID 永久嵌入 youtube 直播。我正在关注本教程https://webcam.io/blog/howto-embed-youtube-live.html,但不幸的是它没有用。

<div style="position:relative;height:0;padding-bottom:56.25%"><iframe src="https://www.youtube.com/embed/AYR_9fRDa8s?ecver=2" style="position:absolute;width:100%;height:100%;left:0" width="640" height="360" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>

当我从 YouTube 复制嵌入代码时,它给了我这个,当创建新的直播时,它会改变。

如果您知道如何将其与频道 ID 关联,请帮助我。

谢谢

【问题讨论】:

    标签: c# asp.net youtube live-streaming


    【解决方案1】:

    这个公式对我有用:

    <iframe type="text/html" width="854" height="480" src="https://www.youtube.com/embed/live_stream?channel=[CHANNEL_ID]&autoplay=1"></iframe>
    

    【讨论】:

      猜你喜欢
      • 2023-02-12
      • 2019-12-20
      • 2018-07-01
      • 2017-01-11
      • 2022-06-30
      • 2016-04-26
      • 1970-01-01
      • 2018-03-28
      • 2018-03-12
      相关资源
      最近更新 更多