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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
Oxcを導入して開発体験が向上した話
yug1224
4
250
Oxlintのカスタムルールの現況
syumai
5
890
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.2k
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
170
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
460
Swiftのレキシカルスコープ管理
kntkymt
0
200
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
320
RTSPクライアントを自作してみた話
simotin13
0
320
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
1.7k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
480
~ 秘伝のタレ化した『神スプシ』と戦う ~ 関数型パラダイムで壊れない仕組みへ
h0r15h0
1
140
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
670
Featured
See All Featured
Building AI with AI
inesmontani
PRO
1
1k
The Limits of Empathy - UXLibs8
cassininazir
1
340
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
180
Mind Mapping
helmedeiros
PRO
1
210
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
What's in a price? How to price your products and services
michaelherold
247
13k
Rails Girls Zürich Keynote
gr2m
96
14k
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