...

View Full Version : Resolved HTML 5 Audio Tag Not Working In Firefox



andynov123
07-04-2011, 04:27 AM
I have the audio tag in my code and have it working in internet explorer and chrome but when I launch firefox I get an error. Whats wrong with my code?
Check it out at

www.college-ebook.com

vikram1vicky
07-04-2011, 02:46 PM
please share your code..

sunfighter
07-04-2011, 03:16 PM
firefox and opera do not support mp3. They use Ogg Vorbis or wav. Here is the code to work with all browsers:

<audio controls="controls">
<source src="song.ogg" type="audio/ogg" />
<source src="song.mp3" type="audio/mpeg" />
Your browser does not support the audio element.
</audio>
audio converters are on the web.

@ vikram1vicky - I use FireFox with ViewSourceWith 0.8 addon. It grabs a web sites html code and places it into the viewer/coder of your choice. Or you could just use the view page source in any browsers view menu.

teedoff
07-04-2011, 03:18 PM
Personally I probably wouldn't use the html5 specific elements like the audio tag yet. Obvioulsy, many browsers dont support it. There are other audio scripts you can use if you want. Also I hope this isnt an audio that will play automatically when the user visits your site. Very annoying...:(

andynov123
07-04-2011, 04:47 PM
The audio was just for testing purposes.
Sunfighter will I be able to use your code by pulling audio files from database?

sunfighter
07-04-2011, 04:57 PM
I don't know Andy, you'll have to check that, but I can't think of a reason why not.

andynov123
07-04-2011, 08:28 PM
When you say
audio converters are on the web.
are you talking about software you download that converts the audio or is there some sort of audio converter code I can add to my site that will see an mp3 and convert it automatically to .ogg for firefox because if there is that would be awesome!! :)

sunfighter
07-05-2011, 05:23 PM
Andy I was talking about software you download to do the conversion or web sites that do it for you on line. Converting in real time would just take too long and the user would think things were broken.

andynov123
07-05-2011, 05:46 PM
That just wont work out for my site. I'm thinking of getting rid of audio tag and adding third party media player. Now my only question is what third party media player will support mp3 on all browsers including firefox. Preferablly a third party media player that is free or not too expensive. I'm on a budget



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum