feat: wire loading state into video source loading
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Hls from "hls.js";
|
||||
|
||||
import { attachHLSProfile } from "./hls_profile";
|
||||
import { setPlayerLoadState } from "./loading";
|
||||
import { state } from "./state";
|
||||
import { absoluteTimeFromDisplay, displayTimeFromAbsolute, invalidateBounds } from "./timeline";
|
||||
|
||||
@@ -53,6 +54,8 @@ export const loadVideoSource = (
|
||||
return;
|
||||
}
|
||||
|
||||
setPlayerLoadState("loading_media");
|
||||
|
||||
const wasPlaying = !state.elements.video.paused;
|
||||
const prevDisplayTime = displayTimeFromAbsolute(state.elements.video.currentTime);
|
||||
const shouldPreservePosition = preservePosition && prevDisplayTime > 0;
|
||||
|
||||
Reference in New Issue
Block a user