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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
150
Other Decks in Programming
See All in Programming
KagglerがMixSeekを触ってみた
morim
0
380
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
110
Swift Concurrency Type System
inamiy
0
500
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
150
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
240
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
230
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
270
t *testing.T は どこからやってくるの?
otakakot
0
500
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
1
100
3分でわかるatama plusのQA/about atama plus QA
atamaplus
0
160
Feature Toggle は捨てやすく使おう
gennei
0
590
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
780
Featured
See All Featured
WCS-LA-2024
lcolladotor
0
540
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
430
30 Presentation Tips
portentint
PRO
1
270
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
200
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
340
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
790
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
Designing for Timeless Needs
cassininazir
0
190
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Automating Front-end Workflow
addyosmani
1370
200k
How to Ace a Technical Interview
jacobian
281
24k
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