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
This commit is contained in:
YangJH 2024-04-08 02:03:37 +09:00 committed by GitHub
parent 4c7719a3f5
commit e82f9dc24b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -221,10 +221,13 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
if (!selectedVideoTrack) {
return;
}
const value = selectedVideoTrack?.value
? `${selectedVideoTrack.value}`
: undefined;
return {
type: selectedVideoTrack?.type,
value: selectedVideoTrack?.value,
value,
};
}, [selectedVideoTrack]);

View File

@ -81,7 +81,7 @@ type SelectedVideoTrackType = WithDefault<string, 'auto'>;
type SelectedVideoTrack = Readonly<{
type?: SelectedVideoTrackType;
value?: Int32;
value?: string;
}>;
export type Seek = Readonly<{