forked from kdomagal/Web-RTC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate.html
More file actions
57 lines (43 loc) · 1.4 KB
/
create.html
File metadata and controls
57 lines (43 loc) · 1.4 KB
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
56
57
<!DOCTYPE html>
<html>
<title>Video chat (node.js + web-rtc) - new session</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<link href="main.css" rel="stylesheet" type="text/css" />
<script src="/socket.io/socket.io.js"></script>
<script type="text/javascript" src="signaling.js"></script>
<script>
var invitationUrl;
window.onload = function() {
if (! window.webkitPeerConnection) {
window.location = "nosupport.html";
}
invitationUrl = document.getElementById('invitationUrl');
Signaling.onopen = function() {
console.log("create - signaling.onopen");
invitationUrl.hidden = true;
document.getElementById('chat').hidden = false;
self.chat.startChat();
}
Signaling.create(function(url, fifoId) {
console.log("create - signaling.create");
invitationUrl.value = url;
});
}
</script>
<body>
<div id="heading">
<h3>Node.js based video chat</h3>
</div>
<div id="content">
<p>Welcome!</p>
<p>New chat session has been created. To invite to a chat:</p>
<ul>
<li>Copy the link below and pass it to your friend.</li>
<li>Wait to your friend accepts the invitation.</li>
</ul>
<input type="text" id="invitationUrl" readonly size=80></input>
</div>
<iframe id="chat" name="chat" src="chat.html" hidden="true" height="500px"></iframe>
</div>
</body>
</html>