Skip to main content
All CollectionsLive Feeds and Recordings
Local Streaming with WebRTC
Local Streaming with WebRTC

Learn about the benefits of local streaming with WebRTC, including information about local TURN servers, and configuring WebRTC settings.

Updated this week

💡 At a Glance

Local streaming with WebRTC allows you to view live video and audio directly over your local network (LAN) to minimize latency, enhance privacy and security, and reduce bandwidth constraints. A local TURN server can assist in relaying streams when direct connections are blocked by firewalls or NAT.

⚡ Key Tasks

  • Enable WebRTC Streaming
    In the Coram web app, go to Settings > Controls, then either enable WebRTC for all cameras or set it manually per camera. For individual cameras, navigate to Devices, select a camera’s Settings, and toggle on WebRTC Streaming.

  • Configure Local TURN Server (if needed)
    If direct connections fail due to firewall or NAT settings, set up a local TURN server on your LAN to relay streams. Ensure your network allows traffic on UDP port 3478 and any additional relay ports required by your TURN configuration.

  • Test Your Setup
    Verify that required ports are open, navigate to a camera with WebRTC enabled, and check for a “LOCAL STREAMING” label to confirm successful configuration.

For detailed information, keep reading below.

Overview

Local streaming with with Web real-time communication (WebRTC) lets you view live video and audio directly over your local network, without relying on an internet connection or external servers. By leveraging WebRTC, you minimize latency, keep data private, and ensure smooth, real-time communication between devices on the same local area network (LAN).

WebRTC

WebRTC is a technology that lets you share audio, video, and data between browsers and devices in real time, without the need for extra plugins. It also creates direct peer-to-peer (P2P) connections whenever possible, which reduces latency and improves performance.

Local Streaming

Local streaming with WebRTC refers to using WebRTC within the same LAN. Because the traffic never leaves your LAN, you get lower latency, enhanced privacy and security, and fewer bandwidth constraints. Local streaming also doesn't rely on third-party TURN or STUN servers.

Local TURN Servers

When your browser or camera attempts to establish a direct P2P connection with another device on the LAN (using WebRTC), it can be restricted by a firewall or network address translation (NAT). A local TURN server is a configurable piece of software that solves this issue and bypasses these restrictions. It acts as an intermediary, relaying video, audio, and data streams between devices in real-time, all within the your LAN. TURN servers are also configured to use specifically-allowed ports (for example, UDP/TCP 3478), ensuring compatibility with most firewall rules.

Note: To ensure a local TURN server works properly, configure your network to allow traffic on the following ports:

  • UDP 3478:

    • Enable bidirectional traffic between the camera’s network and the user’s network.

    • If your firewall blocks inbound UDP, then open and forward UDP port 3478.

  • Relay ports, if applicable:

    • Some TURN server configurations use additional UDP/TCP ports for relaying.

    • If your local TURN server requires extra ports, open these in your firewall and NAT settings.

Enabling WebRTC for cameras in the Coram Web App

You can enable WebRTC streaming for all cameras added to your organization, or on a camera-by camera basis.


To enable WebRTC streaming:

  1. Access the Coram web app and sign in to your account.

  2. In the top-right corner of the page, click the dropdown arrow ( ▼ ), then select Settings.

    A screenshot that shows the location of the Account Menu dropdown arrow.

  3. In the Settings sub-menu, click Controls, then find WebRTC Streaming.

    A screenshot that shows the Controls button and the WebRTC Streaming setting.

  4. Do one of the following:

    • To enable WebRTC for all the cameras added to your organization, from the dropdown menu, select Enable WebRTC for all cameras, then click Update.

    • To enable WebRTC on a camera-by-camera basis:

      1. From the dropdown menu, select Manually set WebRTC for each camera, then click Update.

      2. From the main navigation menu, click Devices.

        The Cameras tab appears by default.

      3. From the list of cameras, find the camera you want to update and click the corresponding Settings button.

      4. For WebRTC Streaming, ensure the toggle switch is enabled.

        Changes are saved automatically.

Testing Your Setup

  1. Confirm that your ports are open. If you have a firewall or NAT, verify that UDP 3478 and any additional relay ports are accessible.

  2. On the Coram web app, navigate to a camera that has WebRTC enabled.

  3. Check the live stream status. If everything is configured correctly, a green Local Streaming label appears above the camera feed.

    A screenshot that shows the location of the Local Streaming label.

Best Practices

  • Use Strong Authentication: If your TURN server supports credentials, set a strong username and password to prevent unauthorized access.

  • Keep Firmware Updated: Ensure your cameras and devices have the latest software and firmware updates for optimal WebRTC performance.

  • Monitor Network Activity: Regularly check bandwidth usage to prevent congestion on your LAN.

By following these steps and using a local TURN server, you can optimize performance, maintain privacy, and enjoy seamless live streaming with Coram.

Did this answer your question?