Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    Oct 2010
    Posts
    272
    Thanks
    8
    Thanked 1 Time in 1 Post

    HTML 5 Audio Tag Not Working In Firefox

    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
    Last edited by andynov123; 07-05-2011 at 05:18 AM.

  • #2
    Regular Coder
    Join Date
    Jul 2011
    Location
    India
    Posts
    496
    Thanks
    3
    Thanked 57 Times in 56 Posts
    please share your code..

  • #3
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,290
    Thanks
    23
    Thanked 611 Times in 610 Posts
    firefox and opera do not support mp3. They use Ogg Vorbis or wav. Here is the code to work with all browsers:
    Code:
    <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.

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    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...
    Last edited by teedoff; 07-04-2011 at 11:37 PM.
    Teed

  • #5
    Regular Coder
    Join Date
    Oct 2010
    Posts
    272
    Thanks
    8
    Thanked 1 Time in 1 Post
    The audio was just for testing purposes.
    Sunfighter will I be able to use your code by pulling audio files from database?

  • #6
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,290
    Thanks
    23
    Thanked 611 Times in 610 Posts
    I don't know Andy, you'll have to check that, but I can't think of a reason why not.

  • #7
    Regular Coder
    Join Date
    Oct 2010
    Posts
    272
    Thanks
    8
    Thanked 1 Time in 1 Post
    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!!

  • #8
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,290
    Thanks
    23
    Thanked 611 Times in 610 Posts
    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.

  • #9
    Regular Coder
    Join Date
    Oct 2010
    Posts
    272
    Thanks
    8
    Thanked 1 Time in 1 Post
    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
    Last edited by andynov123; 07-05-2011 at 06:20 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •