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

242
Vistas
Load audio bytes as a source to <audio>

After reading a thousand website I still am not able to find the straightforward way to load a WAV file into an audio tag in HTML.

I have the following in my html:

<h2>Answer</h2>
<audio controls autoplay id="audioholder">
  <source id="audiosrcholder" src=none type="audio/wav">
  Your browser does not support the audio element.
</audio>

and the following in my script's success function of an AJAX request:

success: function(stream) {
            audiosrcholder.src = stream
            {#audiosrcholder.setData(stream)#}
            
            audioholder.load()
        }

where I note that the response of the used request contains a WAV audio file with a Content-Type header set to 'audio/wav'.

The idea is to not save the file locally, but directly stream it to the audio control.

If I log the WAV file (stream), I can see the actual WAV content starting with RIFF... Here is a snippet: RIFF����WAVEfmt

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