play-probe: report branch + browser capabilities on every play attempt

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.
This commit is contained in:
jozamudi committed 2026-08-31 20:05:34 +00:00
1 parent be47ced521
commit c7f5ad4c7a
2 files changed
+13 -2

No files matched your search

+11
View File
@@ -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 <video> directly — same proxied URL,