How to get remote microphone mute/unmute state
Hi, please I've been on this for about a week now, how can one get the state of a remote user's microphone?
I tried using RemoteAudioStateChanged event but it's not working as I expect. Based on the documentation this event has two things (state and reason) I should be able to use in the callback.
But every time I unmute state moved to 1 (Starting) and then to 2 (decoding) if I unmute it again moves from 1 (Starting) and then to 2 (decoding). Reason moves to 0 (Internal), then to 3(LocalMuted), and then to 2(NetworkRecovery) both when I mute and when I unmute.
I use the following code to toggle the mic for the users on their end.
function toggleMicrophone (state: boolean) {
engine.enableLocalAudio(state)
.then(() => {
// Do something
})
.catch((e) => console.log(e))
}
I don't quite understand how to use this to get the remote user's microphone mute/unmute state, please can anyone help?
Thanks!
could you pls provide the SDK log file?
Hi @LichKing-2234 how can I get the SDK log file?
You can have a look at my screenshots here: https://github.com/AgoraIO-Community/react-native-agora/issues/372 You can print all your own logs out, it would be easier to see the problem. BTW: here's the SDK log file location:
* Android:
{{/storage/emulated/0/Android/data/<package name>/files/agorasdk.log}}
* iOS:
{{}}
{{App Sandbox/Library/Caches/agorasdk.log }}