demo console: polled frames and the real stats field names
The camera used an MJPEG stream through the proxy and the engine's stats under names it does not use (frames/faces rather than frames_processed/faces_seen), so the picture was blank and the counter read zero. The engine re-serves its latest frame until the pipeline produces a new one, so a polled still is the same picture with none of the multipart fragility - which matters when the audience is in the room. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGcjxF1cNLcuwc3DAPcnfj
This commit is contained in:
@@ -230,11 +230,18 @@ async function tick(){
|
||||
setPill('#d-cloud','#t-cloud', s.cloud_ok ? 'ok' : 'bad', s.cloud_ok ? 'cloud connected' : 'cloud unreachable');
|
||||
$('#camname').textContent = cam ? cam.id : '';
|
||||
|
||||
if (cam && cam.connected && camStarted !== cam.id){
|
||||
camStarted = cam.id;
|
||||
$('#feed').src = '/camera.mjpeg?id=' + encodeURIComponent(cam.id);
|
||||
$('#feed').style.display = 'block'; $('#feednone').style.display = 'none';
|
||||
$('#camtag').style.display = 'block'; $('#camtag').textContent = cam.id;
|
||||
if (cam && cam.connected){
|
||||
if (camStarted !== cam.id){
|
||||
camStarted = cam.id;
|
||||
$('#feed').style.display = 'block'; $('#feednone').style.display = 'none';
|
||||
$('#camtag').style.display = 'block';
|
||||
// A polled still rather than an MJPEG stream: the engine re-serves its
|
||||
// latest frame anyway, and a multipart stream through a proxy is one
|
||||
// more thing to fail in front of an audience.
|
||||
setInterval(() => { $('#feed').src = '/camera.jpg?id=' +
|
||||
encodeURIComponent(camStarted) + '&t=' + Date.now(); }, 350);
|
||||
}
|
||||
$('#camtag').textContent = cam.id + (cam.tracks ? ` · ${cam.tracks} in frame` : '');
|
||||
}
|
||||
|
||||
const e = (s.chain||[])[0];
|
||||
|
||||
Reference in New Issue
Block a user