Skip to content

Commit

Permalink
Merge pull request #37007 from software-mansion-labs/video-player-fol…
Browse files Browse the repository at this point in the history
…lowups/fix-crashing

[CP Staging] Fix - App crashes when scrubbing through an mp4 file on attachment upload preview

(cherry picked from commit 437d75c)
  • Loading branch information
mountiny authored and OSBotify committed Feb 22, 2024
1 parent d1be519 commit b21ce03
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/VideoPlayerContexts/PlaybackContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ function PlaybackContextProvider({children}) {

const checkVideoPlaying = useCallback(
(statusCallback) => {
if (!(currentVideoPlayerRef && currentVideoPlayerRef.current && currentVideoPlayerRef.current.getStatusAsync)) {
return;
}
currentVideoPlayerRef.current.getStatusAsync().then((status) => {
statusCallback(status.isPlaying);
});
Expand Down

0 comments on commit b21ce03

Please sign in to comment.