Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Real World WebRTC
Search
Eric Schoffstall
March 02, 2016
Programming
57
0
Share
Real World WebRTC
Given at dot.js in Paris, 2015
Eric Schoffstall
March 02, 2016
More Decks by Eric Schoffstall
See All by Eric Schoffstall
CoffeeScript 101
contra
3
240
Websocket Messaging Patterns
contra
4
1.7k
Warlock : DSTM via Websockets
contra
1
160
Other Decks in Programming
See All in Programming
oxlintはeslint/typescript-eslintを置き換えられるのか
shomafujita
2
290
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
410
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
390
net-httpのHTTP/2対応について
naruse
0
340
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.3k
OSもどきOS
arkw
0
280
1人1案件のプロダクトエンジニア時代に、"プロセス監督"としてチャレンジしたこと
non0113
0
350
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
410
バックエンドにElysiaJSを採用して気付いた、良い点・悪い点
wanko_it
1
190
inferと仲良くなる10分間
ryokatsuse
1
270
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
250
New "Type" system on PicoRuby
pocke
1
360
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
300
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
230
A Tale of Four Properties
chriscoyier
163
24k
Odyssey Design
rkendrick25
PRO
2
640
Crafting Experiences
bethany
1
160
Test your architecture with Archunit
thirion
1
2.3k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Between Models and Reality
mayunak
4
310
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Transcript
Real World WebRTC
WebRTC
WebRTC is rad
WebRTC is cheap
WebRTC is cutting-edge
WebRTC is difficult
WebRTC is difficult Adapters? Plugins? Polyfills? Native? Prefixes? Extensions?
High Level
Camera Access
navigator.getUserMedia
var opt = {video: true}; navigator.getUserMedia(opt, onSuccess, onError);
var opt = {video: true, audio: true}; navigator.getUserMedia(opt, onSuccess, onError);
getUserMedia(opt, onSuccess, onError);
element.srcObject = stream;
codepen.io/contra/full/eyjgf (PLEASE MUTE)
P2P
PeerConnection
PeerConnection - Offer var pc = new PeerConnection(); pc.addStream(stream); pc.createOffer(function(offer)
{ var sdp = new SessionDescription(offer); pc.setLocalDescription(sdp, function() { // TODO: send to other user }); });
PeerConnection - Answer var pc = new PeerConnection(); pc.addStream(stream); var
offer = new SessionDescription(msg); pc.setRemoteDescription(offer, function() { pc.createAnswer(function(answer) { var sdp = new SessionDescription(answer); pc.setLocalDescription(sdp, function() { // TODO: send to other user }); }); });
DataChannel
DataChannel var dataChannel = pc.createDataChannel('cool-stuff'); dataChannel.onopen = function() { dataChannel.send('yo
sup'); };
DataChannel TCP UDP SCTP Reliability reliable unreliable configurable Delivery ordered
unordered configurable Transmission byte-oriented message-oriented message-oriented Flow Control yes no yes
Making a Real Product
Initial Prototype
"Oops" Realization
Do we need to?
Do we need to? YES
Android
Android <3 Crosswalk
iOS
iOS <3 iosrtc
iOS <3 iosrtc
IE/Safari
IE/Safari <3 Temasys
RTC Everywhere
http://rtc.works
http://rtc.works Chrom e Firefox Safari IE Android Edge iOS Node.js
None
None
None
None
None