fix: integrate child task improvements (poster rendering, HLS cleanup, hls.js dependency)
CI / test (pull_request) Canceled after 0s
CI / test (pull_request) Canceled after 0s
This commit is contained in:
1 parent
e17b228ee0
commit
c59c96ce19
3 files changed
+19
No files matched your search
@@ -48,6 +48,8 @@ async function playHls(video, manifestUrl) {
|
||||
video.src = manifestUrl;
|
||||
return;
|
||||
}
|
||||
// Clean up any existing HLS instance before creating a new one
|
||||
destroyHls(video);
|
||||
const hls = new HLS({ debug: false, enableWorker: true, lowLatencyMode: false });
|
||||
hls.loadSource(manifestUrl);
|
||||
hls.attachMedia(video);
|
||||
@@ -99,6 +101,11 @@ async function createVideoElement(entry) {
|
||||
video.src = resolveSrc(entry);
|
||||
}
|
||||
|
||||
// Set poster image so a thumbnail shows before playback begins
|
||||
if (entry && typeof entry === 'object' && entry.poster) {
|
||||
video.poster = entry.poster;
|
||||
}
|
||||
|
||||
return video;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user