blackuy / react-native-twilio-video-webrtc

Twilio Video (WebRTC) for React Native
https://www.twilio.com/docs/video
MIT License
609 stars 403 forks source link

Issue with remote audio on Android when a new participant joins #480

Open rahulbaroqoe opened 3 years ago

rahulbaroqoe commented 3 years ago

Steps to reproduce

  1. Start a session on android
  2. 2 or more participants should join
  3. The already present participant can not hear anythingng

Expected behaviour

Remote Audio should be enabled

Actual behaviour

Remote audio becomes silent, the participant is not able to hear anything until they toggle remote audio.

Environment

react-native-twilio-video-webrtc

Version: npm version or "master": master || react-native-twilio-video-webrtc@2.0.0

slycoder commented 3 years ago

So just so I understand this a little more clearly:

Is that right?

rahulbaroqoe commented 3 years ago

Ya, participant B however joins with enableAudio flag set to false in connect params.

We did some digging and found enableRemoteAudio being set using enableAudio as opposed to enableRemoteAudio. Wanted to understand the purpose of enableRemoteAudio, assuming enableAudio is used to set the state for device mic.

image

slycoder commented 3 years ago

Oh, you're totally right, enableAudio triggers both behaviors right now. I think the right thing to do would be to have separate flags to playRemoteAudio and enableLocalAudio. Would that solve the problem for your use case?