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
0
51
Real World WebRTC
Given at dot.js in Paris, 2015
Eric Schoffstall
March 02, 2016
Tweet
Share
More Decks by Eric Schoffstall
See All by Eric Schoffstall
CoffeeScript 101
contra
3
230
Websocket Messaging Patterns
contra
4
1.6k
Warlock : DSTM via Websockets
contra
1
140
Other Decks in Programming
See All in Programming
AI時代もSEOを頑張っている話
shirahama_x
0
140
知られているようで知られていない JavaScriptの仕様 4選
syumai
0
630
スタートアップを支える技術戦略と組織づくり
pospome
8
9.1k
GraalVM Native Image トラブルシューティング機能の最新状況(2025年版)
ntt_dsol_java
0
160
CSC509 Lecture 11
javiergs
PRO
0
310
関数の挙動書き換える
takatofukui
4
740
Developing Specifications - Jakarta EE: a Real World Example
ivargrimstad
0
160
最新のDirectX12で使えるレイトレ周りの機能追加について
projectasura
0
290
Atomics APIを知る / Understanding Atomics API
ssssota
1
170
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
160
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
0
210
しっかり学ぶ java.lang.*
nagise
1
410
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.3k
Embracing the Ebb and Flow
colly
88
4.9k
Six Lessons from altMBA
skipperchong
29
4.1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Facilitating Awesome Meetings
lara
57
6.6k
Designing Experiences People Love
moore
142
24k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.1k
Writing Fast Ruby
sferik
630
62k
Unsuck your backbone
ammeep
671
58k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.1k
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