From e82f9dc24b6a4a09786f5425153b53494d72b05d Mon Sep 17 00:00:00 2001 From: YangJH Date: Mon, 8 Apr 2024 02:03:37 +0900 Subject: [PATCH] fix: prevents crash from occurring when using the selected video track with resolution type (#3664) * fix: fix video resolution track native crash error * fix: fix type error --- src/Video.tsx | 5 ++++- src/specs/VideoNativeComponent.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Video.tsx b/src/Video.tsx index f357ee13..84e2e883 100644 --- a/src/Video.tsx +++ b/src/Video.tsx @@ -221,10 +221,13 @@ const Video = forwardRef( if (!selectedVideoTrack) { return; } + const value = selectedVideoTrack?.value + ? `${selectedVideoTrack.value}` + : undefined; return { type: selectedVideoTrack?.type, - value: selectedVideoTrack?.value, + value, }; }, [selectedVideoTrack]); diff --git a/src/specs/VideoNativeComponent.ts b/src/specs/VideoNativeComponent.ts index 8f8d09a1..d654ad78 100644 --- a/src/specs/VideoNativeComponent.ts +++ b/src/specs/VideoNativeComponent.ts @@ -81,7 +81,7 @@ type SelectedVideoTrackType = WithDefault; type SelectedVideoTrack = Readonly<{ type?: SelectedVideoTrackType; - value?: Int32; + value?: string; }>; export type Seek = Readonly<{