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:
parent
4c7719a3f5
commit
e82f9dc24b
@ -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]);
|
||||
|
||||
|
@ -81,7 +81,7 @@ type SelectedVideoTrackType = WithDefault<string, 'auto'>;
|
||||
|
||||
type SelectedVideoTrack = Readonly<{
|
||||
type?: SelectedVideoTrackType;
|
||||
value?: Int32;
|
||||
value?: string;
|
||||
}>;
|
||||
|
||||
export type Seek = Readonly<{
|
||||
|
Loading…
Reference in New Issue
Block a user