-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
164 lines (163 loc) · 4.27 KB
/
index.html
File metadata and controls
164 lines (163 loc) · 4.27 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html>
<html lang="en">
<head>
<title>Webrtc Test</title>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
</head>
<body>
<table border="2">
<caption id="header" onload="window.header = this;"></caption>
<tr>
<td>
<div>
<span>Signaling Server addres:</span>
<input
type="text"
id="serverAddress"
value="localhost"
onload="window.serverAddress = this;"
/>
<input
type="text"
id="serverPort"
value="9000"
onload="window.serverPort = this;"
/>
<input
type="text"
id="serverKey"
value="peerjs"
onload="window.serverKey = this;"
/>
</div>
<div>
<span>STUN Server addres:</span>
<input
type="text"
id="stunServerAddress"
value=""
onload="window.stunServerAddress = this;"
/>
</div>
<div>
<span>TURN Server addres:</span>
<input
type="text"
id="turnServerAddress"
value=""
onload="window.turnServerAddress = this;"
/>
</div>
</td>
<td>
<span>Username:</span>
<input
type="text"
id="username"
value="user1"
onload="window.username = this;"
/>
</td>
<td>
<span>Target username:</span>
<input
type="text"
id="remoteUsername"
value="user2"
onload="window.remoteUsername = this;"
/>
</td>
<td>Devices</td>
</tr>
<tr>
<td>
<textarea
name="receiveText"
id="receiveText"
cols="50"
rows="10"
style="width: 100%; resize: vertical;"
disabled
></textarea>
<textarea
name="sendText"
id="sendText"
cols="50"
rows="10"
style="width: 100%; resize: vertical;"
></textarea>
<button id="sendBtn" onclick="send();">Send</button>
</td>
<td>
<video
id="selfVideo"
autoplay
playsinline
muted
onload="window.selfVideo = this;"
></video>
</td>
<td>
<video
id="remoteVideo"
autoplay
playsinline
onload="window.remoteVideo = this;"
></video>
</td>
<td rowspan="2">
<div>
<div>
Video:<input
id="videoCheck"
type="checkbox"
onload="window.videoCheck = this;"
checked
/>
</div>
<select
id="videoDevices"
size="5"
onload="window.videoDevices = this;"
onchange="startSelf();"
></select>
</div>
<div>
<div>
Audio:<input
id="audioCheck"
type="checkbox"
onload="window.audioCheck = this;"
/>
</div>
<select
id="audioDevices"
size="5"
onload="window.audioDevices = this;"
onchange="startSelf();"
></select>
</div>
</td>
</tr>
<tr>
<td colspan="3">
<div
style="width: 100%; display: flex; justify-content: space-evenly;"
>
<button id="connect" onclick="connect();">Connect to server</button>
<button id="call" onclick="call();">Call</button>
<button id="hangup" onclick="hangup();">Hang up</button>
</div>
</td>
</tr>
</table>
<!-- <script src="https://webrtc.github.io/adapter/adapter-latest.js"></script> -->
<script src="peerjs.js"></script>
<script src="setup.js"></script>
<script src="rtc.js"></script>
</body>
</html>