際際滷

際際滷Share a Scribd company logo
JS Audio/Video Streaming
WebRTC API 101 explained
ale_polidori
alepolidori
JS Audio/Video Streaming: WebRTC APIs 101 explained
webrtc.org
JS Audio/Video Streaming: WebRTC APIs 101 explained
Our Purpose
 Whats WebRTC
 How it works
 3 Javascript APIs
 Video Conference App
 Resources
鐃緒申
WebRTC
Web Real-Time Communication
WebRTC
Web Real-Time Communication
to the WEB
open-source
protocols,
JS Web APIs,
web Browsers,
mobile app
WebRTC
JS Web APIs
Peer-2-Peer
real-time communications
How WebRTC
Works
How WebRTC
Works
1 2
 1-2 offer request to start a call
How WebRTC
Works
1 2
 1-2 offer request to start a call
 3-4 answer to the offer
3
4
How WebRTC
Works
1 2
 1-2 offer request to start a call
 3-4 answer to the offer
 5 peer-to-peer communications
3
4
5
How WebRTC
Works
 1-2 offer request to start a call
 3-4 answer to the offer
 5 peer-to-peer communications
1 2
 1-2 Offer request to start a call
 3-4 Answer to the offer
 5 peer-to-peer communications
3
4
5
Signaling
Signaling Server
WebRTC Javascript APIs
3 APIs
 getUserMedia
 RTCPeerConnection
 RTCDataChannel
3 APIs
 getUserMedia
JS Audio/Video Streaming: WebRTC APIs 101 explained
JS Audio/Video Streaming: WebRTC APIs 101 explained
JS Audio/Video Streaming: WebRTC APIs 101 explained
JS Audio/Video Streaming: WebRTC APIs 101 explained
JS Audio/Video Streaming: WebRTC APIs 101 explained
Security
Permissions
HTTPS encryption
JS Audio/Video Streaming: WebRTC APIs 101 explained
Lets try getUserMedia
3 APIs
 getUserMedia
 RTCPeerConnection
 RTCDataChannel
1 2
 1-2 Offer request to start a call
 3-4 Answer to the offer
 5 peer-to-peer communications
3
4
5
Signaling
Signaling Server
Signaling Server
1. new RTCPeerConnection
2. get & share Network Info
(ICE candidate)
3. get & share local/remote description
(SDP)
1. new RTCPeerConnection
2. get & share Network Info
(ICE candidate)
3. get & share local/remote description
(SDP)
Demo Time
Protocols Recap
 HTTPS
 RTP, SRTP: media exchange
 SDP: media description
 ICE: peer-to-peer connectivity
 WebSocket: custom signaling (alternative: SIP)
trends.google.com
Resources
 CityJS Talk: github.com/alepolidori/cityjs-athens-2023
 Samples: https://webrtc.github.io/samples/
 DOCs
 https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API
 Get support
 https://groups.google.com/forum/#!forum/discuss-webrtc
 Standard W3C & IETF
 https://www.w3.org/TR/webrtc/
 Debug
 chrome://webrtc-internals
Thanks!
ale_polidori
alepolidori
CityJS Athens 2023

More Related Content

JS Audio/Video Streaming: WebRTC APIs 101 explained