-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
59 lines (48 loc) · 2.06 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
55
56
57
58
59
<!doctype html>
<!--
WebSocket chat client
WebSocket and WebRTC based multi-user chat sample with two-way video
calling, including use of TURN if applicable or necessary.
This file provides the structure of the chat client's web page, including
logging in, text chatting, and making private video calls to other users.
To read about how this sample works: http://bit.ly/webrtc-from-chat
Any copyright is dedicated to the Public Domain.
http: creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<head>
<title>WebSocket Demo with WebRTC Calling</title>
<meta charset="utf-8">
<link href="style.css" rel="stylesheet">
<script type="text/javascript" src="client.js"></script>
<script type="text/javascript" src="adapter.js"></script>
</head>
<body>
<p>This is a simple video call example implemented using WebSockets and WebRTC.
<p>Click a username in the user list to ask them to enter a one-on-one video
call with you.</p>
<p>Enter a username: <input id="name" type="text" maxlength="12" required
autocomplete="username" inputmode="verbatim" placeholder="Username">
<p>Enter a server: <input id="serverUrl" type="text" required
autocomplete="url" inputmode="verbatim" placeholder="Server Url">
<input type="button" name="login" value="Connect" onclick="connect()"></p>
<input type="button" name="invite" value="Start Invite" onclick="invite()"></p>
<input type="button" name="peerConnection" value="Start Peer" onclick="createPeerConnection()"></p>
<div id="container" class="flexChild columnParent">
<div class="flexChild rowParent">
<div class="flexChild" id="userlist-container">
<ul id="userlistbox"></ul>
</div>
</div>
<div class="flexChild" id="camera-container">
<div class="camera-box">
<video id="received_video" autoplay></video>
<video id="local_video" autoplay muted></video>
<button id="hangup-button" onclick="hangUpCall();" disabled>
Hang Up
</button>
</div>
</div>
</div>
</body>
</html>