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:
1 parent
be47ced521
commit
c7f5ad4c7a
2 files changed
+13
-2
No files matched your search
@@ -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,
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
<title>ani-web</title>
|
||||
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%23f97316'/%3E%3Ctext x='32' y='45' font-family='sans-serif' font-size='42' font-weight='700' text-anchor='middle' fill='%230e0f13'%3Ea%3C/text%3E%3C/svg%3E">
|
||||
|
||||
<link rel="stylesheet" href="style.css?v=8">
|
||||
<link rel="stylesheet" href="style.css?v=9">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
@@ -30,6 +30,6 @@
|
||||
max-age=300 in browser AND possibly in your HTTPS proxy, and a stale
|
||||
copy is exactly how users keep seeing an old UI after a deploy -->
|
||||
<script src="hls.min.js"></script>
|
||||
<script src="app.js?v=8"></script>
|
||||
<script src="app.js?v=9"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user