如何添加Twitch API嵌入通道链接

时间:2018-03-22 01:40:18

标签: javascript html twitch

如何将Twitch Api流媒体视频嵌入链接添加到此代码?

var result=" <div class='row' id='"+status+"'> <div class='col-md-3 col-xs-4'> <span class='logo'><img class='img img-circle' src='"+logo+"'></span> <a href='"+channel_link+"'> <span class='name text-center'>"+name+"</span> </a> </div> <div class='col-md-9 col-xs-8 text-center' id='statusdescription'> <span class='game'>"+game+"</span> <span class='status'>"+statusdesc+"</span> </div> </div>";

点击徽标图片,在我的网站上查看iframe中的Twitch直播视频。

嵌入频道:

<iframe src="https://player.twitch.tv/?channel=ogamingsc2" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe><a href="https://www.twitch.tv/ogamingsc2?tt_content=text_link&tt_medium=live_embed" style="padding:2px 0px 4px; display:block; width:345px; font-weight:normal; font-size:10px; text-decoration:underline;">Watch live video from OgamingSC2 on www.twitch.tv</a>

感谢您的帮助。谢谢。

0 个答案:

没有答案