From 5b199b52b4190f02697245ba06b2d31899211c6e Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Tue, 9 Jul 2024 12:43:10 +0700 Subject: [PATCH] Move video style to const var --- src/Video.web.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Video.web.tsx b/src/Video.web.tsx index e7b8c361..86aea96b 100644 --- a/src/Video.web.tsx +++ b/src/Video.web.tsx @@ -230,18 +230,20 @@ const Video = forwardRef( onVolumeChange?.({volume: nativeRef.current.volume}); }} onEnded={onEnd} - style={{ - position: 'absolute', - inset: 0, - objectFit: 'contain', - width: '100%', - height: '100%', - }} + style={videoStyle} /> ); }, ); +const videoStyle = { + position: 'absolute', + inset: 0, + objectFit: 'contain', + width: '100%', + height: '100%', +} satisfies React.CSSProperties; + const useMediaSession = ( metadata: VideoMetadata | undefined, nativeRef: RefObject,