diff --git a/stream/index.html b/stream/index.html index d6cbf68..623bd4f 100644 --- a/stream/index.html +++ b/stream/index.html @@ -102,7 +102,7 @@
-
Préchargement
+
Connexion en cours
@@ -182,12 +182,14 @@ const r = await fetch("/ingest/status", { cache: "no-store" }); const s = await r.json(); const ready = Number(s.ready) || 0; - const prefetch = Number(s.prefetch) || 0; - if (prefetch > 0 && ready >= prefetch) { + const prefetch = Number.isFinite(Number(s.prefetch)) ? Number(s.prefetch) : -1; + if (prefetch >= 0 && ready >= prefetch) { bufferFull = true; npLabel.textContent = "en cours"; + } else if (prefetch >= 0) { + npLabel.textContent = `Préchargement ${ready}/${prefetch}`; } else { - npLabel.textContent = `Préchargement ${ready}/${prefetch || "…"}`; + npLabel.textContent = "Connexion en cours"; } } catch (e) { /* keep last known label */ } }