-
Notifications
You must be signed in to change notification settings - Fork 75
Not getting "user-unpublished" event when unpublishing a local video track #8
Comments
Thanks for your feedback. This bug is caused by Agora’s WebRTC gateway, so I cannot fix it by releasing a new SDK version. But here is a workaround to fix this. Just call I created a codepen to show you how to work around it, check out this
|
Thank you for your response @disoul . The codepen shared by you works, although I found out that it doesn't send the unpublished event in one specific scenario, if the audiotrack is muted before it is published and then you mute & unpublish the video track. You can add the below line at line 34 in your code pen to reproduce the same: Please do let me know if there is a way I can get the "user-unpublished" event consistently or if I should use the mute event instead. |
In fact, we are considering to delete the So I don't recommend you to use the |
This issue has been fixed in We deleted the |
Hello there,
I am trying to unpublish the local video track with the below code to mute the video and switch off the camera indicator:
client.unpublish([localVideoTrack])
localVideoTrack.close()
localVideoTrack = null
When I execute the above code, the video stops for the local user as expected but on the remote users end, the video freezes and I am not getting a "user-unpublished" event callback. I've registered for the event on the remote users end with the following code:
client.on('user-unpublished', (user, mediaType) => {
console.log('unpublished', user, mediaType)
})
When I refresh the page on the remote users end, I can see the above console log statement though.
Could you please let me know if I have to do something else to get the callbacks working?
Thanks!
The text was updated successfully, but these errors were encountered: