You are previewing Real-Time Communication with WebRTC.
O'Reilly logo
Real-Time Communication with WebRTC

Book Description

Deliver rich audio and video real-time communication and peer-to-peer data exchange right in the browser, without the need for proprietary plug-ins. This concise hands-on guide shows you how to use the emerging Web Real-Time Communication (WebRTC) technology to build a browser-to-browser application, piece by piece. The authors’ learn-by-example approach is perfect for web programmers looking to understand real-time communication, and telecommunications architects unfamiliar with HTML5 and JavaScript-based client-server web programming.

Table of Contents

  1. Preface
    1. Conventions Used in This Book
    2. Using Code Examples
    3. Safari® Books Online
    4. How to Contact Us
    5. Acknowledgments
  2. Dedication
  3. 1. Introduction
    1. Web Architecture
    2. WebRTC Architecture
    3. WebRTC in the Browser
    4. Signaling
    5. WebRTC API
      1. PeerConnection
      2. MediaStream
      3. Data Channel
    6. A simple example
  4. 2. Handling Media in the Browser
    1. WebRTC in Ten Steps
    2. Media Capture and Streams
      1. MediaStreams API
      2. Obtaining local multimedia content
      3. URL
    3. Playing with the <code xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg" class="literal">getUserMedia()</code> API API
    4. The media model
      1. Media Constraints
      2. Using constraints
  5. 3. Building the Browser RTC Trapezoid: A Local Perspective
    1. Using PeerConnection Objects Locally: An Example
      1. Starting the application
      2. Placing a call
      3. Hanging up
    2. Adding a Data Channel to a local Peer Connection
      1. Starting up the application
      2. Streaming text across the Data Channel
      3. Closing the application
  6. 4. The Need for a Signaling Channel
    1. Building up a Simple Call Flow
    2. Creating the Singaling Channel
    3. Joining the Signaling Channel
    4. Starting a Server-Mediated Conversation
    5. Keeping on chatting across the channel
    6. Closing the signaling channel
  7. 5. Putting it All Together: Your First WebRTC System From Scratch
    1. A Complete WebRTC Call Flow
    2. Channel Initiator Joining the Channel
    3. Channel Joiner Joining the Channel
    4. Channel Initiator Starting Negotiation
    5. Channel Joiner managing Initiator’s Offer
    6. ICE Candidates Exchanging
    7. Channel Joiner’s Answer
    8. Going Peer-to-Peer!
      1. Using the data channel
    9. A Quick Look at Chrome WebRTC Internals Tool
  8. About the Authors
  9. Copyright