Coder Social home page Coder Social logo

Comments (4)

disoul avatar disoul commented on June 18, 2024

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 localVideoTrack.setMute(true) before client.unpublish. In this case, the remote video will be black and remote end can receive a user-unpublished event.

I created a codepen to show you how to work around it, check out this

Agora's WebRTC gateway will fix this bug in the future. I will notify in this issue when the gateway is ready

from agorawebsdk-ng.

aravindm avatar aravindm commented on June 18, 2024

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:
localAudio.setMute(true)

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.

from agorawebsdk-ng.

disoul avatar disoul commented on June 18, 2024

In fact, we are considering to delete the setMute API and user-mute-updated event. Many developers are confused about this API, and this API has caused many problems. If you want to mute a LocalTrack, you can also call LocalTrack.stop() and client.unpublish.(maybe we will provide a new API to help you to do this in the future version)

So I don't recommend you to use the setMute now. In my codepen, setMute is just a workaround. In the future, this workaround will no longer be needed.

from agorawebsdk-ng.

disoul avatar disoul commented on June 18, 2024

This issue has been fixed in v4.0.0

We deleted the setMute function and user-mute-updated event, you can check out the release note here: https://agoraio-community.github.io/AgoraWebSDK-NG/docs/en/release_note#compatibility-changess

from agorawebsdk-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.