-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
54 lines (51 loc) · 1.71 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Test Application webrtc</title>
<!-- Include chrome frame to allow IE to play -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
<!-- config.js has a single object defined: "localsettings". Used to define the websocket url -->
<script type="text/javascript" src="config.js"></script>
<!-- Main webcam script -->
<script type="text/javascript" src="webcam.js"></script>
</head>
<body>
Room:<input id="channel" value="default" />
<div>
Local:
<span id="streams"></span>
</div>
<button id="start">start</button>
<button id="video">Add Video</button>
<button id="call">call</button>
<button id="listen">listen</button>
<button id="end">end</button>
<script>
var test = new htmlphone({name: "local", channel: document.getElementById("channel").value, videosize:200, videocontainer: document.getElementById("streams"), socketserver:localsettings.socketserver});
document.getElementById("start").onclick = function() {
test.loadStream();
test.connect();
}
document.getElementById("video").onclick = function() {
test.startVideo();
}
document.getElementById("listen").onclick = function() {
test.connect();
}
document.getElementById("call").onclick = function() {
test.startBroadcast();
}
document.getElementById("end").onclick = function() {
test.end();
}
</script>
<script>
// You may want to place these lines inside an onload handler
CFInstall.check({
mode: "overlay",
destination: localsettings.chromeframeReturnURL
});
</script>
</body>
</html>