diff --git a/static/app.js b/static/app.js index 0fef892..07b72cc 100644 --- a/static/app.js +++ b/static/app.js @@ -1,4 +1,6 @@ // app.js — ani-web frontend: search -> detail -> play, vanilla JS + hls.js +const JSV = 10; // bump with every app.js change; play-probe reports it so a + // stale-cache phone is detectable server-side // BASE = this page's directory, so the app works at / or behind a // prefixing reverse proxy (e.g. https://host/ani/) const BASE = (() => { @@ -73,7 +75,7 @@ function showStreamError(msg, retry) { // + report the client's capabilities so a failing browser is diagnosable // from server.log instead of by guesswork try { - postEvent({type: "client-fail", msg, + postEvent({type: "client-fail", jsv: JSV, msg, ua: navigator.userAgent, hls_lib: typeof window.Hls, mse: (window.Hls && Hls.isSupported) ? Hls.isSupported() : null, @@ -877,7 +879,7 @@ async function play(ep_id, ep_no) { 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", + postEvent({type: "play-probe", jsv: JSV, branch: (!window.Hls || !Hls.isSupported()) ? (nativeOK !== "none" && nativeOK !== "" ? "native" : "none-throw") : "hlsjs", hls_lib: typeof window.Hls, mse, native_hls: nativeOK, ua: navigator.userAgent}); diff --git a/static/index.html b/static/index.html index f4c0269..c8784a1 100644 --- a/static/index.html +++ b/static/index.html @@ -6,7 +6,7 @@