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, how they find the site and where they get stuck, so we can improve it (Google Analytics, Microsoft Clarity).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, LinkedIn, Meta, 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

Multi-camera view

  • Widget
  • 5 installs
  • v1.0.0
  • Nov 30, 2026
  • MIT license
  • v4.2+

Shows several live camera streams in one grid and enlarges any camera with a click while the others keep playing. A CCTV camera wall for security and operations dashboards: each camera is an entity with its stream address in one data key, played over WebRTC (WHEP), HLS or FLV, detected from the address. RTSP and ONVIF cameras play through a gateway such as MediaMTX or go2rtc. A camera that goes down shows an offline placeholder, not a frozen frame, and reconnects on its own.

Widget Type
  • Latest
Category
  • Video & Cameras
Use Cases
  • Industrial Automation
  • Smart Building
  • Smart Home

Who it’s for

A security or operations person who watches four to sixteen cameras on one site: a warehouse, a shop, a server room. They keep one screen open and ask two questions all day: what is happening at each camera right now, and is any camera down? Most of the time they glance at the whole wall. When something moves at the loading dock, they want that camera big without losing sight of the others.

What it does

Bind an alias of your four warehouse cameras and you get a 2×2 live wall; click Loading dock and it fills the widget while the other three keep playing in a strip beside it.

  • Fills the whole widget with cameras: rows and columns stretch to the widget’s size, and the last row’s tiles widen so no cell is left empty. It picks the column count that shows the pictures largest, and uses one column on a phone.
  • Enlarges a camera on click (or Enter). The others move to a strip on the right on wide widgets, below on narrow ones, and share the strip’s full length. All cameras, Escape or a click on the enlarged camera returns to the grid. Switching never reconnects a stream.
  • Plays WebRTC (WHEP), HLS and FLV, and picks the protocol per camera from its address, so one wall can mix gateways.
  • Shows each camera’s state with a colored stripe and a status line: Live, Connecting…, Offline, Blocked, Bad address, No address, Not supported.
  • Replaces a camera that is down with an offline card that says why in plain words, never a frozen frame. A stream that stops delivering frames is detected after the no-picture timeout, even when the connection itself stays open.
  • Reconnects offline cameras on its own at a set interval; Retry now reconnects one camera immediately.
  • Saves bandwidth on HLS: when the stream offers several qualities, each tile loads the one that fits its size.
  • Downloads the HLS and FLV players only when a camera uses them. A WebRTC-only wall downloads nothing extra.

It does not:

  • Play RTSP or ONVIF directly. Browsers can’t, so the cameras need a gateway such as MediaMTX, go2rtc or SRS that republishes them as WebRTC, HLS or FLV.
  • Play sound. All cameras are muted.
  • Record, play back footage, control pan, tilt and zoom, take snapshots, discover cameras or cycle cameras automatically.
  • Send login credentials or tokens in request headers. A token works only as part of the stream address, for example in the query string.
  • Hide stream addresses. The browser opens them, so anyone who can open the dashboard can find them.
  • Configure STUN or TURN servers. WebRTC works when the browser can reach the gateway directly (same network, VPN) or when the gateway announces a public address.

How to set up

Data keys

Key Role Type Description
Any name, for example streamUrl Stream address of one camera Server or shared attribute, time series, or entity field The full address the browser opens: a WHEP endpoint, an .m3u8 playlist or an .flv stream. Every key you add is one camera.

If you already use the WebRTC, HLS or FLV Video Stream widget, add the same key it reads; the addresses work here unchanged.

The widget only reads. It never writes to the key.

Datasource

  1. Create an entity alias that returns your cameras, for example all devices of type camera or all devices related to a site asset.
  2. Add a widget datasource of type Entity with that alias, and add the stream key.
  3. Give each camera entity a label. The tile shows the label, or the entity name when there is no label.

Each entity becomes one camera, in the order the alias returns them. If one device holds several streams (an NVR with gate, dock and yard attributes), add all three keys: each key becomes a camera named gate (NVR 1), using the key’s label.

The default configuration plays three public Caltrans traffic cameras over HLS and one deliberately unreachable camera, so you can see live tiles and the offline card before connecting your own cameras. Public traffic cameras go offline from time to time; when one does, its tile shows the offline card, which is the widget working as intended. The demo video comes straight from Caltrans’ servers, which see each viewer’s IP address, as with any stream the widget plays.

Stream addresses by gateway

Gateway WebRTC (WHEP) HLS FLV
MediaMTX https://host:8889/cam1/whep https://host:8888/cam1/index.m3u8 —
go2rtc https://host:1984/api/webrtc?src=cam1 https://host:1984/api/stream.m3u8?src=cam1 https://host:1984/api/stream.flv?src=cam1
SRS https://host:1985/rtc/v1/whep/?app=live&stream=cam1 https://host:8080/live/cam1.m3u8 https://host:8080/live/cam1.flv

Ports are the gateways’ defaults; yours may differ.

Edge cases

  • Mixed content: a dashboard opened over https can’t play an http:// or ws:// stream. The tile says Blocked. Serve the stream over https or wss, or put the gateway behind the same reverse proxy as ThingsBoard.
  • CORS: the gateway must allow requests from your ThingsBoard address. A refused request looks the same to the browser as an unreachable server, so the tile says it can’t reach the stream server and names both causes.
  • Empty value: the tile shows No address with a neutral stripe, so a camera that isn’t configured yet doesn’t look like an alarm.
  • rtsp:// or other text: the tile shows Bad address. Republish the camera through a gateway and store the gateway’s address instead.
  • Address without .m3u8 or .flv: it is treated as a WebRTC WHEP endpoint. If your HLS or FLV addresses don’t end that way, set Protocol to the protocol they use.
  • Address changes: when the key’s value changes, only that camera reconnects.
  • Restricted networks: HLS and FLV need cdn.jsdelivr.net once to download the player. If it is blocked, those tiles say so; WebRTC still works.
  • Hidden browser tab: checks pause while the tab is hidden and restart cleanly when you come back, so a background tab doesn’t mark cameras offline.

How to customize

  • To force one protocol for every camera — open Playback and set Protocol to WebRTC (WHEP), HLS or FLV. Keep Detect from address when your addresses end in .m3u8 or .flv, or are WHEP endpoints.
  • To mark a frozen camera offline sooner or later — change No-picture timeout (5 to 120 seconds, default 15). The same time limits the first connection.
  • To reconnect offline cameras more or less often — change Retry interval (3 to 600 seconds, default 10).
  • To lay out 4:3 cameras well — set Picture shape to 4:3. The grid then picks the column count that shows 4:3 pictures largest.
  • To fill each cell edge to edge — set Picture fit to Fill the tile. A picture whose shape differs from its cell loses its edges; Show the whole picture keeps them and adds black bars.
  • To show only the pictures — turn off Show camera names. The status stripe on the left of each tile stays.
  • To change the state colors — set Live color, Connecting color and Offline color under Colors. The offline color also marks blocked, unsupported and bad addresses.
  • To change how camera names look — set Camera name font under Fonts.
  • To change the background or text color — use the widget’s own Background color and Text color; secondary text and borders follow the text color, and dark dashboards work without extra settings.

Tips

  • On a laptop, four to nine live cameras play comfortably. For more, use each camera’s low-resolution sub-stream, or HLS with several qualities so small tiles load small video.
  • WebRTC gives the shortest delay, under a second. HLS runs several seconds behind, which matters when you watch a door open in real time.
  • Turn on the widget’s fullscreen button for a wall display; the grid resizes to fill the screen.

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.