From be47ced5217787124ef5ad7f7f3b56527d3a8238 Mon Sep 17 00:00:00 2001 From: Josue Zamudio Date: Mon, 31 Aug 2026 19:57:57 +0000 Subject: [PATCH] Report client fingerprint on playback failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit showStreamError + playerFail now POST the failing browser's UA, hls.js presence, MSE support and native-HLS capability to the events table — a broken mobile browser becomes diagnosable from the server side instead of by guessing. --- static/app.js | 11 ++++++++++- static/index.html | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/static/app.js b/static/app.js index 0d63bb4..67f3143 100644 --- a/static/app.js +++ b/static/app.js @@ -70,6 +70,15 @@ function toast(msg, action) { 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) + // + report the client's capabilities so a failing browser is diagnosable + // from server.log instead of by guesswork + try { + postEvent({type: "client-fail", msg, + ua: navigator.userAgent, + hls_lib: typeof window.Hls, + mse: (window.Hls && Hls.isSupported) ? Hls.isSupported() : null, + native_hls: document.createElement("video").canPlayType("application/vnd.apple.mpegurl") || "none"}); + } catch {} playerOverlay("Stream error: " + msg, retry || (() => { if (currentEp) play(currentEp.ep_id, currentEp.ep_no); }), "Retry"); } @@ -752,7 +761,7 @@ function playerFail(msg) { // the last 10s save when they leave savePos(); const { ep_id, ep_no } = currentEp; - postEvent({type: "error", detail: msg, ep_id, ep: ep_no, lang}); + postEvent({type: "error", detail: msg, ep_id, ep: ep_no, lang, ua: navigator.userAgent}); playerOverlay("Playback failed: " + msg, () => play(ep_id, ep_no)); } diff --git a/static/index.html b/static/index.html index 1efbe98..eb6503f 100644 --- a/static/index.html +++ b/static/index.html @@ -6,7 +6,7 @@ ani-web - +
@@ -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 --> - +