0
当我这样做时,我并不是最好的编码器,所以我寻求帮助,我尝试过搜索并找不到解决方案,如果这真的是基本的或根本不可能的。用户输入来改变显示什么抽搐频道?
我有一个简单的页面,用一个预定义的通道加载抽搐,只有手动输入通道名称到该代码才能更改该通道。频道名称被定义在“channelnamegoeshere”的位置 - 如果我将其更改为channel123,则会加载该频道的twitch流。现在
<!DOCTYPE html>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Twitch Cinema</title>
</head>
<body style="background-color: black">
<script src= "http://player.twitch.tv/js/embed/v1.js"></script>
<div align="center" id="{PLAYER_DIV_ID}"></div>
<script type="text/javascript">
var options = {
width: 1600,
height: 900,
channel: "{channelnamegoeshere}",
//video: "{VIDEO_ID}"
};
var player = new Twitch.Player("{PLAYER_DIV_ID}", options);
player.setVolume(0.5);
</script><!-- <div align="center">
<iframe frameborder="0"
scrolling="no"
id="chat_embed"
src="http://www.twitch.tv/esgtour/chat"
height="350"
width="1600">
</iframe>
</div>--></body>
</html>
,我愿与帮助,是它是否可能有它,这样在页面加载时会提示用户输入其所在频道名称输入后,进入加载该频道。
在此先感谢。