feat: add cache busting and hls query param

This commit is contained in:
2026-06-14 21:51:02 +02:00
parent f9f3322797
commit 4a74fdcf31
8 changed files with 23 additions and 6 deletions

View File

@@ -20,6 +20,7 @@ const shouldUseHLS = (type: string | undefined, url: string): boolean => {
if (type === "m3u8") return true;
try {
const parsed = new URL(url, window.location.href);
if (parsed.searchParams.get("hls") === "1") return true;
return parsed.pathname.toLowerCase().endsWith(".m3u8");
} catch {
return url.toLowerCase().includes(".m3u8");