I am building a site that stores a few mp3 audio files in mySQL. At the moment only 5, so efficiency is not an issue at all.
CUrrently, I am still trying to make a cross browser/platform solution that will not require other file formats.
I have a PHP script that retrieves the mp3 binary data and sends the appropriate header to the browser. The files can then be retrieved by specifying the src of the audio element (whether it be audio or embed, or other) as follows: src="retrieve_audio.php?uniqueAudioID=[PHP variable identifying file]". The retrieve_audio php file take the database ID provided in the URL and retrieves the data, sends it with the header to the requesting page...
This works well for audio and embed tags in Safari. Works well for embed in IE 6, 7 and 8.
For some reason Safari calls it a stream -probably because the size of the file is not provided - and the controls don't allow for scrubbing the file regardless of tag used (audio or embed). IE appears to understand the length of the retrieved file although it is not explicitly given.
The real issue, though, is Firefox, Opera and Chrome. These do not appear to understand this at all. FIrefox shows a control for a few secs and then displays an X as in - I can't play this... I am aware of the issues with the tag in Firefox. It does the same with embed. Opera and Chrome just either display nothing or a blank white square.
Any suggestions?
I never thought I would have to wrestle with Firefox on something that works in IE!
Any input will be much appreciated.
M