-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
30 lines (24 loc) · 824 Bytes
/
index.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
<html>
<head>
<title>h264-live-player web client demo</title>
</head>
<body>
<button type="button" onclick="wsavc.playStream()">Start Video</button>
<button type="button" onclick="wsavc.stopStream()">Stop Video</button>
<button type="button" onclick="wsavc.disconnect()">Disconnect</button>
<br/>
<!-- provide WSAvcPlayer -->
<script type="text/javascript" src="http-live-player.js">;</script>
<script type="text/javascript">
var canvas = document.createElement("canvas");
document.body.appendChild(canvas);
// Create h264 player
var uri = "ws://" + 'zhua.liehuo55.com:8080';
var wsavc = new WSAvcPlayer(canvas, "webgl", 1, 35);
wsavc.connect(uri);
//wsavc.connect("ws://127.0.0.1:10002");
//expose instance for button callbacks
window.wsavc = wsavc;
</script>
</body>
</html>