Agora-RTC-React
Agora-RTC-React copied to clipboard
TypeScript issue on AgoraVideoPlayer
When publishing a export const useCreateScreenVideoTrack = createScreenVideoTrack(createScreenVideoTrackConfig);
and using
<AgoraVideoPlayer
style={{ height: "100%", width: "100%" }}
videoTrack={screenVideoTrack}
/>
I get this error
(property) videoTrack: ICameraVideoTrack | ILocalVideoTrack | IRemoteVideoTrack
Type 'ILocalVideoTrack | [ILocalVideoTrack, ILocalAudioTrack]' is not assignable to type 'ICameraVideoTrack | ILocalVideoTrack | IRemoteVideoTrack'.
Type '[ILocalVideoTrack, ILocalAudioTrack]' is not assignable to type 'ICameraVideoTrack | ILocalVideoTrack | IRemoteVideoTrack'.ts(2322)
index.d.ts(183, 5): The expected type comes from property 'videoTrack' which is declared here on type 'IntrinsicAttributes & ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & { ...; } & { ...; }'