what is

WebRTC

?

peer-to-peer

peer-to-peer

audio

peer-to-peer

video

peer-to-peer

data

plugin-free video calls

"WebRTC: Ready to Get Real?"

"How Will WebRTC Affect the Business VoIP Market?"

"Will Mobile Help or Hinder WebRTC?"

"More talk about how #WebRTC can disrupt the existing #Telecom infrastructure with #OTT comms."

how I got into this

A brief

history

of WebRTC

© Sony Pictures

10/2011

first draft of the spec

© Sony Pictures

02/2014

cross-browser
data transfers

© Sony Pictures

07/2014

Hangouts
uses (kind of) WebRTC
on Chrome 36+

© Sony Pictures

audio / video

© Amazon

no infrastructure needed *

signaling

recording

low bandwidth

browser

to

browser

browser

to

phone

require "sinatra"
require "twilio-ruby"

get "/" do
  capability = Twilio::Util::Capability.new ENV["ACCOUNT_SID"], ENV["ACCOUNT_TOKEN"]
  capability.allow_client_outgoing ENV["APP_SID"]
  capability.allow_client_incoming "FEC14"
  token = capability.generate
  erb :index, locals: {token: token}
end

post "/voice" do
  content_type "text/xml"

  "<Response>
    <Dial callerId=\"#{ENV['CALLER_PHONE_NUMBER']}\">
      <Number>#{params[:PhoneNumber]}</Number>
    </Dial>
  </Response>"
end

Twilio.Device.setup("<%= token %>", {debug: true});

function call() {
    var params = {"PhoneNumber": $("#number").val()};
    Twilio.Device.connect(params);
}

function hangup() {
    Twilio.Device.disconnectAll();
}

function anykey() {
    var conn = Twilio.Device.activeConnection();
    if (conn) conn.sendDigits("1");
}

browser

to

phone

phone

to

browser

developers

no infrastructure needed *

users

no third-party app accounts

image processing

motion detection

object tracking

face detection

augmented reality

audio processing

WebAudio API

can use and create

WebRTC media streams

measure volume

change pitch of your voice

mix and broadcast music

high

CPU / energy

usage

offload processing
to a
third-party service

screensharing

Chrome

via per-page extension

Firefox 34+

via flag + domain whitelist

live streaming

games

live streaming

presentations

WebRTC

doesn't scale*

data

low-latency networking

multiplayer games

file sharing

CDN augmentation

how does

WebRTC

work?

SDP Session Description Protocol

ICE Interactive Connectivity Establishment

STUN Session Traversal Utilities for NAT

TURN Traversal Using Relay NAT

RTP Real-time Transport Protocol

SCTP Stream Control Transmission Protocol

// Stir in the WebRTC object
var webrtc = new SimpleWebRTC({
  localVideoEl: 'localVideo',
  remoteVideosEl: 'remotesVideos',
  autoRequestMedia: true
});

// Join when ready
webrtc.on('readyToCall', function () {
  webrtc.joinRoom('your awesome room name');
});

// Send data
webrtc.sendDirectlyToAll('data channel name', 'label', message);

// Receive data
webrtc.on('channelMessage', function (peer, channelName, data) {
  // Handle message
  // data.type    -> label
  // data.payload -> message
});

browser support

1,700,000,000

devices by the end of 2014

© Sony Pictures

thank you!

© Sony Pictures