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

147
Vistas
AudioConstraints don't work with navigator.mediaDevices.getUserMedia

No matter what I set for the audio constraints, it doesn't seem to affect the audio stream's settings. I have tried different microphones and browsers. I'm trying to get the highest quality stream. I would like a 192k bitrate but I'm not quite sure how sample rate and sample size translate to bitrate.

var textarea = document.createElement('pre');
document.body.insertBefore(textarea,document.body.firstChild)

var constraints =  {
  audio: { 
            sampleSize: 24 //no number works
            sampleRate: 41000 //nothing works unless I use a bad number like 8, then it drops to 24000
         }
}
navigator.mediaDevices.getUserMedia(constraints).then(function success(stream) {
    stream.getTracks().forEach(function(track) {
    textarea.innerHTML = textarea.innerHTML+track.kind+":"+JSON.stringify(track.getSettings(),null, 2);
    })
}).catch(function(err) {
   textarea.innerHTML = err.message;
});

codepen example: https://codepen.io/trackedsupport/pen/BamNvXZ

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