Multi-camera dashboard
Multi-camera dashboard
Scope and prerequisites
Show several cameras on one page. Start from the device list and tenant checks in Integrate in a SaaS. Do not open every HD stream at login.
Steps
- Sync inventory with Paged device detail.
pageSizeis 1–50. Map each device to a site. Sync again after bind or unbind. - Cap how many cells play at once, for example 4 or 9. That cap is your product limit, not a platform guarantee. Fetch a stream when the user puts a camera in a cell, and stop playback when the cell is cleared.
- Check tenant access before each cell opens. Mint credentials only for cells that are playing. Do not mint one for every camera in the side list.
- Prefer
getKitTokenplus ImouPlayer for web cells. Use bindDeviceLive when a cell needs HLS. DefaultstreamIdto1. Switch that one cell to0when the user focuses it. - A
kitTokenlasts about two hours. Cache it on the server for about one hour. Reuse it for the same tenant and camera inside that window. Do not send one token to another tenant. Key the cache by tenant and camera. - Destroy or pause the player when a cell closes, the page is hidden, or the route changes. An invisible HD stream still uses quota and CPU.
Check quota in My Resources. Show talk and PTZ only when the device supports them.
Capacity
Use this to plan a wall. It is not a service commitment. Measure on your network with real devices.
- SD tiles plus one HD tile is the usual pattern: SD on the wall, HD on the camera in focus.
- Opening a dozen HD streams at login often fails on an office link. Do not make that the default.
- Prefetching every live address at page load lets addresses expire before anyone watches them.
