Agora-RN-Quickstart icon indicating copy to clipboard operation
Agora-RN-Quickstart copied to clipboard

How to Know if remote users mic is on r off

Open muhamadjawad opened this issue 3 years ago • 9 comments

Hi ,Thanks for this amazing code. I have implemented video call for multiple users and now i want to show that whether the mics of all users is on or mute. So how can i use it. I found no solution in the documentation.

muhamadjawad avatar Nov 10 '21 11:11 muhamadjawad

pls listen the RemoteAudioStateChanged event.

LichKing-2234 avatar Nov 10 '21 12:11 LichKing-2234

Can u please explain using a example code. That would help me

muhamadjawad avatar Nov 10 '21 12:11 muhamadjawad

https://docs.agora.io/en/Video/API%20Reference/react_native/interfaces/rtcengineevents.html#remoteaudiostatechanged

LichKing-2234 avatar Nov 10 '21 12:11 LichKing-2234

https://docs.agora.io/en/Video/API%20Reference/react_native/enums/audioremotestate.html

https://docs.agora.io/en/Video/API%20Reference/react_native/enums/audioremotestatereason.html

LichKing-2234 avatar Nov 10 '21 12:11 LichKing-2234

How can i implement it for individual users. for example I have 3 remote users a , b and c then hove know which of them are mute and which are not

muhamadjawad avatar Nov 10 '21 13:11 muhamadjawad

The best way is to store the state on your server.

LichKing-2234 avatar Nov 11 '21 05:11 LichKing-2234

Thanks but isn't any other solution than server as agora must be having this function.

muhamadjawad avatar Nov 11 '21 08:11 muhamadjawad

You can get it from this event, it will give the state of remote broadcaster after you join the channel.

https://docs.agora.io/en/Video/API%20Reference/react_native/interfaces/rtcengineevents.html#remoteaudiostatechanged

LichKing-2234 avatar Nov 12 '21 03:11 LichKing-2234

Thanks i have used UserMuteAudio event and that gave me boolean value of who is muted and who is not.

muhamadjawad avatar Nov 12 '21 11:11 muhamadjawad