diff --git a/src/Video.web.tsx b/src/Video.web.tsx index 0e5ace22..42d3fd45 100644 --- a/src/Video.web.tsx +++ b/src/Video.web.tsx @@ -316,7 +316,7 @@ const Video = forwardRef( } // Pause the video before changing the source - await nativeRef.current.pause(); + nativeRef.current.pause(); // Unload the previous Shaka player if it exists if (shakaPlayerRef.current) { @@ -325,7 +325,9 @@ const Video = forwardRef( } // Create a new Shaka player and attach it to the video element - shakaPlayerRef.current = new shaka.Player(nativeRef.current); + shakaPlayerRef.current = new shaka.Player(); + + shakaPlayerRef.current.attach(nativeRef.current); if (source?.cropStart) { shakaPlayerRef.current.configure({ @@ -403,6 +405,8 @@ const Video = forwardRef( useMediaSession(source?.metadata, nativeRef, showNotificationControls); + const cropStartSeconds = (source?.cropStart || 0) / 1000; + return (