AgoraIO-Community / AgoraWebSDK-NG

The Next Generation of Agora Web SDK
https://agoraio-community.github.io/AgoraWebSDK-NG/
161 stars 75 forks source link

setEnabled on videoStream is sometimes not publishing the video stream [4.0.1] #35

Closed vvedharaju closed 4 years ago

vvedharaju commented 4 years ago

In 4.0.1, I noticed this happening frequently in rtc mode. So far, it has not happened to us in live broadcast mode. Please help!

vvedharaju commented 4 years ago

Oh, the issue is if call setEnabled(false) on a localTrack before publishing both the tracks. Whichever track I call setEnabled(false) on before publishing is not published when I later call setEnabled(true). Is that expected behavior? Do I need to explicitly publish the track again when I later call setEnabled(true)?

disoul commented 4 years ago

You can not publish a disabled track, but you can disable a published track.

vvedharaju commented 4 years ago

got it 👍 just checking client.localTracks and publishing if its not already published