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;
|
||||
|
||||
Reference in New Issue
Block a user