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

113
Vistas
audio.play() plays like a telephone call voice interestingly

Here is my simple audio play function:

let audioPlayResolve;

async function audioPlay(source) {
    return new Promise(resolve => { 
        audioPlayResolve = resolve;
        if(source === undefined) { resolve(); return; }
        const audio = new Audio(source);
        audio.crossOrigin = 'anonymous';
        audio.volume = 0.9;
        Playing.audios.push(audio);
        audio.play();
        audio.onerror = function() {
            console.log("Error loading: " + this.src);
            resolve(); 
        }
        audio.addEventListener("ended", function() {  
            audio.currentTime = 0;          
            resolve();          
        }); 
    });
}

This is working fine on chrome windows.

The issue is when I play audio in Android Chrome the voice gets somehow distorted like it's a telephone call voice.

The interesting thing is when I decided to change the volume of my phone I noticed the audio volume is not controlled by media volume but call volume.

So if I turn down the media volume of my phone to 0 the audio I played via the above function still has volume and I can hear it!

What should I do to solve these two issues?

  • The quality of audio playing
  • The volume should be controlled like normal audio via media volume not call volume
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