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) {
|
if (!selectedVideoTrack) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const value = selectedVideoTrack?.value
|
||||||
|
? `${selectedVideoTrack.value}`
|
||||||
|
: undefined;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
type: selectedVideoTrack?.type,
|
type: selectedVideoTrack?.type,
|
||||||
value: selectedVideoTrack?.value,
|
value,
|
||||||
};
|
};
|
||||||
}, [selectedVideoTrack]);
|
}, [selectedVideoTrack]);
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ type SelectedVideoTrackType = WithDefault<string, 'auto'>;
|
|||||||
|
|
||||||
type SelectedVideoTrack = Readonly<{
|
type SelectedVideoTrack = Readonly<{
|
||||||
type?: SelectedVideoTrackType;
|
type?: SelectedVideoTrackType;
|
||||||
value?: Int32;
|
value?: string;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
export type Seek = Readonly<{
|
export type Seek = Readonly<{
|
||||||
|
Loading…
Reference in New Issue
Block a user