You are previewing WebRTC Cookbook.
O'Reilly logo
WebRTC Cookbook

Book Description

Get to grips with advanced real-time communication applications and services on WebRTC with practical, hands-on recipes

In Detail

Using WebRTC, it is easy to develop in-browser applications and web services with extended multimedia features such as audio/video calls, VoIP, screen casting, peer-to-peer file transferring and more, without installing any third-party components/plugins on the client. In this book, you'll explore practical recipes covering the core aspects of application and service development with WebRTC. After a recap of the basics of developing rich media web applications and services, you will delve into core functionalities such as security and SSL, integration with other technologies such as VoIP and SIP, debugging clients and servers, working with filters, native applications for mobile platforms, and using third-party components.

By the end of this book, you will be able set up advanced, real-time, communicating networks with a full understanding of core WebRTC features.

What You Will Learn

  • Understand the concepts of WebRTC while setting up rich web applications

  • Create a signaling server using Java or Erlang

  • Secure your WebRTC application by configuring your own STUN/TURN server

  • Integrate with VoIP platforms such as Asterisk and FreeSWITCH and abstract the complexities of communications protocols

  • Get acquainted with advanced debugging and troubleshooting techniques

  • Process videos using HTML5 filters

  • Develop native mobile applications using WebRTC and integrate them with web services

  • Discover advanced WebRTC techniques and solutions

  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. WebRTC Cookbook
      1. Table of Contents
      2. WebRTC Cookbook
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. Peer Connections
        1. Introduction
        2. Building a signaling server in Erlang
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Building a signaling server in Java
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Detecting WebRTC functions supported by a browser
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Making and answering calls
          1. Getting ready
          2. How to do it…
            1. Making a call
            2. Answering a call
          3. How it works…
          4. There's more…
          5. See also
        6. Implementing a chat using data channels
          1. Getting ready
          2. How to do it…
            1. Creating the main HTML page of the application
            2. Creating the JavaScript helper library
          3. How it works…
          4. There's more…
          5. See also
        7. Implementing a chat using a signaling server
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        8. Configuring and using STUN
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        9. Configuring and using TURN
          1. Getting ready
          2. How to do it…
            1. Installing the TURN server
            2. Using TURN in WebRTC application
          3. How it works…
          4. There's more…
          5. See also
      9. 2. Supporting Security
        1. Introduction
        2. Generating a self-signed certificate
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Configuring a TURN server with authentication
          1. Getting ready
          2. How to do it…
            1. Implementing the client-side code
            2. Implementing the server-side code
          3. How it works…
          4. There's more…
          5. See also
        4. Configuring a web server to work over HTTPS
          1. Getting ready
          2. How to do it…
            1. Configuring Nginx
            2. Configuring Apache
            3. Configuring IIS
          3. There's more…
          4. See also
        5. Configuring a WebSockets proxy on the web server
          1. Getting ready
          2. How to do it…
            1. Configuring Nginx
            2. Configuring Apache
            3. Configuring IIS
          3. How it works…
          4. There's more…
          5. See also
        6. Configuring a firewall
          1. Getting ready
          2. How to do it…
            1. Configuring a firewall on a server
            2. Configuring a firewall on a client
          3. See also
      10. 3. Integrating WebRTC
        1. Introduction
        2. Integrating WebRTC with Asterisk
          1. Getting ready
          2. How to do it…
            1. Installing libSRTP
            2. Installing Asterisk
          3. How it works…
          4. There's more…
          5. See also
        3. Integrating WebRTC with FreeSWITCH
          1. Getting ready
          2. How to do it…
            1. Installing FreeSWITCH
            2. Enabling WebRTC
            3. Starting FreeSWITCH
          3. How it works…
          4. There's more…
          5. See also
        4. Making calls from a web page
          1. Getting ready
          2. How to do it…
            1. Installing sipML5
          3. How it works…
          4. There's more…
          5. See also
        5. Integration of WebRTC with web cameras
          1. Getting ready
          2. How to do it…
            1. Configuring the webcam
            2. Installing WebRTC media server
            3. Time for magic
          3. How it works…
          4. There's more…
      11. 4. Debugging a WebRTC Application
        1. Introduction
        2. Working with a WebRTC statistics API
          1. Getting ready
          2. How to do it…
            1. Checking estimated bandwidth
            2. Checking packet loss
          3. How it works…
          4. There's more…
          5. See also
        3. Debugging with Chrome
          1. Getting ready
          2. How to do it…
            1. Using webrtc-internals
            2. Using Chrome logging mechanism
          3. How it works…
          4. There's more…
          5. See also
        4. Debugging TURN
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Debugging using Wireshark
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      12. 5. Working with Filters
        1. Introduction
        2. Working with colors and grayscale
          1. How to do it…
          2. How it works…
        3. Working with brightness
          1. How to do it…
          2. How it works…
        4. Working with contrast
          1. How to do it…
          2. How it works…
        5. Working with saturation
          1. How to do it…
          2. How it works…
        6. Working with hue
          1. How to do it…
          2. How it works…
        7. Using the sepia filter
          1. How to do it…
          2. How it works…
        8. Using the opacity filter
          1. How to do it…
          2. How it works…
        9. Inverting colors
          1. How to do it…
          2. How it works…
        10. Implementing the blur effect
          1. How to do it…
          2. How it works…
        11. Implementing the dropped shadow effect
          1. How to do it…
          2. How it works…
        12. Combining filters
          1. How to do it…
          2. How it works…
        13. Custom video processing
          1. How to do it…
          2. How it works…
      13. 6. Native Applications
        1. Introduction
        2. Building a customized WebRTC demo for iOS
          1. Getting ready
          2. How to do it…
          3. There's more…
            1. Building a demo project for a iOS simulator
          4. See also
        3. Compiling and running an original demo for iOS
          1. Getting ready
          2. How to do it…
            1. Building a demo project for an iOS device
            2. Building a demo project for an iOS simulator
          3. There's more…
          4. See also
        4. Compiling and running a demo for Android
          1. Getting ready
            1. Preparing the system
            2. Installing Oracle JDK
            3. Getting the WebRTC source code
            4. Installing Android Developer Tools
          2. How to do it…
            1. Running on the Android simulator
            2. Fixing a bug with GLSurfaceView
            3. Running on a physical Android device
          3. There's more…
          4. See also
        5. Building an OpenWebRTC library
          1. Getting ready
          2. How to do it…
          3. There's more…
      14. 7. Third-party Libraries
        1. Introduction
        2. Building a video conference using SimpleWebRTC
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        3. Creating an application using RTCMultiConnection
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        4. Developing a simple WebRTC chat using PeerJS
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        5. Making a simple video chat with rtc.io
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        6. Using OpenTok to create a WebRTC application
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        7. Creating a multiuser conference using WebRTCO
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
      15. 8. Advanced Functions
        1. Introduction
        2. Visualizing a microphone's sound level
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Muting a microphone
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Pausing a video
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Taking a screenshot
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Streaming media
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      16. Index