-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
388 lines (329 loc) · 14.9 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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=1024, user-scalable=no">
<meta name="rtc-signalhost" content="http://rtc.io/switchboard/">
<meta name="rtc-room" content="lca2014">
<title>LCA 2014: A node.js toolbox for WebRTC</title>
<!-- Required stylesheet -->
<link rel="stylesheet" media="screen" href="core/deck.core.css">
<!-- Extension CSS files go here. Remove or add as needed. -->
<link rel="stylesheet" media="screen" href="extensions/navigation/deck.navigation.css">
<link rel="stylesheet" media="screen" href="extensions/status/deck.status.css">
<link rel="stylesheet" media="screen" href="extensions/hash/deck.hash.css">
<link rel="stylesheet" media="screen" href="extensions/scale/deck.scale.css">
<!-- Style theme. More available in /themes/style/ or create your own. -->
<link rel="stylesheet" media="screen" href="themes/style/neon.css">
<!-- Transition theme. More available in /themes/transition/ or create your own. -->
<link rel="stylesheet" media="screen" href="themes/transition/vertical-slide.css">
<!-- Basic black and white print styles -->
<link rel="stylesheet" media="print" href="core/print.css">
<!-- Required Modernizr file -->
<script src="modernizr.custom.js"></script>
</head>
<body>
<div class="deck-container">
<video id="localV" rtc-capture="camera" muted style="width:112px; height:84px; position:absolute; bottom:5px; right:0; z-index:200; border: 3px solid #f0a;">
</video>
<video id="peerV" rtc-peer rtc-stream="localV" style="width:280px; height:210px; position:absolute; top:0; right:0; z-index:100; border: 3px solid #f0a;"></video>
<!-- Begin slides. Just make elements with a class of slide. -->
<section class="slide" id="title-slide">
<h1>rtc.io: A node.js toolbox for WebRTC</h1>
<h2>Silvia Pfeiffer, NICTA</h2>
</section>
<section class="slide" id="overview-slide">
<h2>WebRTC<br/> Real-Time Communication</h2>
<ol>
<li>
<h3>P2P Video / Audio / Data</h3>
<p>browser-to-browser ; open source code stack</p>
</li>
<li>
<h3>Plugin-free in browser</h3>
<p>Native JavaScript API</p>
</li>
<li>
<h3>Higher quality of service</h3>
<p>Low latency, modern codecs, encryption, firewalls</p>
</li>
</ol>
</section>
<section class="slide" id="overview-graph">
<h2>WebRTC Overview</h2>
<img src="images/webrtc_topology.png" alt="webrtc graph with web server, signalling server and two peers" width="80%">
<ul>
<li>Web Server = Apache on localhost</li>
<li>Signaling Server = rtc.io/switchboard/</li>
</ul>
</section>
<section class="slide" id="rtcio-intro">
<h2>NICTA project: <a href="http://rtc-io">http://rtc.io</a></h2>
<div style="width:50%; float:left;">
<img src="images/rtcio_logo.png" alt="rtcio mascot">
<p>Main author: Damon Oehlman</p>
</div>
<div style="width:50%; float:right;">
<br/>
<ul>
<li class="slide">Meet Artsio</li>
<li class="slide">Artsio simplifies coding on client</li>
<li class="slide">Artsio provides node.js modules</li>
<li class="slide">including a signaling server</li>
</ul>
</div>
</section>
<section class="slide" id="title-glue">
<h1>1. Fully declarative<br/> video connection</h1>
</section>
<section class="slide" id="glue-intro">
<h2><img src="images/artsio.png" alt="artsio" style="float:left; margin-bottom:0"> My simplest HTML page</h2>
<pre><code>
<meta name="rtc-signalhost" content="http://rtc.io/switchboard/">
<video id="local" rtc-capture="camera" muted></video>
<video rtc-peer rtc-stream="local"></video>
<script src="glue.js"></script></code></pre>
<p>Download glue.js from rtc-glue: <a href="https://raw.github.com/rtc-io/rtc-glue/master/dist/glue.js">https://raw.github.com/rtc-io/rtc-glue/master/dist/glue.js</a></p>
<p>No JavaScript coding - fully declarative!</p>
<p>Check out chrome://webrtc-internals</p>
</section>
<section class="slide" id="glue-demoapp">
<h2>Demo app for rtc-glue</h2>
<p><a href="https://github.com/rtc-io/rtcio-demo-peerconnection">https://github.com/rtc-io/rtcio-demo-peerconnection</a></p>
<ul>
<li>uses <a href="http://nodejs.org/">node.js</a> with <a href="http://expressjs.com/">express</a> as Web server</li>
<li>uses <a href="https://github.com/rtc-io/rtc-glue">rtc-glue</a> client-side</li>
<li>uses <a href="https://github.com/rtc-io/rtc-switchboard">rtc-switchboard</a> as Signaling server</li>
</ul>
</section>
<section class="slide" id="glue-screenshot">
<img src="images/glue-screenshot.png" alt="screenshot of rtcio-demo-peerconnection" style="padding-top: 50px;"/>
</section>
<section class="slide" id="title-switchboard">
<h1>2. Running a<br/>Signalling Server</h1>
</section>
<section class="slide" id="signaling-server">
<h2><img src="images/artsio.png" alt="artsio" style="float:left; margin-bottom:0"> <a href="https://github.com/rtc-io/rtc-switchboard">rtc-switchboard</a> is my<br/> node.js signalling server</h2>
<pre><code>var server = require('http').createServer();
var switchboard = require('rtc-switchboard')(server);
var port = 50000;
// start the server
server.listen(port, function(err) {
if (err) {
return console.log('Error starting server: ', err);
}
console.log('server running on port: ' + port);
});</code></pre>
<p>Uses http://primus.io as websocket server (abstraction layer from real-time node frameworks such as socket.io or engine.io).</p>
</section>
<section class="slide" id="switchboard-demoapp">
<h2>Demo application for<br/> rtc-switchboard</h2>
<p><a href="https://github.com/rtc-io/rtcio-demo-signaller">https://github.com/rtc-io/rtcio-demo-signaller</a></p>
<ul>
<li>uses <a href="http://nodejs.org/">node.js</a> with <a href="http://expressjs.com/">express</a> as Web server</li>
<li>uses <a href="https://github.com/rtc-io/rtc-signaller">rtc-signaller</a> for client side signalling</li>
<li>uses <a href="https://github.com/rtc-io/rtc-switchboard">rtc-switchboard</a> for server side signalling</li>
</ul>
</section>
<section class="slide" id="switchboard-screenshot">
<img src="images/switchboard-screenshot.png" alt="screenshot of rtcio-demo-signaller" style="padding-top: 50px;"/>
</section>
<section class="slide" id="title-quickconnect">
<h1>3. Node.js based<br/>Peer Connection</h1>
</section>
<section class="slide" id="quickconnect">
<h2><img src="images/artsio.png" alt="artsio" style="float:left; margin-bottom:0"> More control<br/> client-side (JS only)</h2>
<ul>
<li><a href="https://github.com/rtc-io/rtc-media">rtc-media</a> for camera/mike access</li>
<li><a href="https://github.com/rtc-io/rtc-quickconnect">rtc-quickconnect</a> for peer connection</li>
<li>built for <a href="http://nodejs.org/">node.js</a></li>
</ul>
</section>
<section class="slide" id="quickconnect-demo">
<h2>rtc-media and rtc-quickconnect demo</h2>
<pre><code>var quickconnect = require('rtc-quickconnect');
var media = require('rtc-media');
var local = createElement('div', { class: 'local' });
var remote = createElement('div', { class: 'remote' });
var localMedia = media();
localMedia.render(local);
function handleConnect(conn, id, data, monitor) {
conn.addStream(localMedia.stream);
conn.addEventListener('addstream', function(evt) {
media(evt.stream).render(remote);
});
}
quickconnect({ data: true, ns: 'conftest', signalhost: 'http://rtc.io/switchboard/' })
.on('peer', handleConnect)
.on('leave', handleLeave);</code></pre>
</section>
<section class="slide" id="quickconnect-demoapp">
<h2>Demo application for<br/> rtc-quickconnect</h2>
<p><a href="https://github.com/rtc-io/rtcio-demo-quickconnect">https://github.com/rtc-io/rtcio-demo-quickconnect</a></p>
<ul>
<li>uses <a href="http://nodejs.org/">node.js</a> with <a href="http://expressjs.com/">express</a> as Web server</li>
<li>uses <a href="https://github.com/rtc-io/rtc-media">rtc-media</a> for camera/mike access</li>
<li><a href="https://github.com/rtc-io/rtc-quickconnect">rtc-quickconnect</a> for peer connection</li>
<li>uses <a href="https://github.com/rtc-io/rtc-switchboard">rtc-switchboard</a> for server side signalling</li>
</ul>
</section>
<section class="slide" id="quickconnect-screenshot">
<img src="images/quickconnect-screenshot.png" alt="screenshot of rtcio-demo-quickconnect" style="padding-top: 50px;"/>
</section>
<section class="slide" id="title-mesh">
<h1>4. Node.js based<br/> P2P data exchange</h1>
</section>
<section class="slide" id="mesh">
<h2><img src="images/artsio.png" alt="artsio" style="float:left; margin-bottom:0"> When I only need<br/> a data channel</h2>
<ul>
<li><a href="https://github.com/rtc-io/rtc-mesh">rtc-mesh</a> for peer connection</li>
<li>built for <a href="http://nodejs.org/">node.js</a></li>
</ul>
</section>
<section class="slide" id="mesh-demo">
<h2>rtc-mesh demo</h2>
<pre><code>var mesh = require('rtc-mesh');
mesh.use('http://rtc.io/switchboard/');
mesh.join('meshdemo-simple', function(err, m) {
if (err) {
return console.error('could not connect: ', err);
}
m.on('data:update', function(key, value) {
console.log('key: ' + key + ', set to: ', value);
});
// update the last join time for the shared data
m.data.set('lastjoin', Date.now());
});</code></pre>
</section>
<section class="slide" id="mesh-demoapp">
<h2>Demo app for rtc-mesh</h2>
<p><a href="https://github.com/rtc-io/rtcio-demo-mesh">https://github.com/rtc-io/rtcio-demo-mesh</a></p>
<ul>
<li>uses <a href="http://nodejs.org/">node.js</a> with <a href="http://expressjs.com/">express</a> as Web server</li>
<li>uses <a href="https://github.com/rtc-io/rtc-mesh">rtc-mesh</a> for peer connection</li>
<li>uses <a href="https://github.com/rtc-io/rtc-switchboard">rtc-switchboard</a> for server side signalling</li>
</ul>
</section>
<section class="slide" id="mesh-screenshot">
<img src="images/mesh-screenshot.png" alt="screenshot of rtcio-demo-mesh" style="padding-top: 50px;"/>
</section>
<section class="slide" id="title-firewalls">
<h1>5. Dealing with Firewalls</h1>
</section>
<section class="slide" id="STUN-graph">
<h2>STUN server:<br/> resolve IP address</h2>
<img src="images/stun_topology.png" alt="screenshot of rtc connection using STUN" style="float:left;"/>
</section>
<section class="slide" id="TURN-graph">
<h2>TURN server:<br/> stream forwarding</h2>
<img src="images/turn_topology.png" alt="screenshot of rtc connection using TURN" style="float:left;"/>
</section>
<section class="slide" id="firewall-sw">
<h2>Software to run<br/> STUN/TURN servers</h2>
<ul>
<li><a href="https://code.google.com/p/rfc5766-turn-server/">rfc5766-turn-server</a></li>
<li><a href="http://www.creytiv.com/restund.html">restund</a></li>
</ul>
</section>
<section class="slide" id="firewall-demo">
<h2>Including STUN/TURN info<br/> into the peer connection</h2>
<pre><code>
var pc_config = {
"iceServers":[
{'url': 'stun:stun.l.google.com:19302'},
{'url': 'turn:192.158.29.39:3478?transport=udp',
'credential': 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
'username': '28224511:1379330808'
},
{'url': 'turn:192.158.29.39:3478?transport=tcp',
'credential': 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
'username': '28224511:1379330808'
}
]};
pc = new RTCPeerConnection(pc_config);
</code></pre>
</section>
<section class="slide" id="contacts">
<h2>Contact</h2>
<div style="width:50%; float:left;">
<img src="images/rtcio_logo.png" alt="rtcio mascot">
<p>WebRTC spec: <a href="http://www.w3.org/TR/webrtc/">http://www.w3.org/TR/webrtc/</a></p>
</div>
<div style="width:50%; float:right;">
<p> </p>
<p>Email: [email protected]</p>
<p>Email: [email protected]</p>
<p>Slides: <a href="http://html5videoguide.net/presentations/lca_2014_webrtc/">http://html5videoguide.net/presentations/lca_2014_webrtc/</a></p>
<p>---</p>
<p>Project: <a href="https://rtc.io/">https://rtc.io/</a></p>
<p>GitHub: <a href="https://github.com/rtc-io">https://github.com/rtc-io</a></p>
</section>
<section class="slide" id="final">
<h2>Slides created with <a href="http://imakewebthings.com/deck.js/">deck.js</a></h2>
<h2>Source code in <a href="https://github.com/silviapfeiffer/lca_2014_webrtc">GitHub repository</a></h2>
</section>
<!-- End slides. -->
<!-- Begin extension snippets. Add or remove as needed. -->
<!-- deck.status snippet -->
<p class="deck-status">
<span class="deck-status-current"></span>
/
<span class="deck-status-total"></span>
</p>
<!-- End extension snippets. -->
</div>
<!-- Required JS files. -->
<script src="jquery.min.js"></script>
<script src="core/deck.core.js"></script>
<!-- Extension JS files. Add or remove as needed. -->
<script src="core/deck.core.js"></script>
<script src="extensions/hash/deck.hash.js"></script>
<script src="extensions/status/deck.status.js"></script>
<script src="extensions/navigation/deck.navigation.js"></script>
<script src="extensions/scale/deck.scale.js"></script>
<!-- rtc.io -->
<script src="glue.js"></script>
<script>
// provide ice servers config
// you can make config changes here because glue will not initialise until
// the window is loaded
glue.config.iceServers = [
{ url: 'stun:stun.l.google.com:19302' },
{
url: 'turn:192.158.29.39:3478?transport=udp',
credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
username: '28224511:1379330808'
},
{
url: 'turn:192.158.29.39:3478?transport=tcp',
credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
username: '28224511:1379330808'
}
];
// listen for connected events
glue.events.once('connected', function(signaller) {
// if we have something in the query string of the location, then
// communicate slide changes
if (location.search.slice(1) !== '') {
// handle deck changes
$(document).bind('deck.change', function(evt, from, to) {
// send the slide update message via the signaller
signaller.send('/slide', {
idx: to,
sender: signaller.id
});
});
}
signaller.on('slide', function(data) {
console.log('received notification to change to slide: ', data.idx);
$.deck('go', data.idx);
});
});
// initialise the deck
$(function() {
$.deck('.slide');
});
</script>
</body>
</html>