YouTube Live Streaming嵌入代码不断变化 [英] YouTube Live Streaming embed code keeps changing

查看:135
本文介绍了YouTube Live Streaming嵌入代码不断变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用YouTube进行实时流式传输,可以通过将代码嵌入到我的网站中来在自己的网站上观看

I do live streaming with YouTube and I can watch it on my site by coping the embed code into my site

下面看起来像这样

<iframe width="640" height="360" src="https://www.youtube.com/embed/gz54fede3Y" frameborder="0" allowfullscreen></iframe>

但是最近我发现,每次进行实时流传输时,我每次都必须开始使用将通过实时频道生成的代码来更新网站上的嵌入代码.

But recently I discovered that every time I do a live stream, I have to start updating the embeded code on my site each time with the one that will be generated from my live channel.

这是因为它不断重新生成不同的代码.这样做非常令人沮丧,是否有一种方法可以获取不会改变的特定嵌入代码,所以我不必担心这一点,或者是否有我不知道的设置.

This is because it keeps regenerating a different code. Its so frustrating to do this, is there a way to get a particular embed code that will not change so I don't have to worry about this, or is there a setting that I am not aware of.

推荐答案

有一个静态URL可以为立即流"流嵌入视频播放器.它目前尚未在用户界面中的任何位置公开,但我们会尽快修复(希望如此).

There is a static URL to embed the video player for the "Stream now" stream. It is currently not exposed anywhere in the UI, but we will fix that soon (hopefully.)

它看起来像这样:https://www.youtube.com/embed/live_stream?channel=[channel ID]

您还可以使用YouTube游戏链接,如下所示:https://gaming.youtube.com/embed/live_stream?channel=[channel ID]

You can also use a YouTube Gaming link, like so: https://gaming.youtube.com/embed/live_stream?channel=[channel ID]

您可以通过转到 https://www.youtube.com/account_advanced 并在之后复制字符串来确定您的频道ID "YouTube频道ID".

You can determine your channel ID by going to https://www.youtube.com/account_advanced and copying the string after "YouTube Channel ID".

获得此链接后,就可以在嵌入代码的"src"属性中使用它.

Once you've got this link, you can use it in the "src" attribute of your embed code.

这篇关于YouTube Live Streaming嵌入代码不断变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆