AgoraIO-Community / Agora-RTC-React

A react wrapper for Agora RTC NG SDK
MIT License
92 stars 48 forks source link

fix: add type of createScreenVideoTrack enable and disable #34

Open wimpykid719 opened 2 years ago

wimpykid719 commented 2 years ago

Return wrong type when I execute the following code. createScreenVideoTrack({ encoderConfig: '480p_1' }, 'disable')()

I just want to return only ILocalVideoTrack but this code of type tracks is ILocalVideoTrack | [ILocalVideoTrack, ILocalAudioTrack] I think that's wrong because I seted withAudio: disable so never return ILocalAudioTrack so I added two type of type for enable and disable.

This is my first pull request to oss so might be something mistake or exist any other solution then please let me know.