Skip to content

Commit

Permalink
refactor: align handling of default values
Browse files Browse the repository at this point in the history
PRN-92
  • Loading branch information
krocard committed Dec 6, 2023
1 parent 653fcd2 commit 1fe872c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/PlayerView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export function PlayerView({
config,
fullscreenHandler,
customMessageHandler,
isFullscreenRequested = false,
isFullscreenRequested,
scalingMode,
isPictureInPictureRequested = false,
isPictureInPictureRequested,
...props
}: PlayerViewProps) {
// Workaround React Native UIManager commands not sent until UI refresh
Expand Down Expand Up @@ -125,7 +125,7 @@ export function PlayerView({

useEffect(() => {
const node = findNodeHandle(nativeView.current);
if (node) {
if (node && isFullscreenRequested) {
dispatch('setFullscreen', node, isFullscreenRequested);
}
}, [isFullscreenRequested, nativeView]);
Expand All @@ -139,7 +139,7 @@ export function PlayerView({

useEffect(() => {
const node = findNodeHandle(nativeView.current);
if (node) {
if (node && isPictureInPictureRequested) {
dispatch('setPictureInPicture', node, isPictureInPictureRequested);
}
}, [isPictureInPictureRequested, nativeView]);
Expand Down

0 comments on commit 1fe872c

Please sign in to comment.