From 2efcdb23167dc8c5644fb2dde2bdeba94455776f Mon Sep 17 00:00:00 2001 From: jetson Date: Tue, 13 Oct 2026 10:47:44 +0700 Subject: [PATCH] fix: hide 'Waiting for first frame' placeholder once MJPEG delivers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No load handler existed — placeholder overlay (absolute inset:0) stayed on top of the live stream forever. Hide on img load; toggle OFF already re-shows it. --- static/app.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/static/app.js b/static/app.js index 9c885ee..6c0988b 100644 --- a/static/app.js +++ b/static/app.js @@ -450,6 +450,15 @@ function initStatusPage(jobId, initialStatus) { var liveBoxUnloading = document.getElementById('live-box-unloading'); var liveBoxNet = document.getElementById('live-box-net'); + // Hide the placeholder once the MJPEG stream delivers its first frame. + // The overlay sits on top of the img, so it must be removed, not just + // hidden behind it. Toggling OFF re-shows it via the change handler. + if (livePreviewImg) { + livePreviewImg.addEventListener('load', function () { + if (previewPlaceholder) previewPlaceholder.style.display = 'none'; + }); + } + if (previewToggle) { previewToggle.addEventListener('change', function() { if (this.checked) {