Code Monkey home page Code Monkey logo

Comments (5)

disoul avatar disoul commented on August 23, 2024

Thanks for your feedback.

The user-left event was fired because we need to use this event to trigger the Agora Native SDK's decoder releasing. I think this is a bad design because this workaround will affect the customer's application logic.

We are planning to solve it in v0.2.0, just like #8 , we will redesign the unpublish mechanism in v0.2.0.

from agorawebsdk-ng.

charlie-lk avatar charlie-lk commented on August 23, 2024

Thanks for the reply. Do you have any hints or suggestions on how applications can distinguish unpublishing and channel leaving at this point?

Related SO question -
https://stackoverflow.com/questions/62027242/the-user-left-event-is-fired-when-unpublish-method-is-called

from agorawebsdk-ng.

disoul avatar disoul commented on August 23, 2024

There are two differences between unpublishing and leaving channel:

  • user-left event's reason param. If the remote peer is unpublished, reason will be "BecomeAudience"
  • if this user-left event is caused by the remote peer unpublishing, you will receive user-joined about 10s after receiving user-left

So if you receive a user-left with "BecomeAudience" and receive user-joined in 10s, it is unpublishing, otherwise, it is channel leaving.

from agorawebsdk-ng.

charlie-lk avatar charlie-lk commented on August 23, 2024

This definitely can address the application logic issues until the SDK v2 is brought out.

In fact, BecomeAudience is enough for the application to change its state correctly and the subsequent user-joined is the lifesaver it can use.

Great patch!

from agorawebsdk-ng.

disoul avatar disoul commented on August 23, 2024

This issue has been fixed in v4.0.0( release note)

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.