twilio / twilio-video-app-react

A collaboration application built with the twilio-video.js SDK and React.js
Apache License 2.0
1.81k stars 728 forks source link

Dominant Speaker logic mutes all other participants in Chrome only #741

Open andygikling opened 2 years ago

andygikling commented 2 years ago

Describe the bug On Firefox, with Dominant Speaker = standard, 3 people in the room, when I listen to two remote participants talking at the same time, the Dominant Speaker does focus the louder talking person (for the most part) but you can still hear the other speaker in the background talking at the same time.

The problem is, on Chrome and Edge, when using the exact same server with the same connection settings, when the Dominate Speaker gets video focus on the screen, all other participants are completely muted (even if they are talking).

With this bug, on Chrome and Edge, you can only hear one person talking at a time. This is a huge problem for Group Room types. This does not happen on Firefox, Safari and Android...

To Reproduce Steps to reproduce the behavior:

Using twilio-video-app-react v0.7.0. Have three participants in a Group room.

On Chrome have the two other participants begin talking at the same time. Observe that you can only hear the Dominant Speaker, and the other participant is 100% muted, even though their mic audio-level indicator shows they are also speaking.

On Firefox or Android, repeat the Chrome test above. Observe that you can clearly hear the Dominant Speaker, but also you can still hear the other participant speaking in the background.

Expected behavior Non Dominant Speaker should not be completely muted in Chrome and Edge. This is necessary for conversations with multiple people in a Group room setting. Only hearing one audio track at a time is a show stopper for Group calls. It works correctly and as expected in Firefox, Safari and Android.

Screenshots NA

Environment:

Additional context Playing with all possible Connection Settings when joining the call doesn't appear to fix the issue. Tested these non-default settings in Connection Settings:

andygikling commented 2 years ago

@rjunsk Is this bug ticket related to your changes in 4565ab66? Seems like it might be.

@timmydoza or similarly is your change in 10cfac91 related?

timmydoza commented 2 years ago

Hey @andygikling thanks for the issue! I agree that this is a big problem.

Yes - this does sound like the issue that we recently encountered with the bug that was introduced in Chrome 103. The issue was - that if you stop the clone of a MediaStreamTrack, Chrome 103 would also stop the MediaStreamTrack that the clone was cloned from. It affected some users of the twilio-video SDK as well: https://github.com/twilio/twilio-video.js/issues/1811

I think that this commit here should have fixed the issue: https://github.com/twilio/twilio-video-app-react/pull/713/commits/5f3a6f2ce81fce4415abdb00656f7df3b63ac6db. Can you make sure that these changes are in your AudioLevelIndicator.tsx file? I see that the fix should be included in the 0.7.0 version, which makes me a little concerned that it isn't working for you. I hope it isn't a new problem in Chrome. Please let me know if your AudioLevelIndicator.tsx file is up to date with the same file on master and we'll go from there.

fahmyfarahat commented 1 year ago

Is that issue still exist?