Verify decoder integration E2E and fix live metadata probing and mapping
This commit is contained in:
@@ -29,13 +29,18 @@ window.DecoderChannelPlayback = async () => class DecoderChannelPlayback {
|
||||
cancelButton.id = 'decoderPlaybackExit'; cancelButton.textContent = 'Zatrzymaj i wróć do kanałów';
|
||||
cancelButton.style.cssText = 'position:fixed;right:16px;top:72px;z-index:2147483647;background:#252525;color:white;border:1px solid #aaa;border-radius:6px;padding:12px;font:16px system-ui;cursor:pointer';
|
||||
cancelButton.onclick = () => void leave(); document.body.append(cancelButton);
|
||||
let opened = false; const deadline = Date.now() + 25000;
|
||||
let opened = false, opening = false; const deadline = Date.now() + 25000;
|
||||
watcher = setInterval(() => {
|
||||
if (ticket !== generation) return;
|
||||
const video = document.querySelector('video');
|
||||
const player = playbackManager.getCurrentPlayer();
|
||||
if (player?.isLocalPlayer === false) { clearControls(); return; }
|
||||
if (!opened && video && player) { opened = true; void appRouter.showVideoOsd(); }
|
||||
if (!opened && !opening && video?.readyState >= 1 && player) {
|
||||
opening = true;
|
||||
Promise.resolve(appRouter.showVideoOsd()).then(() => { opened = true; })
|
||||
.catch(() => { /* A cancelled/unready native route can be retried. */ })
|
||||
.finally(() => { opening = false; });
|
||||
}
|
||||
if (video?.readyState >= 2 && video.currentTime > 0) return;
|
||||
if (Date.now() >= deadline) { void leave(); toast('Kanał nie przesyła obrazu. Powrót do listy kanałów.'); }
|
||||
}, 250);
|
||||
|
||||
Reference in New Issue
Block a user