Skip navigation
Currently Being Moderated

Embedding html5 audio

May 4, 2012 11:17 AM

Tags: #html5 #audio_embed #audio_not_rendering_in_firefox

I have embedded an audio into a blog post (still in draft) using the following code:

<audio controls="controls">

  <source src="Song1.ogg" type="audio/ogg" />

  <source src="Song1.mp3" type="audio/mp3" />

  Your browser does not support the audio tag.

</audio>

 

It works fine in chrome but not in firefox. In firefox there is just a blank space. Can anyone help me with this?

Thank you.

Catherine

 
Replies
  • Liam Dilley
    6,685 posts
    Feb 28, 2012
    Currently Being Moderated
    May 4, 2012 2:28 PM   in reply to cate1941

    Hey Catherine,

    Video is the one that manages the multiple files, Audio you have one source which just use mp3.

    Remove the first ogg source. Does that now work?

     
    |
    Mark as:
  • Liam Dilley
    6,685 posts
    Feb 28, 2012
    Currently Being Moderated
    May 4, 2012 5:44 PM   in reply to cate1941

    Where is the file, is it in the root? You should always start with a / for files and sources on a Business Catalyst Website.

     

    I guess you have already looked here? https://developer.mozilla.org/en/Using_HTML5_audio_and_video

     

    Could you provide a link to see and trial? If you not want to post it on the forums send me a PM.

     
    |
    Mark as:
  • Liam Dilley
    6,685 posts
    Feb 28, 2012
    Currently Being Moderated
    May 4, 2012 6:20 PM   in reply to cate1941

    Just send a private message to me on here

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 22, 2012 4:52 PM   in reply to Liam Dilley

    I just tested the <audio> tag in IE, Chrome, Safari & Firefox.  it works in all browsers except Firefox, so Firefox is your problem.  We currently have a discussion going in linkedin on this subject and the consensus is to use jPlayer.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 22, 2012 5:03 PM   in reply to Jim&Stella

    Firefox only supports .ogg format. You need to use both .mp3 and .ogg.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points