Add local self-test flow and fix fallback regressions
build-push / docker (push) Successful in 4m15s
build-push / docker (push) Successful in 4m15s
This commit is contained in:
+15
-6
@@ -216,12 +216,21 @@ function attachVideoSource(video, src) {
|
||||
logEvent("preview:attach:skipped", { reason: "empty src" });
|
||||
return;
|
||||
}
|
||||
if (src.endsWith(".m3u8") && window.Hls && window.Hls.isSupported()) {
|
||||
const hls = new window.Hls({ enableWorker: false });
|
||||
hls.loadSource(src);
|
||||
hls.attachMedia(video);
|
||||
hlsInstances.set(video, hls);
|
||||
logEvent("preview:attach:hls", { src });
|
||||
if (src.endsWith(".m3u8")) {
|
||||
if (window.Hls && window.Hls.isSupported()) {
|
||||
const hls = new window.Hls({ enableWorker: false });
|
||||
hls.loadSource(src);
|
||||
hls.attachMedia(video);
|
||||
hlsInstances.set(video, hls);
|
||||
logEvent("preview:attach:hls", { src, mode: "hls.js" });
|
||||
return;
|
||||
}
|
||||
if (video.canPlayType("application/vnd.apple.mpegurl")) {
|
||||
video.src = src;
|
||||
logEvent("preview:attach:hls", { src, mode: "native" });
|
||||
return;
|
||||
}
|
||||
logEvent("preview:attach:skipped", { reason: "hls unsupported", src });
|
||||
return;
|
||||
}
|
||||
video.src = src;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>AI Media Hub</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/hls.js@1.5.20/dist/hls.min.js"></script>
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
</head>
|
||||
<body class="min-h-full bg-zinc-950 text-zinc-100 selection:bg-white selection:text-black">
|
||||
|
||||
Reference in New Issue
Block a user