Nabto Edge WebRTC

WebRTC is a protocol designed to establish a connection between two peers and enable real time communication between them. WebRTC was designed for web browsers, so it integrates natively with most browsers but is also available on other platforms, e.g. in native apps. Real time communication is often desired when streaming multimedia feeds. Hence, WebRTC is primarily designed for this purpose, focusing on multimedia streaming. However, it also includes data channels for general data transfers.

To lower the latency, WebRTC aims to establish a direct peer-to-peer connection between the two peers. This type of connection is similar to the one used in the Nabto Edge Platform; we can utilize this to enable Nabto Edge connections in web browsers.

Why use WebRTC in video cameras and similar products?

WebRTC is a modern protocol designed for high performance in video scenarios. While initially intended for browser-to-browser communication, it works really well also for viewing a video feed from e.g. a camera or DVR, e.g. in a browser or mobile app: The design for very low latency is a great benefit in live surveillance cameras and the feed is not sensitive to network issues due to being UDP based.

It all works with standard player components, ie no proprietary low level video integration is necessary. So whenever possible, it is recommended to use WebRTC over alternatives like tunnelled RTSP. After the introduction of Nabto Edge WebRTC, we now only recommend video streaming through TCP tunnelling for really primitive platforms where no modern C++ toolchain is available.

Two-way audio is supported by the WebRTC standard and by most player components, including those provided by Nabto.

WebRTC Signaling Through Nabto Edge

To establish its real time connection, WebRTC must send signaling messages between the peers. These messages must be sent on some other connection already established between the peers. This signaling connection, a signaling protocol to use, and the security implications of this separate connection is all part of the Nabto Edge platform. Nabto Edge WebRTC also handles a lot of the boiler plate implementation for using WebRTC in both clients and the embedded device.

Nabto Edge WebRTC makes it possible to get full access the embedded Nabto Edge device from a website. WebRTC is also fully supported on mobile platforms, where WebRTC is now replacing TCP tunnels as the preferred way to stream live audio and video as live streaming will generally see improved latency using the UDP-based WebRTC. While not needed to start using Nabto Edge WebRTC, you can gain a deeper understanding of WebRTC from our WebRTC guide.

To establish a WebRTC connection between two peers, they must be able to negotiate it over the signaling connection. Nabto Edge utilizes its streaming feature to create a signaling channel between the client and the device. Nabto Edge Streaming is not possible directly from web browsers, so the Nabto Edge Cloud provides a websocket service which browsers can use instead.

With Nabto Edge a WebRTC connection starts with a client making a Nabto connection to a device through the Nabto Cloud Basestation. When the Nabto Connection is established, it is used to as a Signaling Connection to finally establish the WebRTC connection. A detailed description of how Nabto Edge integrates with WebRTC see the Nabto WebRTC guide.

The signaling stream and all the connection establishment negotiation is handled in the Nabto provided libraries for Embedded Devices, Web Browsers, Android, and iOS