fix(cctv): label a refused viewer's frame fallback instead of the live row

/frame now keeps a pullable HLS camera's shared health, so a viewer
refused for capacity saw its placeholder or Street View frame under the
live row's LIVE · OK badge and "Live HLS connected". When a video camera
is shown on its frame fallback while the row says live, the panel badge
now reads FALLBACK · DEGRADED and the meta line drops the live message;
the shared row stays as it is for the other viewers.
This commit is contained in:
German Khokhlov committed 2026-11-20 12:29:50 +04:00
1 parent 0bebd59b69
commit 58d2c23860
5 files changed
+113 -7

No files matched your search

+9 -4
View File
@@ -1,5 +1,9 @@
import { getLocale, keepCodesWithValues, msg, t, tn } from '../i18n/index.js';
import { cctvSourceLabelText, cctvSourceMessageText } from './cctvFrames.js';
import {
cctvSourceLabelText,
cctvSourceMessageText,
isCctvLiveFrameFallback,
} from './cctvFrames.js';
import { createCctvVideoSurface } from './cctvVideo.js';
import { presentCctvCalibration } from './cctvCalibration.js';
@@ -96,9 +100,10 @@ function metaText(state, enabled, activeCamera, catalogCount) {
const provider = cctvSourceLabelText(
activeCamera.sourceLabel || activeCamera.provider || 'Configured Source',
);
const statusMsg = activeCamera.sourceMessage
? ` · ${cctvSourceMessageText(activeCamera.sourceMessage)}`
: '';
const statusMsg =
activeCamera.sourceMessage && !isCctvLiveFrameFallback(activeCamera)
? ` · ${cctvSourceMessageText(activeCamera.sourceMessage)}`
: '';
// A partner-supplied feed inside a pack names its owner here.
const credit = activeCamera.credit ? ` · ${activeCamera.credit}` : '';
const calBadge = activeCamera.calBadge