Audio problems on IOS Safari/Chrome

Hello. A few days ago I noticed a problem with audio and microphone on IOS Safari/Chrome. I enter the conference via iPhone, I give all access to the camera and the microphone, then I turn on the camera, turn on the microphone, everything works fine, others can hear me and I can hear them. But at one moment the sound disappears somewhere and even the microphone when I turn on the sound from me there is no sound. I tried to catch some error but there is nothing. When you turn on the microphone, the resumeConsumer event occurs, but the activeSpeakerId does not leave me. I’ve been struggling with this for a few days, please help.

There is detailed discussion here about autoplay policy for OIS:

Make sure you are not having autoplay related issues, as you said you joined with audio/video on so GUM will let you autoplay, so you didn’t face this issue initially but if you turn off your audio and video during the call then the audio received after that will have same autoplay issue causing these new audio streams to not play. Make sure you are not in this scenario if you have this scenario then keep audio captured from microphone to overcome it.

If this is not the cause of the issue then you are probably making some mistake in consuming etc, so you need to debug it via remote debugging from your safari browser to mac and see what is causing the issue.

is it something like getusermedia to call every time you enter the conference? I did just that, but on the iPhone it turns off the sound by itself and there is no access to the microphone

when initially a person enters the conference, I call getusermedia and get enumerateDevices and then stop the tracks then further when I click on the enableMic/disableMic microphone which in turn calls mediaDevices.getUserMedia is something wrong in this scenario?

Yes the thing is you should keep audio track captured right from the start of the call and stop/release it only when user leaves the call.

So when user joins the call then get audio track using getUserMedia and keep it somewhere in variable and when user turns on the audio then use that same track and when user turns off the audio then close the peer connection but don’t stop the track and these steps will repeat.

What happens if you change the device? Should I stop the audio track then re-request getusermedia on the audio and use that as well? Other audio won’t mute back? Have you implemented this for yourself?

If you change the device then I think the already captured track will auto stop and you will have to take fresh track from getUserMedia, and from this point the process is same as I described above.

This has been thoroughly discussed in this topic: