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
150
Other Decks in Programming
See All in Programming
Kingdom of the Machine
yui_knk
2
1.4k
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
480
Back to the roots of date
jinroq
0
720
Vibe NLP for Applied NLP
inesmontani
PRO
0
610
UaaL×Androidアプリのメモリ計測 — Memory Profilerの先へ
rio432
0
110
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
310
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
760
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
250
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
1
130
20260514_its_the_context_window_stupid.pdf
heita
0
560
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
2.8k
Making the RBS Parser Faster
soutaro
0
660
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Crafting Experiences
bethany
1
140
4 Signs Your Business is Dying
shpigford
187
22k
Automating Front-end Workflow
addyosmani
1370
200k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Typedesign – Prime Four
hannesfritz
42
3k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
510
Bash Introduction
62gerente
615
210k
Prompt Engineering for Job Search
mfonobong
0
290
Leo the Paperboy
mayatellez
7
1.7k
Building an army of robots
kneath
306
46k
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