在网站上实施抽搐流
Implement twitch stream on a website
我目前正在为朋友抽搐流制作一个网站,我对如何实现抽搐流感到非常困惑。我已经创建了一个带有"Twitchscreen"类的div,但我不知道如何链接到twitch API或将流放入"twitchscreen"框中。请帮忙,非常感谢。
看看它在TeamLiquid页面(查看来源)中是如何完成的 - 他们像这样使用IFrame:
<iframe class="videoplayer" src="http://www.twitch.tv/embed?channel=khaldor" height="478" width="800" frameborder="0" scrolling="no"></iframe>
所以它可能就是这么简单..
要将其嵌入到页面上,只需将 IFrame 放在您想要的任何位置,然后将频道查询字符串从 khaldor 更改为您在 twitch 上的用户名(适用于您的频道)。
聊天应该以同样的方式完成。