From c7f5ad4c7ab36df6cca468be0c86cad51a61ef74 Mon Sep 17 00:00:00 2001 From: Josue Zamudio Date: Mon, 31 Aug 2026 20:05:34 +0000 Subject: [PATCH] play-probe: report branch + browser capabilities on every play attempt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit iPhone stays on 'Loading…' with zero /stream requests and no error event — impossible under any known code path, so instrument the branch decision itself: which branch (hlsjs/native/none-throw), hls.js presence, MSE support, native-HLS capability, full UA. --- static/app.js | 11 +++++++++++ static/index.html | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/static/app.js b/static/app.js index 67f3143..0fef892 100644 --- a/static/app.js +++ b/static/app.js @@ -871,6 +871,17 @@ async function play(ep_id, ep_no) { playerOverlay("Loading\u2026", null, null, true); bufferGauge(); cdnChip(); + // DECISIVE PROBE (iPhone debugging): report exactly which branch we're + // about to take + the browser's real capabilities. One retry on the + // phone tells us where play() dies without any guessing. + try { + const nativeOK = (() => { try { return document.createElement("video").canPlayType("application/vnd.apple.mpegurl") || "none"; } catch { return "err"; } })(); + const mse = (() => { try { return (window.Hls && Hls.isSupported) ? Hls.isSupported() : null; } catch { return "err"; } })(); + postEvent({type: "play-probe", + branch: (!window.Hls || !Hls.isSupported()) ? (nativeOK !== "none" && nativeOK !== "" ? "native" : "none-throw") : "hlsjs", + hls_lib: typeof window.Hls, + mse, native_hls: nativeOK, ua: navigator.userAgent}); + } catch {} 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