diff --git a/static/app.js b/static/app.js index 94de47a..0d63bb4 100644 --- a/static/app.js +++ b/static/app.js @@ -67,10 +67,10 @@ function toast(msg, action) { setTimeout(() => t.remove(), action ? 6000 : 2600); } -function showStreamError(msg) { - const p = el("p", "error", "Stream error: " + msg); - const player = document.getElementById("player"); - if (player) player.append(p); else fail(new Error(msg)); +function showStreamError(msg, retry) { + // visible overlay + Retry — never leave a silent spinner (this is what + // an unplayable browser used to hit: 'HLS not supported' under the overlay) + playerOverlay("Stream error: " + msg, retry || (() => { if (currentEp) play(currentEp.ep_id, currentEp.ep_no); }), "Retry"); } // ---------- history (server-persisted, incl. watch position) ---------- @@ -862,7 +862,14 @@ async function play(ep_id, ep_no) { playerOverlay("Loading\u2026", null, null, true); bufferGauge(); cdnChip(); - if (!window.Hls || !Hls.isSupported()) throw new Error("HLS not supported in this browser"); + if (!window.Hls || !Hls.isSupported()) { + // No MSE (e.g. iOS < 17): fall back to the browser's NATIVE HLS player. + // iOS Safari plays standard m3u8 in