Browser JS: How to extract aac audio data from a mp4 file?

Using browser javascript, i need to load mp4-files containing AAC audio data, and extract this audio data for later use.

There is an mdat block in the mp4 file that (to my understanding) holds the embedded aac data, but just extracting the contents of that mdata block does not seem to give me valid aac data.

So, what is the simplest way to – in the browser – get embedded aac audio data out of a mp4 conatiner file?