GithubHelp home page GithubHelp logo

Comments (11)

ibc avatar ibc commented on June 10, 2024

What does "when the participant looses connection" exactly mean? mediasoup doesn't monitor the network status of participants other than available bandwidth but the latter doesn't conclude "endpoint is disconnected" at all.

from mediasoup.

AlexLeoRQ avatar AlexLeoRQ commented on June 10, 2024

The practical example is a room with two participants. I am referring to the case in which one of those participants loses the connection, its producer stops sending flow, in that case the consumer's score should be modified, in this specific case go from a score of 10 to a score of 0. This is how it was working

from mediasoup.

ibc avatar ibc commented on June 10, 2024

How is the score of the server side producer in that scenario?

from mediasoup.

AlexLeoRQ avatar AlexLeoRQ commented on June 10, 2024

I have been debugging on the server side using version 3.13.0 and 3.11.20.
In my code on the server side I have a consumer.on('score') and a producer.on('score')

I have verified that in v3.11.20 it enters both events over time when the score value is modified:

Score in consumer: { producerScore: 10, producerScores: [ 10 ], score: 10 }
Score in producer: [ { encodingIdx: 0, score: 10, ssrc: 3376637265 } ]

Score in consumer: { producerScore: 9, producerScores: [ 9 ], score: 10 }
Score in producer: [ { encodingIdx: 0, score: 9, ssrc: 3376637265 } ]

and when the disconnection of one of the participants occurs, it enters both events with values:

Score in consumer: { producerScore: 0, producerScores: [ 0 ], score: 10 }
Score in producer: [ { encodingIdx: 0, score: 0, ssrc: 3376637265 } ]

Performing exactly the same thing with v3.13.0 I see that the change logs do not appear over time, only the first time after participant connect:

Score in consumer:  { producerScore: 10, producerScores: [ 10 ], score: 10 }
Score in producer:  [ { encodingIdx: 0, score: 10, ssrc: 240924828 } ]

then not appear again, not even when the participant disconnects. That is, it does not access through events.

from mediasoup.

jmillan avatar jmillan commented on June 10, 2024

I've tested this with the mediasoup demo and it's working as expected. What do you exactly mean with 'disconnection occurs'? restarting the browser tab?

from mediasoup.

AlexLeoRQ avatar AlexLeoRQ commented on June 10, 2024

First of all, a question, is the version of mediasoup used in the demo exactly 3.13.0? Are you sure about this? I ask this because I do not make any type of modification in my code, I simply go from one version to another and I have the indicated problem.

On the other hand, by losing connection I mean that the user loses their network connection, I do this by simply disconnecting the Wi-Fi from the device or removing the network cable.

from mediasoup.

jmillan avatar jmillan commented on June 10, 2024

is the version of mediasoup used in the demo exactly 3.13.0? A

I've tested it with the latest commit of v3, exactly.

On the other hand, by losing connection I mean that the user loses their network connection, I do this by simply disconnecting the Wi-Fi from the device or removing the network cable.

I'll try it again later by disconnecting the WIFI from the laptop.

from mediasoup.

jmillan avatar jmillan commented on June 10, 2024

@AlexLeoRQ, can you please try the behaviour of version 3.12.16? which is the one previous to 3.13.0?

from mediasoup.

jmillan avatar jmillan commented on June 10, 2024

Definitely the Producer and Consumer Score work as before for me testing with mediasoup demo and latest v3 version. When disconnecting the WIFI I get scores 0 for both and when reactivating it I get higher scores until value 10 in my local environment.

from mediasoup.

AlexLeoRQ avatar AlexLeoRQ commented on June 10, 2024

I have been testing with different versions of mediasoup, and I have been able to see that the latest version with which we receive the score change is version 3.11.21, with that version and previous versions such as 3.11.20, it works correctly, as I indicated in previous answers. And I have verified that it is from that version onwards that it stops working, that is, with 3.11.22 we no longer obtain the change in the producer score

from mediasoup.

ibc avatar ibc commented on June 10, 2024

Indeed this was done in 3.11.22 (as the CHANGELOG.md says) for a reason:

#1061

The thing is: From RTP protocol perspective, it's perfectly fine that a device stops sending RTP and it doesn't mean that its uplink connection is bad. It's just that the encoder decided to stop sending packets. This happens, for instance, in mobile apps using libwebrtc with camera enabled: when switching to another app the encoder stops sending more webcam RTP packets.

So I'm afraid this is expected behavior. Producer/consumer's score` was never supposed to mean "there is continuous RTP flow" and it must not used to figure out network disconnections.

from mediasoup.

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.