Skip to content

Commit

Permalink
fix: don't send scaling mode if undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
krocard committed Dec 6, 2023
1 parent 779b1e3 commit d77c955
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/PlayerView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { NativePlayerView } from './native';
import { useProxy } from '../../hooks/useProxy';
import { FullscreenHandlerBridge } from '../../ui/fullscreenhandlerbridge';
import { CustomMessageHandlerBridge } from '../../ui/custommessagehandlerbridge';
import { ScalingMode } from '../../styleConfig';
import { PlayerViewProps } from './properties';

/**
Expand Down Expand Up @@ -50,7 +49,7 @@ export function PlayerView({
fullscreenHandler,
customMessageHandler,
isFullscreenRequested = false,
scalingMode = ScalingMode.Fit,
scalingMode,
isPictureInPictureRequested = false,
...props
}: PlayerViewProps) {
Expand Down Expand Up @@ -133,7 +132,7 @@ export function PlayerView({

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

0 comments on commit d77c955

Please sign in to comment.