diff --git a/static/player/video.ts b/static/player/video.ts index b053c500..590a02cd 100644 --- a/static/player/video.ts +++ b/static/player/video.ts @@ -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;