Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read and how they find the site, so we can improve it (Google Analytics).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

WebRTC Video Stream

  • Widget
  • 296 installs
  • v1.0.0
  • Jun 15, 2026
  • MIT license
  • v4.2+

Plays a live WebRTC stream via WHEP signaling. Sub-second latency, live-only. The WHEP URL is read from a configured data key, with an optional static fallback URL.

Widget Type
  • Latest
Category
  • Video & Cameras
Use Cases
  • Drones
  • Fleet Tracking
  • Health Care
  • Industrial Automation
  • Robotics
  • Smart Building
  • Smart City
  • Smart Farming
  • Smart Home
  • Smart Office
  • Smart Retail

Who it’s for

Security managers, drone operators, and robotics teams ask “what is this device seeing right now, with as little delay as possible?” They need sub-second latency for remote control, incident response, or real-time inspection where the 6–30 second delay of an HLS stream is operationally unacceptable.

What it does

A camera publishing a WHEP endpoint at https://media.example.com/camera1/whep plays live in the dashboard with typical glass-to-glass latency under one second. The widget uses the browser’s native RTCPeerConnection — no plugins required. The trade-off versus HLS is live-only: there is no seeking or VOD playback.

  • Sub-second live video via WHEP signaling over the browser’s native WebRTC stack
  • STUN server support for NAT traversal when the browser and media server are on different networks
  • Pulsing LIVE indicator that can be toggled on to make the real-time nature of the feed visible to operators
  • Fallback URL for when the attribute is empty or the device is offline
  • Shows one stream per widget; add multiple widgets to monitor several cameras simultaneously

How to set up

Data keys

KeyRoleTypeDescription
webrtcStreamUrlStream URLAttributeThe WHEP endpoint URL to connect to; change the key name to match your device’s attribute key

The widget ships with a function datasource key labeled webrtcStreamUrl that returns the placeholder endpoint http://localhost:8889/camera1/whep, so nothing plays until you point the datasource at your device’s own attribute.

To point it at your own device: open the dashboard in edit mode, open the widget’s Datasources, pick the entity or entity alias, and replace the function key with the key your device reports.

If the attribute is empty and no fallback URL is configured, the player shows a blank state.

How to customize

  • To set a fallback stream — enter a Fallback stream URL in the Video streaming settings; this plays when the data key returns an empty value.
  • To configure NAT traversal — set STUN server URL to your STUN/TURN server (e.g. stun:stun.l.google.com:19302) when the browser and media server are separated by NAT.
  • To show a LIVE badge — toggle Show LIVE indicator in the Video streaming settings to display a pulsing badge that confirms the stream is real-time.
  • To control autoplay and mute — toggle Autoplay and Start muted; browsers typically require muted start for autoplay to work.
  • To show or hide player controls — toggle Show video controls in the Video streaming settings.

Tips

  • WebRTC requires the media server to support WHEP signaling; if your camera or streaming server only outputs RTSP or HLS, use an intermediary such as MediaMTX or mediasoup to re-publish as WHEP before connecting this widget.
  • If the stream fails to connect through a corporate firewall, add a TURN relay server in the STUN server URL field — STUN alone cannot traverse symmetric NAT, but a TURN server can.
  • Use this widget instead of the HLS stream widget whenever the use case involves real-time human reaction: remote pan-tilt-zoom control, robot teleoperation, or live security monitoring where a 10-second delay means missing an event.

Share Your Widget with the Community

Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.