Get the relative volume of a song, javascript

I am trying to create an mp3 player for my site using JavaScript (and any related plugins / frameworks (jQuery) / libraries) and html5. So I built a player (more precisely, I implemented jPlayer ) , and now I want to make a visualizer.

Well, maybe this is not a visualizer (all the names of sound visualization methods always confuse me), I think I want something like this:

wavelenghth http://www.anthonymattox.com/wp-content/uploads/2009/04/processing_audio_waveform_spectrum_2.jpg

Or just something that displays the amplitude (volume) of the MP3.

So, does anyone know an API that can do this?

If you do not; I think I’ll build my own. Why do I need to know:

Does anyone know a way to get the amplitude / volume of an mp3 at any given point using JavaScript?

EDIT

Php question changed: MP3 render - PHP

+4
source share
1 answer

You will need to decode MP3 yourself. The html5 sound element and its implementation by browsers do not expose such data. For example, view Firefox's exposed methods for JavaScript. Closest to what you want is a "volume change" event. But this refers to the volume mixer in a browser-driven (i.e. output volume). This has nothing to do with the actual dB of the sound source.

, - , "" (, "timeupdate" ).

+5

All Articles