diff --git a/src/components/VideoPlayer/VideoPlayerControls/ProgressBar/index.tsx b/src/components/VideoPlayer/VideoPlayerControls/ProgressBar/index.tsx index 5d1ea0d85d0b..c0b8c32cedcb 100644 --- a/src/components/VideoPlayer/VideoPlayerControls/ProgressBar/index.tsx +++ b/src/components/VideoPlayer/VideoPlayerControls/ProgressBar/index.tsx @@ -45,21 +45,22 @@ function ProgressBar({duration, position, seekPosition}: ProgressBarProps) { }; const pan = Gesture.Pan() + .runOnJS(true) .onBegin((event) => { - runOnJS(setIsSliderPressed)(true); - runOnJS(checkVideoPlaying)(onCheckVideoPlaying); - runOnJS(pauseVideo)(); - runOnJS(progressBarInteraction)(event); + setIsSliderPressed(true); + checkVideoPlaying(onCheckVideoPlaying); + pauseVideo(); + progressBarInteraction(event); }) .onChange((event) => { - runOnJS(progressBarInteraction)(event); + progressBarInteraction(event); }) .onFinalize(() => { - runOnJS(setIsSliderPressed)(false); + setIsSliderPressed(false); if (!wasVideoPlayingOnCheck.value) { return; } - runOnJS(playVideo)(); + playVideo(); }); useEffect(() => {