Comments (11)
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.
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.
How is the score of the server side producer in that scenario?
from mediasoup.
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.
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.
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.
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.
@AlexLeoRQ, can you please try the behaviour of version 3.12.16? which is the one previous to 3.13.0?
from mediasoup.
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.
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.
Indeed this was done in 3.11.22 (as the CHANGELOG.md says) for a reason:
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)
- opus dtx incorrectly judged HOT 7
- Possible missing break in H264_SVC::ParseSingleNalu()
- Must join all XxxConsumer classes into a single one
- set MS_LOG_DEV_LEVEL 3, lead to build errors HOT 1
- #define MS_LOG_DEV_LEVEL 3, build error HOT 1
- SeqManager<T>::SeqLowerThan() crashes when used as compare function in abseil set or map (only in debug mode) HOT 24
- Use uint64_t for containers with RTP seq number as key
- arm64 prebuilt binaries are replacing x64 ones HOT 4
- test-PipeTransport.ts randomly fails HOT 2
- RtpPacket::SetPayloadLength get wrong payloadLength HOT 2
- Possible memory leak HOT 34
- DataConsumer::SendMessage cause onQueuedCallback* cb leak and DATACONSUMER_SEND have no response HOT 1
- FeedbackRtpTransport.cpp may have an overflow mistake HOT 9
- Worker crash when closing `WebRtcServer` if there are TCP connections active HOT 2
- Mediasoup worker died, exiting in 2 seconds... HOT 2
- [Rust] Error log “XXX closing failed on drop: Channel already closed”
- Add interface for RTC::Shared, Channel::ChannelNotifier and ChannelMessageRegistrator HOT 3
- [Rust] Transport with only audio producer results in server-side transport cc is not created. HOT 2
- Bug Simulcast plainTransport -> webrtcTransport HOT 4
- Video software encoding Quality Limitation vs hardware encoding HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediasoup.