渐进式生成播放:fMP4 前 4 个分片就绪即返回播放列表开始起播,后台边转边补 ENDLIST,消除整集封装等待的黑屏缓冲
This commit is contained in:
@@ -653,7 +653,7 @@
|
||||
statusText.textContent = '正在缓冲…';
|
||||
await mediaLoader.load(result, supportsNativePlayback(), signal, offset);
|
||||
if (signal.aborted || version !== streamVersion) throw abortError();
|
||||
if (Number.isFinite(video.duration) && video.duration > 0) playbackDuration = video.duration;
|
||||
if (Number.isFinite(video.duration) && video.duration > playbackDuration) playbackDuration = video.duration;
|
||||
if (offset > 0) video.currentTime = playbackDuration > 0 ? Math.min(offset, Math.max(0, playbackDuration - 0.05)) : offset;
|
||||
video.playbackRate = Number(node('playbackRate').value) || 1;
|
||||
loading = false;
|
||||
|
||||
Reference in New Issue
Block a user