Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Mar 5, 2024
1 parent c82070e commit 346b079
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/components/VideoPlayer/BaseVideoPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,16 @@ function BaseVideoPlayer({
shouldUseSharedVideoElementRef.current = shouldUseSharedVideoElement;
}, [shouldUseSharedVideoElement]);

useEffect(() => () => {
if (shouldUseSharedVideoElementRef.current) {
return;
}
// If it's not a shared video player, clear the video player ref.
currentVideoPlayerRef.current = null;
}, [currentVideoPlayerRef]);
useEffect(
() => () => {
if (shouldUseSharedVideoElementRef.current) {
return;
}
// If it's not a shared video player, clear the video player ref.
currentVideoPlayerRef.current = null;
},
[currentVideoPlayerRef],
);

// update shared video elements
useEffect(() => {
Expand Down

0 comments on commit 346b079

Please sign in to comment.