• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Embedding html5 audio

Participant ,
May 04, 2012 May 04, 2012

Copy link to clipboard

Copied

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

TOPICS
How to

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 04, 2012 May 04, 2012

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 04, 2012 May 04, 2012

Copy link to clipboard

Copied

Hi Liam,

Thanks for your response.

I removed the ogg file. It now renders but does not function. Any thoughts?

Here us my new code:

<audio controls="controls">

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

</audio>

Message was edited by: cate1941

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 04, 2012 May 04, 2012

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 04, 2012 May 04, 2012

Copy link to clipboard

Copied

When I changed the path to /Song1.mp3, it disappeared in Firefox

Then I changed the path to:

<audio controls="controls">

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

</audio>

still not rendering.

I can't show you it live, as it is still unposted (blog).

If I give you my login, do you want to take a look?

If so, please post your email address.

Message was edited by: cate1941

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 04, 2012 May 04, 2012

Copy link to clipboard

Copied

Just send a private message to me on here

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2012 Jul 22, 2012

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 22, 2012 Jul 22, 2012

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines