Book Image

Getting Started with WebRTC

By : Rob Manson
Book Image

Getting Started with WebRTC

By: Rob Manson

Overview of this book

WebRTC delivers web-based real-time communication and is set to revolutionize our view of what the Web really is. Streaming audio and video from browser to browser, as well as opening raw access to the camera and microphone, is already creating a whole new dynamic web. WebRTC also introduces real-time data channels that will allow interaction with dynamic data feeds from sensors and other devices. This really is a great time to be a web developer! Getting Started with WebRTC provides all of the practical information you need to quickly understand what WebRTC is, how it works, and how you can add it to your own web applications. It includes clear working examples designed to help you get started building your own WebRTC-enabled applications right away. Getting Started with WebRTC will guide you through the process of creating your own WebRTC application that can be applied in a number of different real-world situations, using well documented and clearly explained code examples. You will learn how to quickly and easily create a practical peer-to-peer video chat application, an audio only call option, and how a Web-Socket-based signaling server can also be used to enable real-time text-based chat. You will also be shown how this same server and application structure can easily be extended to include simple drag-and-drop file sharing with transfer updates and thumbnail previews.
Table of Contents (15 chapters)
Getting Started with WebRTC
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Other file-sharing options


As we have discussed, this example application has focused only on sharing one file at a time and on only sharing image files. Extending this functionality to support multiple files at a time and handling non-image files (for example, documents, videos, and so on) would be a great to start extending this application.

Another option to explore is using typed arrays instead of serialized base64 data URLs to send data. This can work in the same way either through the WebSocket API or the RTCDataChannel API, and can add significant efficiencies.

And of course, if you extend this application to support WebRTC communication between more than just two browsers, then you may also like to extend the file sharing, because you could send a file to just one user by dropping the file onto their video stream or to all users if you drop it into the chat area or file list.

On top of this, you can also use WebSockets and RTCDataChannels for sharing interactive drawing spaces and annotations...