Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/VideoPlayer/BaseVideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function BaseVideoPlayer({
const {currentlyPlayingURL, sharedElement, originalParent, currentVideoPlayerRef, currentVideoViewRef, mountedVideoPlayersRef, playerStatus} = usePlaybackStateContext();
const {pauseVideo, playVideo, replayVideo, shareVideoPlayerElements, updateCurrentURLAndReportID, setCurrentlyPlayingURL, updatePlayerStatus} = usePlaybackActionsContext();
const {isFullScreenRef} = useFullScreenContext();
const [pointerEventsDisabled, setPointerEventsDisabled] = useState(true);

const isOffline = useNetwork().isOffline;
const [duration, setDuration] = useState(videoDuration);
Expand Down Expand Up @@ -476,7 +477,7 @@ function BaseVideoPlayer({
}
videoPlayerElementParentRef.current = el;
}}
pointerEvents="none"
pointerEvents={pointerEventsDisabled ? 'none' : 'auto'}
>
<VideoView
// has to be switched to fullscreenOptions={{enable: true}} when mobile Safari gets fixed
Expand All @@ -497,6 +498,7 @@ function BaseVideoPlayer({
// When the video is in fullscreen, we don't want the scroll to be captured by the InvertedFlatList of report screen.
// This will also allow the user to scroll the video playback speed.
videoPlayerElementParentRef.current.addEventListener('wheel', stopWheelPropagation);
setPointerEventsDisabled(false);
}}
onFullscreenExit={() => {
isFullScreenRef.current = false;
Expand All @@ -507,6 +509,7 @@ function BaseVideoPlayer({

// Sync volume updates in full screen mode after leaving it
updateVolume(videoPlayerRef.current.muted ? 0 : videoPlayerRef.current.volume || 1);
setPointerEventsDisabled(true);
}}
/>
</View>
Expand Down
Loading