Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!