SlideShare ist ein Scribd-Unternehmen logo
1 von 86
Downloaden Sie, um offline zu lesen
WebRTC 
A front-end perspective 
Opera Software 
Fronteers 
2014 
@shwetank
About me 
Shwetank Dixit 
Opera Software 
Fronteers 
2014 
@shwetank 
Developer Relations, Opera Software
http://www.thehindu.com/news/national/other-states/using-pcos-in-mumbai-show-id-proof/article4241422.ece
Source: https://www.flickr.com/photos/rambow/858719954
Source: https://www.flickr.com/photos/rambow/858717314 Source: https://www.flickr.com/photos/rambow/858719954
What is 
WebRTC? 
Real Time 
Peer-to-Peer 
Communication
but … 
So far I’ve seen very 
few web people 
talking about it
Whats the biggest barrier to WebRTC adoption?* 
Lack of Awareness 
Not supported by MS 
Not supported by Apple 
Other 
0% 5.5% 11% 16.5% 22% 
* WebRTC World Outlook Survey 2014
WebRTC is for 
but … Web Developers
Mediastream
Mediastream 
RTCPeerConnection
Mediastream 
RTCPeerConnection 
RTCDataChannel
mediaStream 
+ 
` ` 
Device Camera Microphone
getUserMedia 
+ 
` ` 
Device Camera Microphone
Sqwiggle
gUM + CSS(Filters, Masks, Blend Modes) 
Create interesting visual effects from 
camera output in real-time using CSS
gUM + Web Audio 
Sound powered actions 
and navigation
World’s first webcam 
http://en.wikipedia.org/wiki/Trojan_Room_coffee_pot
What can you achieve with gUM? 
- Motion Detection (Baby Monitors, Security Cam) 
- Hotspots 
- Gesture Recognition 
- Emotion Recognition 
- Sound Detection and Visualisation 
- Voice / Sound Activated Controls 
- Capture video (Kind of) (whammy.js, gifshot)
gUM: Current way to do it 
navigator.getUserMedia* 
*with prefixes
gUM: Broken Error Handling 
Exceptions are not caught by the current API. 
Promises can fix this. 
Based on: http://lists.w3.org/Archives/Public/public-media-capture/2014Sep/0171.html
gUM: Current Way 
var failure = function(reason){ 
log("Failed to show camera: " + reason.message); 
} 
! 
navigator.getUserMedia(constraints, function(stream) { 
try { 
$video.src = window.URL.createObjectURL(stream); 
$video.play(); 
} catch(e) { failure(e); } //failure must tolerate non-MediaStreamError 
}, failure); 
Based on: http://lists.w3.org/Archives/Public/public-media-capture/2014Sep/0171.html
gUM: In the future ? 
navigator.mediaDevices.getUserMedia
gUM: In the future ? Promises Proposal 
navigator.mediaDevices.getUserMedia(constraints) 
.then( function(stream) { 
videoElement.src = window.URL.createObjectURL(stream); 
videoElement.play(); 
}).catch(function (reason){ 
log(“Failed to show camera: ” +reason.message); 
}); 
Based on: http://lists.w3.org/Archives/Public/public-media-capture/2014Sep/0171.html
Debate 
This is still up for debate. 
Some are eager to just ship v1.0 and add support for 
promises in gUM at a later stage. 
! 
Based on: http://lists.w3.org/Archives/Public/public-media-capture/2014Oct/0003.html
gUM: Other concerns 
Impossible for a gUM app to 
use the device flash for low-light 
! 
Use (auto) zoom 
Use (auto) focus
gUM: Other concerns 
“If you look further into this API then it 
doesn’t offer any advanced features 
that you expect in a good camera app: 
focus, flash, zoom ` 
etc. It is clear that 
…(getUserMedia).. has been designed 
for use in P2P applications and not as a 
dedicated camera experience.” 
- Paul Kinlan
Mediastream Image-Capture 
! 
Will provide a deeper level of control 
for taking photos 
! 
w3.org/TR/image-capture/
Mediastream Image-Capture 
White Balance 
ISO 
Red-Eye Reduction 
Exposure 
Brightness 
Contrast 
` 
Saturation 
Sharpness 
Zoom 
takePhoto()
Mediastream Image-Capture 
Focus? Flash? ¯_(ツ)_/¯
Getting permission is not easy 
Some users don’t seem to 
notice the permissions dialog 
in certain browsers
Getting permission is not easy 
Some users don’t seem to 
notice the permissions dialog 
in certain browsers
Some users don’t seem to 
notice the permissions dialog 
in certain browsers
Some users don’t seem to 
notice the permissions dialog 
in certain browsers
Some users don’t seem to 
notice the permissions dialog 
in certain browsers
Getting permission is not easy 
Permissions dialogs are different on 
different platforms and browsers … 
` 
especially mobile
HTTPS helps … 
If the app is on HTTPS, then the 
browser will remember the last 
granted permission.
RTCPeerConnection
webrtcglossary.com
RTCPeerConnection
ICE - Interactive Connectivity Establishment 
* May or may not wax a chump like a candle.
STUN 
Whats my 
external IP Address? 
Your external 
IP Address is x.x.x.x
TURN around… 
Total eclipse of the (p2p) call …
TURN 
Basically relays stuff from one 
party to the other.
Big Fat TURN Server
TURN 
Basically relays stuff from one 
party to the other. 
In this case, connection won’t 
be p2p, but at least the 
connection will be made!
TURN 
Basically relays stuff from one 
party to the other. 
In this case, connection won’t 
be p2p, but at least the 
connection will be made! 
Generally speaking, a TURN server will 
include a STUN server too.
Free ICE Project 
github.com/DamonOehlman/freeice 
(List of free STUN/TURN servers to use in your projects)
The WebRTC Signalling Process 
WebSocket || XHR || SIP || Carrier Pigeon
Session Description (SDP) 
v=0 
o=- 680121471469462884 2 IN IP4 127.0.0.1 
s=- 
t=0 0 
a=group:BUNDLE audio video 
a=msid-semantic: WMS GUKF430Khp9jEQiPrdYe0LbTAALiNAKAIfl2 
Audio Lines 
m=audio 54278 RTP/SAVPF 111 103 104 0 8 106 105 13 126 
c=IN IP4 180.6.6.6 
a=rtcp:54278 IN IP4 180.6.6.6 
! 
ICE Candidates 
a=candidate:4022866446 1 udp 2113937151 192.168.0.197 36768 typ host generation 0 
a=candidate:4022866446 2 udp 2113937151 192.168.0.197 36768 typ host generation 0 
a=candidate:2706108158 1 tcp 1509957375 192.168.0.197 0 typ host generation 0 
a=candidate:2706108158 2 tcp 1509957375 192.168.0.197 0 typ host generation 0 
a=candidate:1853887674 1 udp 1845501695 46.2.2.2 36768 typ srflx raddr 192.168.0.197 rport 36768 generation 0 
a=candidate:1853887674 2 udp 1845501695 46.2.2.2 36768 typ srflx raddr 192.168.0.197 rport 36768 generation 0 
a=candidate:2157334355 1 udp 33562367 180.6.6.6 54278 typ relay raddr 46.2.2.2 rport 38135 generation 0 
a=candidate:2157334355 2 udp 33562367 180.6.6.6 54278 typ relay raddr 46.2.2.2 rport 38135 generation 0
The WebRTC Signalling Process 
WebSocket || XHR || SIP || Carrier Pigeon 
Creates Offer 
local description
The WebRTC Signalling Process 
WebSocket || XHR || SIP || Carrier Pigeon 
Receives Offer 
local description
The WebRTC Signalling Process 
WebSocket || XHR || SIP || Carrier Pigeon 
Receives Offer 
remote description 
local description
The WebRTC Signalling Process 
WebSocket || XHR || SIP || Carrier Pigeon 
Creates and 
sends Answer 
local description 
local description 
remote description
The WebRTC Signalling Process 
WebSocket || XHR || SIP || Carrier Pigeon 
Receives Answer 
local description 
local description 
remote description
The WebRTC Signalling Process 
WebSocket || XHR || SIP || Carrier Pigeon 
Receives Answer 
local description 
local description 
remote description 
remote description
The WebRTC Signalling Process 
WebSocket || XHR || SIP || Carrier Pigeon 
Connectivity 
Checks 
local description 
local description 
remote description 
remote description
The WebRTC Signalling Process 
WebSocket || XHR || SIP || Carrier Pigeon 
P2P Connection Established
Libraries
Bandwidth Numbers 
! 
720p : 1-2 Mbps // VP8 at 30fps 
360p : 0.5 - 1 Mbps // VP8 at 30fps 
180p : 0.1 - 0.5 Mbps // VP8 at 30fps 
Audio : .06 - 0.51 Mbps // Opus
Debugging 
opera://webrtc-internals 
chrome://webrtc-internals 
about:webrtc 
! 
The getStats() method 
! 
callstats.io 
!
Data Channels 
Once RTCPeerConnection is 
established, we can use Data Channels 
to transfer data P2P. 
Data can be text or binary data
Whats the advantage? 
Data Channels provide a 
* High Performance 
* P2P 
* Low Latency 
Connection to others
Working with Data 
datachannel 
.onopen // Data Channel opened 
.onclose // Data Channel closed 
.onerror // Error occurred 
.onmessage // New message arrived 
.send() // Send a message
DataChannels can work 
exactly like WebSockets if 
you want, but they don’t 
have to …
SCTP // Transport Protocol 
DTLS // Encryption 
UDP
notable options 
ordered 
send data packets in ordered fashion or not 
! 
maxRetransmitTime 
Max time to try to send a failed message 
! 
maxRetransmits 
Max number of tries to deliver failed message before it 
gives up
In the wild 
Peerflix 
PeerCDN 
WebTorrent
In the wild 
Peerflix 
@mafintosh 
! 
PeerCDN 
WebTorrent 
@feross
IsWebTRwToCR MeaoddyeYest.com
ORTC 
- WebRTC 1.1 (ORTC) 
- SDP exchange not required 
- Advanced stuff like simulcast 
- More low level than WebRTC 
- Shim for WebRTC to work on top of ORTC 
- Important goal is compatibility. Existing 
apps should not be affected
Communication
Opera Software 
Cheers! 
@shwetank 
Fronteers 
2014 
shwetankd@opera.com

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web APIBrad Genereaux
 
会社概要_株式会社サーバーワークス
会社概要_株式会社サーバーワークス会社概要_株式会社サーバーワークス
会社概要_株式会社サーバーワークスServerworks Co.,Ltd.
 
ROS2 on VxWorks - one project on Wind River Labs
ROS2 on VxWorks - one project on Wind River LabsROS2 on VxWorks - one project on Wind River Labs
ROS2 on VxWorks - one project on Wind River LabsAndrei Kholodnyi
 
Flutter for web
Flutter for web Flutter for web
Flutter for web rihannakedy
 
Introduction To Cloud Computing
Introduction To Cloud ComputingIntroduction To Cloud Computing
Introduction To Cloud ComputingLiming Liu
 
온프레미스 쿠버네티스에서도 로드밸런서를 (w MetalLB)
온프레미스 쿠버네티스에서도 로드밸런서를 (w MetalLB)온프레미스 쿠버네티스에서도 로드밸런서를 (w MetalLB)
온프레미스 쿠버네티스에서도 로드밸런서를 (w MetalLB)Jo Hoon
 
Amazon S3による静的Webサイトホスティング
Amazon S3による静的WebサイトホスティングAmazon S3による静的Webサイトホスティング
Amazon S3による静的WebサイトホスティングYasuhiro Horiuchi
 
Demystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID ConnectDemystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID ConnectVinay Manglani
 
『SHOWROOM』の大規模化に伴う技術課題のソリューション ~演者・視聴者の熱量を支える負荷対策、HTML5対応など~
『SHOWROOM』の大規模化に伴う技術課題のソリューション  ~演者・視聴者の熱量を支える負荷対策、HTML5対応など~『SHOWROOM』の大規模化に伴う技術課題のソリューション  ~演者・視聴者の熱量を支える負荷対策、HTML5対応など~
『SHOWROOM』の大規模化に伴う技術課題のソリューション ~演者・視聴者の熱量を支える負荷対策、HTML5対応など~DeNA
 
V1.1 CD03 Azure Active Directory B2C/B2B コラボレーションによる Customer Identity and Ac...
V1.1 CD03 Azure Active Directory B2C/B2B コラボレーションによる Customer Identity and Ac...V1.1 CD03 Azure Active Directory B2C/B2B コラボレーションによる Customer Identity and Ac...
V1.1 CD03 Azure Active Directory B2C/B2B コラボレーションによる Customer Identity and Ac...junichi anno
 
1 ma ruza-uchun_taqdimot_materiallari
1 ma ruza-uchun_taqdimot_materiallari1 ma ruza-uchun_taqdimot_materiallari
1 ma ruza-uchun_taqdimot_materiallariferghanasoft
 
Windows Azure Platform 運用設計 V1.1
Windows Azure Platform 運用設計 V1.1Windows Azure Platform 運用設計 V1.1
Windows Azure Platform 運用設計 V1.1junichi anno
 
Lenguajes y frameworks para desarrollo web
Lenguajes y frameworks para desarrollo webLenguajes y frameworks para desarrollo web
Lenguajes y frameworks para desarrollo webAntonio Ognio
 
메타버스 백서 (by 텐투플레이)
메타버스 백서 (by 텐투플레이)메타버스 백서 (by 텐투플레이)
메타버스 백서 (by 텐투플레이)Eunkyoung Lee
 
Amazon Pinpoint を中心としたカスタマーエンゲージメントの全体像 / Customer Engagement On Amazon Pinpoint
Amazon Pinpoint を中心としたカスタマーエンゲージメントの全体像 / Customer Engagement On Amazon PinpointAmazon Pinpoint を中心としたカスタマーエンゲージメントの全体像 / Customer Engagement On Amazon Pinpoint
Amazon Pinpoint を中心としたカスタマーエンゲージメントの全体像 / Customer Engagement On Amazon PinpointAmazon Web Services Japan
 
Google Cloud Platform 入門
Google Cloud Platform 入門Google Cloud Platform 入門
Google Cloud Platform 入門Kah Wai Liew
 
Cloud computing using virtualization (Virtual Data Center)
Cloud computing using virtualization (Virtual Data Center)Cloud computing using virtualization (Virtual Data Center)
Cloud computing using virtualization (Virtual Data Center)Sonu Mamman
 

Was ist angesagt? (20)

Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web API
 
会社概要_株式会社サーバーワークス
会社概要_株式会社サーバーワークス会社概要_株式会社サーバーワークス
会社概要_株式会社サーバーワークス
 
ROS2 on VxWorks - one project on Wind River Labs
ROS2 on VxWorks - one project on Wind River LabsROS2 on VxWorks - one project on Wind River Labs
ROS2 on VxWorks - one project on Wind River Labs
 
Flutter for web
Flutter for web Flutter for web
Flutter for web
 
Introduction To Cloud Computing
Introduction To Cloud ComputingIntroduction To Cloud Computing
Introduction To Cloud Computing
 
온프레미스 쿠버네티스에서도 로드밸런서를 (w MetalLB)
온프레미스 쿠버네티스에서도 로드밸런서를 (w MetalLB)온프레미스 쿠버네티스에서도 로드밸런서를 (w MetalLB)
온프레미스 쿠버네티스에서도 로드밸런서를 (w MetalLB)
 
Amazon S3による静的Webサイトホスティング
Amazon S3による静的WebサイトホスティングAmazon S3による静的Webサイトホスティング
Amazon S3による静的Webサイトホスティング
 
Demystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID ConnectDemystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID Connect
 
『SHOWROOM』の大規模化に伴う技術課題のソリューション ~演者・視聴者の熱量を支える負荷対策、HTML5対応など~
『SHOWROOM』の大規模化に伴う技術課題のソリューション  ~演者・視聴者の熱量を支える負荷対策、HTML5対応など~『SHOWROOM』の大規模化に伴う技術課題のソリューション  ~演者・視聴者の熱量を支える負荷対策、HTML5対応など~
『SHOWROOM』の大規模化に伴う技術課題のソリューション ~演者・視聴者の熱量を支える負荷対策、HTML5対応など~
 
Keycloakのステップアップ認証について
Keycloakのステップアップ認証についてKeycloakのステップアップ認証について
Keycloakのステップアップ認証について
 
V1.1 CD03 Azure Active Directory B2C/B2B コラボレーションによる Customer Identity and Ac...
V1.1 CD03 Azure Active Directory B2C/B2B コラボレーションによる Customer Identity and Ac...V1.1 CD03 Azure Active Directory B2C/B2B コラボレーションによる Customer Identity and Ac...
V1.1 CD03 Azure Active Directory B2C/B2B コラボレーションによる Customer Identity and Ac...
 
1 ma ruza-uchun_taqdimot_materiallari
1 ma ruza-uchun_taqdimot_materiallari1 ma ruza-uchun_taqdimot_materiallari
1 ma ruza-uchun_taqdimot_materiallari
 
Hyperledger fabric 3
Hyperledger fabric 3Hyperledger fabric 3
Hyperledger fabric 3
 
Windows Azure Platform 運用設計 V1.1
Windows Azure Platform 運用設計 V1.1Windows Azure Platform 運用設計 V1.1
Windows Azure Platform 運用設計 V1.1
 
Lenguajes y frameworks para desarrollo web
Lenguajes y frameworks para desarrollo webLenguajes y frameworks para desarrollo web
Lenguajes y frameworks para desarrollo web
 
WebRTC
WebRTCWebRTC
WebRTC
 
메타버스 백서 (by 텐투플레이)
메타버스 백서 (by 텐투플레이)메타버스 백서 (by 텐투플레이)
메타버스 백서 (by 텐투플레이)
 
Amazon Pinpoint を中心としたカスタマーエンゲージメントの全体像 / Customer Engagement On Amazon Pinpoint
Amazon Pinpoint を中心としたカスタマーエンゲージメントの全体像 / Customer Engagement On Amazon PinpointAmazon Pinpoint を中心としたカスタマーエンゲージメントの全体像 / Customer Engagement On Amazon Pinpoint
Amazon Pinpoint を中心としたカスタマーエンゲージメントの全体像 / Customer Engagement On Amazon Pinpoint
 
Google Cloud Platform 入門
Google Cloud Platform 入門Google Cloud Platform 入門
Google Cloud Platform 入門
 
Cloud computing using virtualization (Virtual Data Center)
Cloud computing using virtualization (Virtual Data Center)Cloud computing using virtualization (Virtual Data Center)
Cloud computing using virtualization (Virtual Data Center)
 

Andere mochten auch

Upperside WebRTC conference - WebRTC intro
Upperside WebRTC conference - WebRTC introUpperside WebRTC conference - WebRTC intro
Upperside WebRTC conference - WebRTC introVictor Pascual Ávila
 
Programmation evénementielle
Programmation evénementielleProgrammation evénementielle
Programmation evénementielleKokou Gaglo
 
Mise en place d’une plateforme de formation IMS
Mise en place d’une plateforme de formation IMSMise en place d’une plateforme de formation IMS
Mise en place d’une plateforme de formation IMSKokou Gaglo
 
Firefox Extension Development
Firefox Extension DevelopmentFirefox Extension Development
Firefox Extension Developmentphamvanvung
 
Quick dive into WebVR
Quick dive into WebVRQuick dive into WebVR
Quick dive into WebVRJanne Aukia
 
WebVR with Three.js!
WebVR with Three.js!WebVR with Three.js!
WebVR with Three.js!誠人 堀口
 
WebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco StrategyWebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco StrategyJose de Castro
 
Introduction to The VR Web
Introduction to The VR WebIntroduction to The VR Web
Introduction to The VR WebLiv Erickson
 
eXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction TrainingeXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction TrainingHoat Le
 
JavaScript and Web Standards Sitting in a Tree
JavaScript and Web Standards Sitting in a TreeJavaScript and Web Standards Sitting in a Tree
JavaScript and Web Standards Sitting in a TreeJenn Lukas
 
Web Front End - (HTML5, CSS3, JavaScript) ++
Web Front End - (HTML5, CSS3, JavaScript) ++Web Front End - (HTML5, CSS3, JavaScript) ++
Web Front End - (HTML5, CSS3, JavaScript) ++ubshreenath
 
WebRTC Reborn - Cloud Expo / WebRTC Summit
WebRTC Reborn - Cloud Expo / WebRTC SummitWebRTC Reborn - Cloud Expo / WebRTC Summit
WebRTC Reborn - Cloud Expo / WebRTC SummitDan Jenkins
 

Andere mochten auch (20)

Serveur http
Serveur httpServeur http
Serveur http
 
Upperside WebRTC conference - WebRTC intro
Upperside WebRTC conference - WebRTC introUpperside WebRTC conference - WebRTC intro
Upperside WebRTC conference - WebRTC intro
 
Programmation evénementielle
Programmation evénementielleProgrammation evénementielle
Programmation evénementielle
 
Mise en place d’une plateforme de formation IMS
Mise en place d’une plateforme de formation IMSMise en place d’une plateforme de formation IMS
Mise en place d’une plateforme de formation IMS
 
Firefox Extension Development
Firefox Extension DevelopmentFirefox Extension Development
Firefox Extension Development
 
Estudo 01
Estudo 01Estudo 01
Estudo 01
 
Quick dive into WebVR
Quick dive into WebVRQuick dive into WebVR
Quick dive into WebVR
 
JavaScript Web Workers
JavaScript Web WorkersJavaScript Web Workers
JavaScript Web Workers
 
WebVR with Three.js!
WebVR with Three.js!WebVR with Three.js!
WebVR with Three.js!
 
Web vr creative_vr
Web vr creative_vrWeb vr creative_vr
Web vr creative_vr
 
WebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco StrategyWebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco Strategy
 
WebVR - JAX 2016
WebVR -  JAX 2016WebVR -  JAX 2016
WebVR - JAX 2016
 
Javascript the New Parts
Javascript the New PartsJavascript the New Parts
Javascript the New Parts
 
Introduction to The VR Web
Introduction to The VR WebIntroduction to The VR Web
Introduction to The VR Web
 
20160713 webvr
20160713 webvr20160713 webvr
20160713 webvr
 
eXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction TrainingeXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction Training
 
JavaScript and Web Standards Sitting in a Tree
JavaScript and Web Standards Sitting in a TreeJavaScript and Web Standards Sitting in a Tree
JavaScript and Web Standards Sitting in a Tree
 
Photo and photo
Photo and photoPhoto and photo
Photo and photo
 
Web Front End - (HTML5, CSS3, JavaScript) ++
Web Front End - (HTML5, CSS3, JavaScript) ++Web Front End - (HTML5, CSS3, JavaScript) ++
Web Front End - (HTML5, CSS3, JavaScript) ++
 
WebRTC Reborn - Cloud Expo / WebRTC Summit
WebRTC Reborn - Cloud Expo / WebRTC SummitWebRTC Reborn - Cloud Expo / WebRTC Summit
WebRTC Reborn - Cloud Expo / WebRTC Summit
 

Ähnlich wie WebRTC: A front-end perspective

Twilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Inc
 
WebRTC Reborn SignalConf 2016
WebRTC Reborn SignalConf 2016WebRTC Reborn SignalConf 2016
WebRTC Reborn SignalConf 2016Dan Jenkins
 
WebRTC 101 - How to get started building your first WebRTC application
WebRTC 101 - How to get started building your first WebRTC applicationWebRTC 101 - How to get started building your first WebRTC application
WebRTC 101 - How to get started building your first WebRTC applicationDan Jenkins
 
[1C2]webrtc 개발, 현재와 미래
[1C2]webrtc 개발, 현재와 미래[1C2]webrtc 개발, 현재와 미래
[1C2]webrtc 개발, 현재와 미래NAVER D2
 
WebRTC Tutorial by Dean Bubley of Disruptive Analysis & Tim Panton of Westhaw...
WebRTC Tutorial by Dean Bubley of Disruptive Analysis & Tim Panton of Westhaw...WebRTC Tutorial by Dean Bubley of Disruptive Analysis & Tim Panton of Westhaw...
WebRTC Tutorial by Dean Bubley of Disruptive Analysis & Tim Panton of Westhaw...Dean Bubley
 
WebRTC Reborn Hackference
WebRTC Reborn HackferenceWebRTC Reborn Hackference
WebRTC Reborn HackferenceDan Jenkins
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTCGiacomo Vacca
 
WebRTC ... GWT & in-browser computation
WebRTC ... GWT & in-browser computationWebRTC ... GWT & in-browser computation
WebRTC ... GWT & in-browser computationJooinK
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE
 
WebRTC, another Web?
WebRTC, another Web?WebRTC, another Web?
WebRTC, another Web?Hui Fan
 
WebRTC Reborn - Full Stack
WebRTC Reborn  - Full StackWebRTC Reborn  - Full Stack
WebRTC Reborn - Full StackDan Jenkins
 
Http/2 - What's it all about?
Http/2  - What's it all about?Http/2  - What's it all about?
Http/2 - What's it all about?Andy Davies
 
WebRTC Reborn Over The Air
WebRTC Reborn Over The AirWebRTC Reborn Over The Air
WebRTC Reborn Over The AirDan Jenkins
 
WebRTC standards update - November 2014
WebRTC standards update - November 2014WebRTC standards update - November 2014
WebRTC standards update - November 2014Victor Pascual Ávila
 
Getting Started with WebRTC
Getting Started with WebRTCGetting Started with WebRTC
Getting Started with WebRTCChad Hart
 

Ähnlich wie WebRTC: A front-end perspective (20)

DevCon5 (July 2014) - Intro to WebRTC
DevCon5 (July 2014) - Intro to WebRTCDevCon5 (July 2014) - Intro to WebRTC
DevCon5 (July 2014) - Intro to WebRTC
 
Twilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC Reborn
 
WebRTC Reborn SignalConf 2016
WebRTC Reborn SignalConf 2016WebRTC Reborn SignalConf 2016
WebRTC Reborn SignalConf 2016
 
WebRTC 101 - How to get started building your first WebRTC application
WebRTC 101 - How to get started building your first WebRTC applicationWebRTC 101 - How to get started building your first WebRTC application
WebRTC 101 - How to get started building your first WebRTC application
 
[1C2]webrtc 개발, 현재와 미래
[1C2]webrtc 개발, 현재와 미래[1C2]webrtc 개발, 현재와 미래
[1C2]webrtc 개발, 현재와 미래
 
WebRTC Seminar Report
WebRTC  Seminar ReportWebRTC  Seminar Report
WebRTC Seminar Report
 
WebRTC Tutorial by Dean Bubley of Disruptive Analysis & Tim Panton of Westhaw...
WebRTC Tutorial by Dean Bubley of Disruptive Analysis & Tim Panton of Westhaw...WebRTC Tutorial by Dean Bubley of Disruptive Analysis & Tim Panton of Westhaw...
WebRTC Tutorial by Dean Bubley of Disruptive Analysis & Tim Panton of Westhaw...
 
DevCon 5 (July 2013) - WebSockets
DevCon 5 (July 2013) - WebSocketsDevCon 5 (July 2013) - WebSockets
DevCon 5 (July 2013) - WebSockets
 
WebRTC Reborn Hackference
WebRTC Reborn HackferenceWebRTC Reborn Hackference
WebRTC Reborn Hackference
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
 
WebRTC ... GWT & in-browser computation
WebRTC ... GWT & in-browser computationWebRTC ... GWT & in-browser computation
WebRTC ... GWT & in-browser computation
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
WebRTC, another Web?
WebRTC, another Web?WebRTC, another Web?
WebRTC, another Web?
 
WebRTC Reborn - Full Stack
WebRTC Reborn  - Full StackWebRTC Reborn  - Full Stack
WebRTC Reborn - Full Stack
 
DevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDKDevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDK
 
Http/2 - What's it all about?
Http/2  - What's it all about?Http/2  - What's it all about?
Http/2 - What's it all about?
 
WebRTC Reborn Over The Air
WebRTC Reborn Over The AirWebRTC Reborn Over The Air
WebRTC Reborn Over The Air
 
WebRTC standards update - November 2014
WebRTC standards update - November 2014WebRTC standards update - November 2014
WebRTC standards update - November 2014
 
VozDigital DevFest 31/10/14
VozDigital DevFest 31/10/14VozDigital DevFest 31/10/14
VozDigital DevFest 31/10/14
 
Getting Started with WebRTC
Getting Started with WebRTCGetting Started with WebRTC
Getting Started with WebRTC
 

Kürzlich hochgeladen

办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleanscorenetworkseo
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 

Kürzlich hochgeladen (20)

办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleans
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 

WebRTC: A front-end perspective

  • 1. WebRTC A front-end perspective Opera Software Fronteers 2014 @shwetank
  • 2. About me Shwetank Dixit Opera Software Fronteers 2014 @shwetank Developer Relations, Opera Software
  • 5. Source: https://www.flickr.com/photos/rambow/858717314 Source: https://www.flickr.com/photos/rambow/858719954
  • 6.
  • 7.
  • 8. What is WebRTC? Real Time Peer-to-Peer Communication
  • 9.
  • 10. but … So far I’ve seen very few web people talking about it
  • 11. Whats the biggest barrier to WebRTC adoption?* Lack of Awareness Not supported by MS Not supported by Apple Other 0% 5.5% 11% 16.5% 22% * WebRTC World Outlook Survey 2014
  • 12. WebRTC is for but … Web Developers
  • 16. mediaStream + ` ` Device Camera Microphone
  • 17. getUserMedia + ` ` Device Camera Microphone
  • 19. gUM + CSS(Filters, Masks, Blend Modes) Create interesting visual effects from camera output in real-time using CSS
  • 20. gUM + Web Audio Sound powered actions and navigation
  • 21.
  • 22. World’s first webcam http://en.wikipedia.org/wiki/Trojan_Room_coffee_pot
  • 23. What can you achieve with gUM? - Motion Detection (Baby Monitors, Security Cam) - Hotspots - Gesture Recognition - Emotion Recognition - Sound Detection and Visualisation - Voice / Sound Activated Controls - Capture video (Kind of) (whammy.js, gifshot)
  • 24. gUM: Current way to do it navigator.getUserMedia* *with prefixes
  • 25. gUM: Broken Error Handling Exceptions are not caught by the current API. Promises can fix this. Based on: http://lists.w3.org/Archives/Public/public-media-capture/2014Sep/0171.html
  • 26. gUM: Current Way var failure = function(reason){ log("Failed to show camera: " + reason.message); } ! navigator.getUserMedia(constraints, function(stream) { try { $video.src = window.URL.createObjectURL(stream); $video.play(); } catch(e) { failure(e); } //failure must tolerate non-MediaStreamError }, failure); Based on: http://lists.w3.org/Archives/Public/public-media-capture/2014Sep/0171.html
  • 27. gUM: In the future ? navigator.mediaDevices.getUserMedia
  • 28. gUM: In the future ? Promises Proposal navigator.mediaDevices.getUserMedia(constraints) .then( function(stream) { videoElement.src = window.URL.createObjectURL(stream); videoElement.play(); }).catch(function (reason){ log(“Failed to show camera: ” +reason.message); }); Based on: http://lists.w3.org/Archives/Public/public-media-capture/2014Sep/0171.html
  • 29. Debate This is still up for debate. Some are eager to just ship v1.0 and add support for promises in gUM at a later stage. ! Based on: http://lists.w3.org/Archives/Public/public-media-capture/2014Oct/0003.html
  • 30. gUM: Other concerns Impossible for a gUM app to use the device flash for low-light ! Use (auto) zoom Use (auto) focus
  • 31. gUM: Other concerns “If you look further into this API then it doesn’t offer any advanced features that you expect in a good camera app: focus, flash, zoom ` etc. It is clear that …(getUserMedia).. has been designed for use in P2P applications and not as a dedicated camera experience.” - Paul Kinlan
  • 32. Mediastream Image-Capture ! Will provide a deeper level of control for taking photos ! w3.org/TR/image-capture/
  • 33. Mediastream Image-Capture White Balance ISO Red-Eye Reduction Exposure Brightness Contrast ` Saturation Sharpness Zoom takePhoto()
  • 34. Mediastream Image-Capture Focus? Flash? ¯_(ツ)_/¯
  • 35. Getting permission is not easy Some users don’t seem to notice the permissions dialog in certain browsers
  • 36. Getting permission is not easy Some users don’t seem to notice the permissions dialog in certain browsers
  • 37. Some users don’t seem to notice the permissions dialog in certain browsers
  • 38. Some users don’t seem to notice the permissions dialog in certain browsers
  • 39. Some users don’t seem to notice the permissions dialog in certain browsers
  • 40. Getting permission is not easy Permissions dialogs are different on different platforms and browsers … ` especially mobile
  • 41.
  • 42. HTTPS helps … If the app is on HTTPS, then the browser will remember the last granted permission.
  • 44.
  • 45.
  • 48. ICE - Interactive Connectivity Establishment * May or may not wax a chump like a candle.
  • 49. STUN Whats my external IP Address? Your external IP Address is x.x.x.x
  • 50. TURN around… Total eclipse of the (p2p) call …
  • 51. TURN Basically relays stuff from one party to the other.
  • 52. Big Fat TURN Server
  • 53. TURN Basically relays stuff from one party to the other. In this case, connection won’t be p2p, but at least the connection will be made!
  • 54. TURN Basically relays stuff from one party to the other. In this case, connection won’t be p2p, but at least the connection will be made! Generally speaking, a TURN server will include a STUN server too.
  • 55. Free ICE Project github.com/DamonOehlman/freeice (List of free STUN/TURN servers to use in your projects)
  • 56. The WebRTC Signalling Process WebSocket || XHR || SIP || Carrier Pigeon
  • 57. Session Description (SDP) v=0 o=- 680121471469462884 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS GUKF430Khp9jEQiPrdYe0LbTAALiNAKAIfl2 Audio Lines m=audio 54278 RTP/SAVPF 111 103 104 0 8 106 105 13 126 c=IN IP4 180.6.6.6 a=rtcp:54278 IN IP4 180.6.6.6 ! ICE Candidates a=candidate:4022866446 1 udp 2113937151 192.168.0.197 36768 typ host generation 0 a=candidate:4022866446 2 udp 2113937151 192.168.0.197 36768 typ host generation 0 a=candidate:2706108158 1 tcp 1509957375 192.168.0.197 0 typ host generation 0 a=candidate:2706108158 2 tcp 1509957375 192.168.0.197 0 typ host generation 0 a=candidate:1853887674 1 udp 1845501695 46.2.2.2 36768 typ srflx raddr 192.168.0.197 rport 36768 generation 0 a=candidate:1853887674 2 udp 1845501695 46.2.2.2 36768 typ srflx raddr 192.168.0.197 rport 36768 generation 0 a=candidate:2157334355 1 udp 33562367 180.6.6.6 54278 typ relay raddr 46.2.2.2 rport 38135 generation 0 a=candidate:2157334355 2 udp 33562367 180.6.6.6 54278 typ relay raddr 46.2.2.2 rport 38135 generation 0
  • 58. The WebRTC Signalling Process WebSocket || XHR || SIP || Carrier Pigeon Creates Offer local description
  • 59. The WebRTC Signalling Process WebSocket || XHR || SIP || Carrier Pigeon Receives Offer local description
  • 60. The WebRTC Signalling Process WebSocket || XHR || SIP || Carrier Pigeon Receives Offer remote description local description
  • 61. The WebRTC Signalling Process WebSocket || XHR || SIP || Carrier Pigeon Creates and sends Answer local description local description remote description
  • 62. The WebRTC Signalling Process WebSocket || XHR || SIP || Carrier Pigeon Receives Answer local description local description remote description
  • 63. The WebRTC Signalling Process WebSocket || XHR || SIP || Carrier Pigeon Receives Answer local description local description remote description remote description
  • 64. The WebRTC Signalling Process WebSocket || XHR || SIP || Carrier Pigeon Connectivity Checks local description local description remote description remote description
  • 65. The WebRTC Signalling Process WebSocket || XHR || SIP || Carrier Pigeon P2P Connection Established
  • 67.
  • 68.
  • 69.
  • 70. Bandwidth Numbers ! 720p : 1-2 Mbps // VP8 at 30fps 360p : 0.5 - 1 Mbps // VP8 at 30fps 180p : 0.1 - 0.5 Mbps // VP8 at 30fps Audio : .06 - 0.51 Mbps // Opus
  • 71. Debugging opera://webrtc-internals chrome://webrtc-internals about:webrtc ! The getStats() method ! callstats.io !
  • 72. Data Channels Once RTCPeerConnection is established, we can use Data Channels to transfer data P2P. Data can be text or binary data
  • 73. Whats the advantage? Data Channels provide a * High Performance * P2P * Low Latency Connection to others
  • 74. Working with Data datachannel .onopen // Data Channel opened .onclose // Data Channel closed .onerror // Error occurred .onmessage // New message arrived .send() // Send a message
  • 75. DataChannels can work exactly like WebSockets if you want, but they don’t have to …
  • 76. SCTP // Transport Protocol DTLS // Encryption UDP
  • 77. notable options ordered send data packets in ordered fashion or not ! maxRetransmitTime Max time to try to send a failed message ! maxRetransmits Max number of tries to deliver failed message before it gives up
  • 78. In the wild Peerflix PeerCDN WebTorrent
  • 79. In the wild Peerflix @mafintosh ! PeerCDN WebTorrent @feross
  • 81.
  • 82.
  • 83.
  • 84. ORTC - WebRTC 1.1 (ORTC) - SDP exchange not required - Advanced stuff like simulcast - More low level than WebRTC - Shim for WebRTC to work on top of ORTC - Important goal is compatibility. Existing apps should not be affected
  • 86. Opera Software Cheers! @shwetank Fronteers 2014 shwetankd@opera.com