$30 off During Our Annual Pro Sale. View Details »
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 一起為自己辦的研討會寫一個售票系統
eddie
0
500
チームをチームにするEM
hitode909
0
310
Go コードベースの構成と AI コンテキスト定義
andpad
0
120
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
390
開発に寄りそう自動テストの実現
goyoki
1
860
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
320
AWS CDKの推しポイントN選
akihisaikeda
1
240
全員アーキテクトで挑む、 巨大で高密度なドメインの紐解き方
agatan
8
20k
CSC509 Lecture 14
javiergs
PRO
0
220
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
130
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
11
11k
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
130
Featured
See All Featured
Fireside Chat
paigeccino
41
3.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Designing for humans not robots
tammielis
254
26k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
GitHub's CSS Performance
jonrohan
1032
470k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
700
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Unsuck your backbone
ammeep
671
58k
How to train your dragon (web standard)
notwaldorf
97
6.4k
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