What is WebRTC?hancke.name/webrtc/mozilla-webrtc-munich.pdf · 2015. 1. 9. · WebRTC == Ford Model...

Preview:

Citation preview

What is WebRTC?

Hornsby Cornflower

fippo

„Telephony Engineer“ at &yet

Web Realtime Communications

Voice and Video

Data Channels

Peer to Peer

for the open web platform

we had Voice over IP before...

WebRTC == Ford Model T of VoIP

commoditize

concentrate on UI/UX

WebRTC – the API

GetUserMedia

RTCPeerConnection

GetUserMedia

access to Cam/Mic

RTCPeerConnection

P2P connections

Some differences between Browsers

adapter.js

Try it with no signaling server first

sdp mangling sample

SDP

signaling channel

signaling triangle

Browser – Server - Browser

signaling trapezoid

Browser – Server – Server - Browser

Signaling protocol?

Not mandated by WebRTC

API != signaling protocol

Mute / Unmute a track

JSEP

Very close to PeerConnection API

{type, sdp} JSON objects

SIP

Hello telephony world!

Uses SDP like PeerConnection API

Jingle

Google Talk

uses XML instead of SDP

So you need a mapping...

strophe.jingle

SDP-Jingle-JSON

why should you use Jingle?

Reuse XMPP protocol infrastructure

Presence

Entity Capabilities

forking and multi-device sync

(not yet for Jingle)

Multiuser chat

Protocol infrastructure is important

(and nobody pays you to reinvent it)

Using Jingle

Note: high-level APIs can hide the peerconnection

see also simplewebrtc

Multiuser Videochat

SimpleWebRTC

talky.io

Full Mesh Conferencing

Everyone sends to everyone else

That is just a Jingle session to everyone in a Multi-User chat

(yes, it also works with pubsub)

There are some problems...

Scalability and the upstream

FULL MESS!

(pictures courtesy of Emil Ivov)

a central server to redistribute

(but needs to decrypt)

Firefox does not support the way used

and does not intend to support it

and implementing the Firefox plan will take 18 months

:-(

Deploying WebRTC

Just because it works locally...

you will get „black screens“ reports from users

pc.signalingState, pc.iceConnectionState

Hello NAT

STUN, TURN and ICE to the rescue

STUN

what is my external IP?

Works for ~90% of users

Easy to deploy

Not sufficient on mobile networks

TURN

server-side relay

External relay server

Required for ~8% of users

Introduces latency

Expensive to run

Do not provide open TURN servers

Hand out temporary passwords instead

as described here

90% + 8%... is there something missing?

otalk-server

a ready-made package for prosody