forked from PatrickRorth/Twitch.TV
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstream.html
55 lines (38 loc) · 1.3 KB
/
stream.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<link href="content/style/style.css" media="screen" rel="stylesheet" type="text/css">
<script src="content/script/webOSjs-0.1.0/webOS.js" charset="utf-8"></script>
<script src="content/script/twitch.js" charset="utf-8"></script>
<script src="content/script/jquery-2.2.4.min.js"></script>
<script src= "https://player.twitch.tv/js/embed/v1.js"></script>
<script>
$(document).ready(function () {
var nameHash = location.hash;
nameHash = nameHash.replace(/\#/g,"");
var options = {
autoplay: true,
width: $(document).width(),
height: $(document).height(),
channel: nameHash,
};
var player = new Twitch.Player("{PLAYER_DIV_ID}", options);
player.setVolume(1);
player.setQuality("chunked");
//var chat = "<iframe frameborder='0' scrolling='no' id='chat_embed' src='http://www.twitch.tv/" + nameHash + "/chat' height='" + $(document).height() + "' width='200'></iframe>"
//chat.append(".left_panel_chat");
})();
</script>
</head>
<body>
<div class="left_panel_stream">
<div class="back">
<a href="#" onClick="history.back();">
<img src="content/image/back.png"/>
</a>
</div>
<div id="{PLAYER_DIV_ID}"></div>
</div>
<!-- <div class="left_panel_chat"></div> -->
</body>
</html>