playing an mp3 file and loading a waveform image?

712 views Asked by At

How can I play an mp3 and generate a wafeform image using HTML5 or Jquery?

Thanks Advance!

1

There are 1 answers

1
Dan O'Boyle On

Playing an audio file with HTML 5 is pretty straight forward:

<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>

Above Example from W3Schools

As for generating a waveform I'd check out waveform.js