forked from muaz-khan/WebRTC-Experiment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
260 lines (219 loc) · 8.08 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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!DOCTYPE html>
<html id="home" lang="en">
<head>
<title>WebRTC over socket.io ® Muaz Khan</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="author" type="text/html" href="https://plus.google.com/100325991024054712503">
<meta name="author" content="Muaz Khan">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<style>
@import url(https://fonts.googleapis.com/css?family=Inconsolata);
html {
background: #eee;
}
*
{
font-family: "Inconsolata", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
}
body {
font-size: 1.2em;
line-height: 1.2em;
margin: 0;
}
article, footer {
display: block;
max-width: 900px;
min-width: 360px;
width: 80%;
}
article {
background: #fff;
border: 1px solid;
border-color: #ddd #aaa #aaa #ddd;
margin: 2.5em auto 0 auto;
padding: 2em;
}
h1 {
margin-top: 0;
}
article p:first-of-type {
margin-top: 1.6em;
}
article p:last-child {
margin-bottom: 0;
}
footer {
margin: 0 auto 2em auto;
text-align: center;
}
footer a {
color: #666;
font-size: inherit;
padding: 1em;
text-decoration: none;
text-shadow: 0 1px 1px #fff;
}
footer a:hover, footer a:focus {
color: #111;
}
h1, h2 {
border-bottom: 1px solid black;
display: inline;
font-weight: normal;
line-height: 36px;
padding: 0 0 3px 0;
}
a {
color: #2844FA;
text-decoration: none;
}
a:hover, a:focus {
color: #1B29A4;
}
a:active {
color: #000;
}
:-moz-any-link:focus {
border: 0;
color: #000;
}
::selection {
background: #ccc;
}
::-moz-selection {
background: #ccc;
}
button, input[type=button] {
-moz-border-radius: 3px;
-moz-transition: none;
-webkit-transition: none;
background: #0370ea;
background: -moz-linear-gradient(top, #008dfd 0, #0370ea 100%);
background: -webkit-linear-gradient(top, #008dfd 0, #0370ea 100%);
border: 1px solid #076bd2;
border-radius: 3px;
color: #fff;
display: inline-block;
font-family: inherit;
font-size: .8em;
line-height: 1.3;
padding: 5px 12px;
text-align: center;
text-shadow: 1px 1px 1px #076bd2;
font-size: 1.5em;
}
button:hover, input[type=button]:hover {
background: rgb(9, 147, 240);
}
button:active, input[type=button]:active {
background: rgb(10, 118, 190);
}
button[disabled], input[type=button][disabled] {
background: none;
border: 1px solid rgb(187, 181, 181);
color: gray;
text-shadow: none;
}
strong {
color: rgb(204, 14, 14);
font-family: inherit;
font-weight: normal;
}
tr, td, th {
vertical-align: top;
padding: .7em 1.4em;
border-top: 1px dotted #BBA9A9;
border-right: 1px dotted #BBA9A9;
}
table {
width: 100%;
}
input {
font-size: 2em;
}
#participants video {
width:22em;
}
</style>
<!-- for HTML5 el styling -->
<script>
document.createElement('article');
document.createElement('footer');
</script>
</head>
<body>
<article>
<a href="https://webrtc-experiment.appspot.com/" style="border-bottom: 1px solid #2844FA; font-size: 1.2em; position: absolute; text-decoration: none;right:0;top:0;">↑ WEBRTC EXPERIMENTS</a>
<h1>Using socket.io for signaling</h1>
<p>
<span>Copyright © 2013</span>
<a href="https://github.com/muaz-khan" target="_blank">Muaz Khan</a><span><</span><a href="http://twitter.com/muazkh" target="_blank">@muazkh</a><span>>.</span>
</p>
<section class="plusone-gplus">
<div class="g-plusone" data-href="https://webrtc-experiment.appspot.com/"></div>
</section>
<table class="visible">
<tr>
<td style="text-align: right;">
<input type="text" id="room-name" placeholder="Room Name">
</td>
<td>
<button id="share-camera">Share Your Camera!</button>
</td>
</tr>
</table>
<table id="rooms-list" class="visible"></table>
<table class="visible">
<tr>
<td style="text-align: center;">
<h2>
<strong>Private conference</strong> ?? <a href="/socket.io/" target="_blank" title="Open this link in new tab. Then your room will be private!"><code>/socket.io/<strong id="unique-token">#123456789</strong></code></a>
</h2>
</td>
</tr>
</table>
<div id="participants"></div>
<script src="https://webrtc-experiment.appspot.com/dependencies/socket.io.js"></script>
<script src="https://webrtc-experiment.appspot.com/RTCPeerConnection-v1.5.js"></script>
<script src="https://webrtc-experiment.appspot.com/socket.io/rtclib.js"> </script>
<script src="https://webrtc-experiment.appspot.com/socket.io/ui.js"></script>
<br />
<br />
<h2 style="float:right;"><a href="https://github.com/muaz-khan/WebRTC-Experiment/tree/master/socket.io" target="_blank">Source Code on Github</a></h2>
<br />
<br />
WebRTC one-to-one video sharing experiment where socket.io is used for signaling.
<br />
<br />
<h2>
Interested to write your own <span style="color:red;">socket.io over node.js</span> application for signaling? <a href="https://github.com/muaz-khan/WebRTC-Experiment/tree/master/socketio-over-nodejs" target="_blank" title="Copy, paste and you're done!">Try this!</a>
</h2>
<br />
<br />
You can use <a href="https://github.com/muaz-khan/WebRTC-Experiment/tree/master/RTCMultiConnection" target="_blank">RTCMultiConnection.js</a> for audio/video/screen conferencing/broadcasting, multi-sessions on the same page, text chat and file sharing!
<br /><br />
<table style="width: 100%;">
<tr>
<td>
<div>
<textarea id="message" style="height: 8em; margin: .2em; width: 98%;" placeholder="Have any message? Suggestions or something went wrong?"></textarea>
</div>
<button id="send-message" style="font-size: 1em;">Send Message</button>
</td>
</tr>
</table>
</article>
<footer>
<p>
<a href="https://webrtc-experiment.appspot.com/" target="_blank">WebRTC Experiments!</a>©
<a href="https://plus.google.com/100325991024054712503" rel="author" target="_blank">Muaz Khan</a>, <span>2013 </span>»
<a href="mailto:muazkh@gmail.com" target="_blank">Email</a>»
<a href="http://twitter.com/muazkh" target="_blank">@muazkh</a>»
<a href="https://github.com/muaz-khan" target="_blank">Github</a>
</p>
</footer>
<script src="https://webrtc-experiment.appspot.com/common.js"> </script>
</body>
</html>