我想将多个来自抽搐的流嵌入到我的网站中,并根据状态(在线,离线)对其进行排序。
<script src= "https://player.twitch.tv/js/embed/v1.js"></script>
<div id="SamplePlayerDivID"></div>
<script type="text/javascript">
var options = {
width: 854,
height: 480,
autoplay:true,
channel: "channelTest1",
};
var options2 = {
width: 854,
height: 480,
autoplay:true,
channel: "channelTest2",
};
var player = new Twitch.Player("SamplePlayerDivID", options);
var player2 = new Twitch.Player("SamplePlayerDivID2", options2);
player.setVolume(0.5);
</script>
这是正确的方法,并且有可能这样解决吗?