Live Updates
A view keeps itself current, in one of two ways:
-
Still images — while the application behind the view takes one picture at a time, Cockpit tells the browser when the picture has changed, and the browser fetches the new one.
-
Live view — while a camera streams its images, the view shows the stream itself: frame after frame as they arrive, marked LIVE beside the view’s name.
The view switches between the two by itself. You do not choose.
Still images
While a view is open, Cockpit watches the application behind it and tells the browser when the picture has changed; the browser then fetches the new frame.
Cockpit looks about five times a second and speaks at most twice a second, which bounds what a fast-cycling station costs. Nothing is missed by that, because the browser always fetches the newest frame rather than a queue of old ones.
A view that is not visible stops asking, so background tabs cost nothing.
Live view
A view turns live when the camera behind it streams: when LumiScan Cam Driver’s
control/publish/execute has started the stream for that camera (see the Cam Driver’s manual,
"Streaming Images"). The
view of an AI Object Matching module turns live when the module infers on camera streams; it then
shows the frames of the camera its latest result came from, with the module’s boxes drawn on them (see
Viewing Results).
-
The frames are sent as JPEG, at most at the frame rate set in the live view settings, with the overlays drawn on them.
-
When frames arrive faster, the newest one is shown and the others are skipped: a view never lags behind the camera.
-
When the stream stops, the view goes back to still images within about a second, showing the last picture the camera published.
Cockpit receives a camera’s stream only while a live view of it is open, and encodes each frame once, however many tabs or windows show the same view. When the last of them closes or leaves the view, this stops about ten seconds later; a reload in between does not restart it.
Live view settings
The gear (⚙) at the top of every page opens the live view settings:
| Setting | Range | Default | What it does |
|---|---|---|---|
Frames per second, at most |
1 to 30 |
10 |
How often each live view is encoded and sent. Lower values save processor time on the device (controller or PC) and network bandwidth. |
JPEG quality |
50 to 95 |
85 |
How sharp each frame is. Lower values make smaller frames. |
Save applies the settings at once to the next frame of every live view, wherever it is open. They are
kept in Cockpit’s settings file (the liveView section) and survive a restart.
When live or streaming is not available
Eight views may stream at once — still images or live. Beyond that, a view falls back to re-fetching its image every two seconds. The same fallback applies if the connection through a proxy does not allow streaming.
Four live views may be open at once, counting every tab and window. Beyond that, a live view shows still images instead and tries again every five seconds.
The picture stays correct either way — it just arrives later.