WebRTC: Everything You Wanted To Know But Were Afraid To Ask

0bc29a0e5e6fc84e02620dbb2d562ae5?s=47 Ben Klang
February 17, 2016

WebRTC: Everything You Wanted To Know But Were Afraid To Ask

Presented at Asterisk Africa 2016

WebRTC is a huge opportunity to bring real-time voice, video, and text to the developers changing the world today. We're not just talking about traditional telecom development; we're talking about the web and mobile developers that are building businesses from startups to enterprises. However, as approachable as WebRTC is, it's still often misunderstood. This talk is a practical overview of WebRTC, answering the questions:
* What is WebRTC? What technologies comprise it?
* What does a typical WebRTC deployment look like? What client and server pieces are necessary? What is the "Hello World" of WebRTC?
* What options do I have to take advantage of WebRTC today with little to no development effort?
* What choices do developers have for sending voice, video, text, and data? What libraries and services exist, and what can they provide?
* What is signaling vs. media? What control do I have over the quality of my audio & video?

0bc29a0e5e6fc84e02620dbb2d562ae5?s=128

Ben Klang

February 17, 2016
Tweet

Transcript

  1. WebRTC Everything you wanted to know… but were afraid to

    ask 1
  2. CAN YOU SPEAK MAGIC? Ben Klang 2

  3. CAN YOU SPEAK MAGIC? WebRTC How it works How it

    breaks How we fixed it 3
  4. CAN YOU SPEAK MAGIC? WHAT WEBRTC IS •Javascript access to

    Camera and Mic •High Quality Video & Audio Codecs •Techniques for traversing NAT •Peer-to-Peer •A Data Channel •A Tool for Developers 4
  5. CAN YOU SPEAK MAGIC? WHAT WEBRTC IS NOT •…a Polished

    End-User Product •…required to interop…but may •…the same thing to every application •…finished. 5
  6. CAN YOU SPEAK MAGIC? WHAT WEBRTC IS NOT •…a Polished

    End-User Product •…required to interop…but may •…the same thing to every application •…finished. 5 But don’t sweat it
  7. CAN YOU SPEAK MAGIC? IS WEBRTC READY YET? 6 IsWebRtcReadyYet.com

  8. CAN YOU SPEAK MAGIC? Communication Topology 7

  9. CAN YOU SPEAK MAGIC? Alice Bob The Trapezoid 8

  10. CAN YOU SPEAK MAGIC? Alice Bob The Triangle 9

  11. CAN YOU SPEAK MAGIC? The WebRTC Triangle Alice Bob Signaling

    Media 10
  12. CAN YOU SPEAK MAGIC? The WebRTC Triangle Alice Bob Signaling

    Media 10
  13. CAN YOU SPEAK MAGIC? WebRTC Infrastructure 11

  14. CAN YOU SPEAK MAGIC? http:// Signaling 12

  15. CAN YOU SPEAK MAGIC? http:// Signaling 12

  16. CAN YOU SPEAK MAGIC? http:// Signaling STUN & TURN NAT

    Traversal 12
  17. CAN YOU SPEAK MAGIC? http:// Signaling STUN & TURN SFU

    or MCU NAT Traversal Larger Multiparty Video Conferences 12
  18. CAN YOU SPEAK MAGIC? http:// Signaling Recording Conferencing PSTN Gateway

    STUN & TURN SFU or MCU NAT Traversal Larger Multiparty Video Conferences 12
  19. CAN YOU SPEAK MAGIC? WEBRTC SIGNALING •Can be anything you

    like 13 http://
  20. CAN YOU SPEAK MAGIC? WEBRTC SIGNALING •Can be anything you

    like •Select based on application requirements •Integrate with existing or greenfield? •Federate? Or Not? •Anonymity or
 Real Names? 13 http://
  21. CAN YOU SPEAK MAGIC? 14 Alice Bob http://

  22. CAN YOU SPEAK MAGIC? 14 H ave Bob call m

    e here! SDP :
 v=0 o=alice 20518 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 54609 RTP/SAVPF 109 Alice Bob http://
  23. CAN YOU SPEAK MAGIC? 14 H ave Bob call m

    e here! SDP :
 v=0 o=alice 20518 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 54609 RTP/SAVPF 109 Bob is at: SDP :
 v=0 o=bob 19915 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 61001 RTP/SAV PF 109 Alice Bob http://
  24. CAN YOU SPEAK MAGIC? 14 H ave Bob call m

    e here! SDP :
 v=0 o=alice 20518 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 54609 RTP/SAVPF 109 Bob is at: SDP :
 v=0 o=bob 19915 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 61001 RTP/SAV PF 109 Alice Bob http://
  25. CAN YOU SPEAK MAGIC? 14 H ave Bob call m

    e here! SDP :
 v=0 o=alice 20518 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 54609 RTP/SAVPF 109 Bob is at: SDP :
 v=0 o=bob 19915 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 61001 RTP/SAV PF 109 Alice Bob http://
  26. CAN YOU SPEAK MAGIC? 14 H ave Bob call m

    e here! SDP :
 v=0 o=alice 20518 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 54609 RTP/SAVPF 109 Bob is at: SDP :
 v=0 o=bob 19915 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 61001 RTP/SAV PF 109 Alice Bob http://
  27. CAN YOU SPEAK MAGIC? ICE/STUN/TURN 15

  28. CAN YOU SPEAK MAGIC? 17 H ave Bob call m

    e here! SDP :
 v=0 o=alice 20518 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 54609 RTP/SAVPF 109 Bob is at: SDP :
 v=0 o=bob 19915 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 61001 RTP/SAV PF 109 Alice Bob http://
  29. CAN YOU SPEAK MAGIC? 17 H ave Bob call m

    e here! SDP :
 v=0 o=alice 20518 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 54609 RTP/SAVPF 109 Bob is at: SDP :
 v=0 o=bob 19915 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 61001 RTP/SAV PF 109 Alice Bob SRTP SRT http://
  30. CAN YOU SPEAK MAGIC? 17 H ave Bob call m

    e here! SDP :
 v=0 o=alice 20518 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 54609 RTP/SAVPF 109 Bob is at: SDP :
 v=0 o=bob 19915 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 61001 RTP/SAV PF 109 Alice Bob SRTP SRT http://
  31. CAN YOU SPEAK MAGIC? 17 H ave Bob call m

    e here! SDP :
 v=0 o=alice 20518 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 54609 RTP/SAVPF 109 Bob is at: SDP :
 v=0 o=bob 19915 0 IN IP4 0.0.0.0 s=- t=0 0 m =audio 61001 RTP/SAV PF 109 Alice Bob SRTP SRT X http://
  32. CAN YOU SPEAK MAGIC? That’s how it works 18

  33. CAN YOU SPEAK MAGIC? Here’s how it breaks 19

  34. CAN YOU SPEAK MAGIC? ENVIRONMENTAL 20 •Microphone or Speakers Muted

    •Too Dark or Too Backlit •HW or Driver Issues •USB Headsets •I’m looking at you, Windows •https://test.webrtc.org/
  35. CAN YOU SPEAK MAGIC? USABILITY PROBLEMS •Failing to deploy TLS

    Cert •Not allowing user- controlled device selection •Video element rendered
 off-screen •<video> or <audio> paused 21
  36. CAN YOU SPEAK MAGIC? BROWSER PROBLEMS •Spec still evolving •…though

    1.0 is near •Still no native Safari support :( •MUCH more stable than 1 year ago •Chrome dropped non-TLS HTTP • https://webrtcstandards.info/ •Well, Everybody Better
 Restart Their Chrome 22
  37. CAN YOU SPEAK MAGIC? SOLVING BROWSER INCOMPAT •Use a “polyfill”

    - Adapter.js •https://github.com/webrtc/adapter •IE & Safari: deploy Temasys •http://skylink.io/plugin/ •Pick a great WebRTC service provider 23
  38. CAN YOU SPEAK MAGIC? WEBRTC PROBLEMS & SOLUTIONS •Environmental Problems

    •Change the environment •Guide the user - detect low audio, video •Usability Problems •Deploy TLS Certs!!! •Test, test, test •Browser Compat & Infrastructure Problems •Lean on someone who has already fixed it 24
  39. CAN YOU SPEAK MAGIC? @bklang bklang@adhearsion.com http://adhearsion.com @Adhearsion LINKS &

    QUESTIONS •https://test.webrtc.org/ •https://webrtcstandards.info/ •https://iswebrtcreadyyet.com •https://github.com/webrtc/adapter •http://skylink.io/plugin/ •https://wiki.asterisk.org/wiki/display/AST/ Asterisk+WebRTC+Support 25