From d77c9556368820139cfa3bafe2c9127a288af648 Mon Sep 17 00:00:00 2001 From: Kevin Rocard Date: Wed, 6 Dec 2023 09:53:00 +0100 Subject: [PATCH] fix: don't send scaling mode if undefined --- src/components/PlayerView/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/PlayerView/index.tsx b/src/components/PlayerView/index.tsx index d46b2a1b..86155c25 100644 --- a/src/components/PlayerView/index.tsx +++ b/src/components/PlayerView/index.tsx @@ -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'; /** @@ -50,7 +49,7 @@ export function PlayerView({ fullscreenHandler, customMessageHandler, isFullscreenRequested = false, - scalingMode = ScalingMode.Fit, + scalingMode, isPictureInPictureRequested = false, ...props }: PlayerViewProps) { @@ -133,7 +132,7 @@ export function PlayerView({ useEffect(() => { const node = findNodeHandle(nativeView.current); - if (node) { + if (node && scalingMode) { dispatch('setScalingMode', node, scalingMode); } }, [scalingMode, nativeView]);