I\'m getting a pure binary MP3 stream from an ajax call. No headers, nothing. Just straight MP3 bits. (Actually is that really even a stream at all?)
I\'d like to b
as indeed mentioned, you'll need a mp3 playing plugin, flash being the most widely available. The JMP3 jquery plugin makes that task easier for you. It does rely on a flash file for the sound processing.
If you're only targeting very modern browsers, you could make use of data URL:s, and just write an object element to your HTML, and link to that data URL. Note: I havn't tried this.
You might want to look at SoundManager 2: Javascript Sound for the Web
Its an open-source BSD licensed JavaScript script for dealing with sound.
It automatically hooks into HTML5 or Flash to produce the sound, depending on what is available.
You cant play music with pure javascript. you will need to get that stream and pass it to a flash player.
try JW flash player, though i am not sure if it can handle the type of stream you are talking about. you will have to do some research about what it can handle
I have done this using data uris and there is the browser compatibility issue, there is the problem of url length (basically > about 30,000 characters won't support IE) and there is also the problem of the browser taking forever to decode the base64 value (the buffering is also extermely slow).
With current web technology, I would say your best bet is to write the data to a temporary file on your server and then have something like Dewplayer load the temporary file and play it.