Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

317
Vistas
javascript webrtc in ios: play an <audio> while having access to microphone

I want to play an <audio> while I still have the access to the microphone. However, the iPhone 12 pro automatically decreases the sound level of <audio>.

Actually I don't want to play an <audio> and record microphone at the same time. I want to keep having access to the microphone taken by navigator.mediaDevices.getUserMedia({audio:true}) and play audio with full level of sound. In this way, I don't need to prompt for permission if I need the microphone again.

Also, I like to mention that sound level is ok if the user uses airbods.

What I tried:

When I don't need the microphone I can easily set the enabled property of audio track to false. stream.getTracks()[0].enable = false makes the microphone silent but does not increase the sound level of <audio>. This reaction sounds a bit strange because while the microphone track is silent nothing can be recorded. So decreasing the sound of audio is unnecessary.

I also tried to set the level of audio to 1 but it doesn't have any effect because it is already 1.

My conclusion until now:

It looks like iPhone reduces the sound to stop the possible noise on the microphone. However, It is unnecessary to happen if you have disabled the microphone track.

In Safari if you need the permission again and the time difference between the two permission is more than 90 seconds, user is prompted for permission.

is there any suggestion?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda