- WebRTC Cookbook
- Andrii Sergiienko
- 392字
- 2021-07-23 20:27:06
Introduction
This chapter covers the basic concepts of how to use WebRTC when developing rich media web applications and services.
With simple and short recipes, you will learn how to create your own signaling server. The key data that needs to be exchanged by peers before they establish a direct connection is called the session description—it specifies the peers' configuration. Signaling server is a component in an application's infrastructure that is accessible by all peers and serves to exchange multimedia's session description. The way peers should exchange data is not described by WebRTC standards, so you should make the decision on your own regarding the protocol and mechanism you will use for this task.
You can build a signaling server using any programming language and technology you like. In general, the signaling protocol can be non-technical and is possible to implement in away where the peers would use just a sheet of paper to exchange necessary data between each other. In this chapter, we use WebSocket to implement signaling, although you can use any other protocol.
The signaling stage is represented in the schema that is shown in the following diagram:

In this chapter, you will find two recipes that are dedicated to signaling server development: Building a signaling server in Erlang and Building a signaling server in Java. Java is probably the most popular and known technology, and it would be easy to get into this topic using Java, even if you don't have programming experience with this technology. Erlang is not widely known yet. Nonetheless, this is a very mature technology, very suitable for writing lightweight and extremely fast server applications with perfect scalability. So, by learning signaling server, you will find simple solutions in Erlang as well.
This chapter also covers the basic use case of how to use WebRTC data channels: file transferring and peer-to-peer chat.
You will also learn how to configure and use Session Traversal Utilities for NAT (STUN) and Traversal Using Relays around NAT (TURN) services, and of course, this chapter covers making peer-to-peer calls using WebRTC.
Note that in this chapter, we will cover the process of making computer-to-computer calls. If you want to know more about how to use WebRTC with VoIP and SIP, and how to make phone calls from a web page, refer to the Chapter 3, Integrating WebRTC.
- Learn Type:Driven Development
- C語言程序設(shè)計(jì)(第3版)
- C# 2012程序設(shè)計(jì)實(shí)踐教程 (清華電腦學(xué)堂)
- Learning Spring 5.0
- 深入淺出Serverless:技術(shù)原理與應(yīng)用實(shí)踐
- 劍指Java:核心原理與應(yīng)用實(shí)踐
- Learning OpenStack Networking(Neutron)(Second Edition)
- PLC應(yīng)用技術(shù)(三菱FX2N系列)
- 51單片機(jī)C語言開發(fā)教程
- D3.js By Example
- Python Essentials
- Python語言科研繪圖與學(xué)術(shù)圖表繪制從入門到精通
- 深入實(shí)踐DDD:以DSL驅(qū)動(dòng)復(fù)雜軟件開發(fā)
- C# 7.1 and .NET Core 2.0:Modern Cross-Platform Development(Third Edition)
- Java多線程并發(fā)體系實(shí)戰(zhàn)(微課視頻版)