8. / Who am I?
Got into VoIP years ago
VoIP is difficult
Spent the past year working on a platform called Respoke
Respoke makes WebRTC easier
8
WebRTC & I
22. / What is WebRTC?
22
Defined by W3C & IETF, just like HTTP
23. / What is WebRTC?
“WebRTC (Web Real-Time Communication) is an API definition
drafted by the World Wide Web Consortium (W3C) that supports
browser-to-browser applications for voice calling, video chat, and P2P
file sharing without the need of either internal or external plugins.”
23
According to wikipedia:
55. / Awesome! / Browser APIs
There’s a few to choose from…
55
Adapter.js
56. / Awesome! / Browser APIs
They normalise the browsers
56
57. /
var RTCPeerConnection = null;
var getUserMedia = null;
var attachMediaStream = null;
var reattachMediaStream = null;
var webrtcDetectedBrowser = null;
function trace(text) {
// This function is used for logging.
if (text[text.length - 1] == 'n') {
text = text.substring(0, text.length - 1);
}
console.log((performance.now() / 1000).toFixed(3) + ": " + text);
}
if (navigator.mozGetUserMedia) {
console.log("This appears to be Firefox");
webrtcDetectedBrowser = "firefox";
// The RTCPeerConnection object.
RTCPeerConnection = mozRTCPeerConnection;
// The RTCSessionDescription object.
RTCSessionDescription = mozRTCSessionDescription;
// The RTCIceCandidate object.
RTCIceCandidate = mozRTCIceCandidate;
// Get UserMedia (only difference is the prefix).
// Code from Adam Barth.
getUserMedia = navigator.mozGetUserMedia.bind(navigator);
// Attach a media stream to an element.
attachMediaStream = function(element, stream) {
console.log("Attaching media stream");
element.mozSrcObject = stream;
element.play();
};
reattachMediaStream = function(to, from) {
console.log("Reattaching media stream");
to.mozSrcObject = from.mozSrcObject;
to.play();
};
Awesome! / Browser APIs
Google has one
57
60. / Awesome! / Browser APIs
Used to ask your user
whether the website can
use your media,
among other things
60
getUserMedia
61. / Awesome! / Browser APIs
Handles the
underlying technology
to stream media
between 2 peers
61
RTCPeerConnection
62. / Awesome! / Browser APIs
Transfer arbitrary data
between peers.
This is what’s really exciting
about WebRTC.
It makes WebRTC use
cases expand infinitely
62
RTCDataChannel
66. / Firewalls
A method to go off to a server and get your IP as seen by the world
66
STUN
67. / Firewalls
A server to relay your media through, if a peer to peer connection can’t be established
Generally, you need to run one (or more) of these yourself to get good quality
67
TURN
76. / What can I do with it?
Enable easier remote
working in Contact Centres
76
77. / What can I do with it?
Peer to Peer
data transfers in games
77
78. / What can I do with it?
Sales
78
Look at products in real time
79. / What can I do with it?
And many, many more, you
just need imagination
79
80. / What can I do with it?
None of these ideas are new
But they’re being enabled by the open standard
They’ve also got a higher possibility of success
as it’s now cheaper to run the service
80