browser-to-browser ; open source code stack
Native JavaScript API
Low latency, modern codecs, encryption, firewalls
Main author: Damon Oehlman
<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>
Download glue.js from rtc-glue: https://raw.github.com/rtc-io/rtc-glue/master/dist/glue.js
No JavaScript coding - fully declarative!
Check out chrome://webrtc-internals
https://github.com/rtc-io/rtcio-demo-peerconnection
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);
});
Uses http://primus.io as websocket server (abstraction layer from real-time node frameworks such as socket.io or engine.io).
https://github.com/rtc-io/rtcio-demo-signaller
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);
https://github.com/rtc-io/rtcio-demo-quickconnect
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());
});
https://github.com/rtc-io/rtcio-demo-mesh
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);
WebRTC spec: http://www.w3.org/TR/webrtc/
Email: silvia.pfeiffer@nicta.com.au
Email: damon.oehlman@nicta.com.au
Slides: http://html5videoguide.net/presentations/lca_2014_webrtc/
---
Project: https://rtc.io/
GitHub: https://github.com/rtc-io
/