Date post: | 16-Jul-2015 |
Category: |
Technology |
Upload: | vladimir-beloborodov |
View: | 442 times |
Download: | 1 times |
Vladimir Beloborodov
WebRTCYet Another
Overview
for IT technicians
Slides from April 2015
a technology
for peer-to-peer exchange
of media (audio, video) and data
between web*-clients
in (near) real time
“Web Real-Time Communications” is…
* Here “web” is more in the sense of “Web 2.0” (web-apps) or even just “Internet”
RTC Peer Connectivity: High-Level Logic
1
Peers negotiate media* params, “reserve” data channel(s), if any WebRTC only defines how
peers handle that info,not how they exchange it
Peers find and share, how theycan connect over the network
2Peers set up a secure connection WebRTC defines transport
mechanisms for thatPeers exchange media* and data
* Peers also (typically) get access to local media sources, such as mic and webcam
Please, note!
Peer Peer
1
2
Scope of WebRTC Standard
WebRTC at Signaling and Media Planes
* After establishing P2P connection, subsequent signaling can be done through it
WebRTC
PeerWebRTC
Peer
1
2*
Signaling Plane
Media* Plane
Media Consumers
Application Data
Media Sources
Signaling “Medium” for WebRTC Peers:It is required to setup peer-to-peer RTC connections
“Triangle model”(more typical for Web)
“Trapezoid model”(more typical for Telecom)
Peer Peer
Signaling service
2
1 1
Peer A Peer B
Signaling service A
Signaling service B
2
1 1
“Peer-to-peer” is more of app-level view
WebRTC Client
WebRTC Client
NAT NAT
Please, note!
WebRTC Client
WebRTC Client
Relay (TURN)NAT NAT
“NAT” = “Network Address Translation” (if unfamiliar, check this Wikipedia article)
…and “peer-to-peer” may be just a “call leg”
WebRTC Client
WebRTC Client
“Middlebox” Server
NAT NAT
Non-WebRTC Client(s)
GatewayWebRTC
Client
NAT
Multipoint Control Unit* Selective Forwarding Unit
Video Conferencing Servers: Transcoding vs. Routing
* Some MCUs do a different “mix” for each client. Others give same version to all.
Client A
Client B
SFU
Client C
A
C
B
B
C
A
C
B
A
Client A
Client B
MCU
Client C
A
B
C
WebRTC Application “Organizational View”
Native or hybrid application logic Web-application logic
WebRTC API(s)in some other programming language(s)
Implementation of the “Web” API part of WebRTC
This API is standardized by the WEBRTC group in W3C(including interactions with other parts of HTML5)
Implementation-specific API
Implementation of the “RTC” mechanisms of WebRTC
These mechanisms are standardized by the RTCWEB group in IETF(NAT traversal, media negotiation, mandatory codecs, and the like)
Underlying platform
1
Peers negotiate media* params, “reserve” data channel(s), if any
• SDP protocol,with “Offer/Answer model”
Peers find and share, how theycan connect over the network
• Based on ICE, STUN and TURN• WebRTC uses Trickle ICE
2
Peers set up a secure connection • Mandatory DTLS-SRTP, not SDES
Peers exchange media*
and data• Media: Mandatory codecs• Data: SCTP over DTLS over UDP• RTP + RTCP, multiplexed
RTC Peer Connectivity: Mechanisms
* Peers also (typically) get access to local media sources; “getUserMedia” in JS API
• Mandatory to implement (MTI) audio codecs• G.711 and OPUS
• Mandatory Comfort Noise (RFC 3389), if not a part of codec
• Mandatory support for audio/telephone-event (RFC 4733)
• Extra codecs (to be) suggested for better interoperability• AMR-WB and AMR (used in mobile terminals; defined by 3GPP)
• G.722 (used in new gen. DECT, IMS services; defined by ITU-T)• https://tools.ietf.org/html/draft-ietf-rtcweb-audio-codecs-for-interop
• In the future, we may see more codecs used with WebRTC
WebRTC Audio
• Standardized video codecs• H.264 Constrained Baseline Profile (CBP) and VP8
• What is mandatory to implement (MTI)?• “WebRTC Browsers”: Both VP8 and H.264 CBP
• “WebRTC Non-Browsers”: Same, but it may be revised in the future
• “WebRTC-compatible endpoints”: Just implement what they need
• Some possible future directions for video in WebRTC• VP9, H.265, extra profiles for H.264. Scalable Video Coding (SVC).
• “Internet Video Codec” from the IETF “NETVC” working group
WebRTC Video
Google Chrome:“WebRTC 1.0”
Mozilla Firefox:“WebRTC 1.0”
Microsoft* Edge:ORTC (Object RTC)
Apple*, and you???WebRTC 1.0? ORTC? “Apple RTC”?
WebRTC in Popular Browsers
* In desktop versions of MS IE and Apple Safari, WebRTC is possible with plug-ins
• Initiative on “Object RTC” (ORTC) *
• Started by Hookflash, embraced by Microsoft and other companies
• Enhancing (not replacing*) JavaScript API of WebRTC• Direct object-oriented control(s) for many (Web)RTC mechanisms
• No reliance on SDP: Alternative mechanisms can be used too
• Controlling media parameters per track
• Compatibility with “WebRTC 1.0” through a JavaScript shim
ORTC: Foundation for WebRTC 1.1?
* Do not confuse it with CU-RTC-Web once proposed by Microsoft: Similar ideas, different details.
Simulcast Scalable Video Coding (SVC)
ORTC Can Be Good for Simulcast and SVC Approaches
Client A
Client B
SFU
Client C
Client A
Client B
SFU
Client C
• Specs are still in drafts (as of April 2015)• Core specs are expected to become final during 2015
• Usage of HTML5 / JS promises, instead of callbacks• Callback-versions from earlier API are preserved too
• Some updates to media constraints
• Placeholders for track-based controls• “Stubs” for RTCRtpSender / RTCRtpReceiver objects from ORTC API
“WebRTC 1.0”: Some of Recent Updates
• More options with media sources and destinations• Screen sharing
• Audio output devices selection API
• Using <audio>, <video>, <canvas> as media stream sources
• Evolution of statistics API and QoS-supportive mechanisms
• Standardized WebRTC APIs for more languages / platforms?• New JSR at some future point? Native .NET API (maybe for ORTC)?
• Better efficiency of using WebRTC on mobile devices
• and yet more… Stay tuned!
WebRTC / ORTC: More Things Coming…
Thank youfor your time
and attention!
Reach out, follow up, stay tuned for more!