Agora-RTC-React icon indicating copy to clipboard operation
Agora-RTC-React copied to clipboard

TypeScript issue on AgoraVideoPlayer

Open souhailmerroun opened this issue 3 years ago • 0 comments

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> & { ...; } & { ...; }'

souhailmerroun avatar Sep 03 '22 02:09 souhailmerroun