Posted by Deleted User on

Hi

I am having problems embeding an mp3 to a page, I have uploaded an mp3 to my the assets folder, but whatever way I try to embed the file including manually entering HTML I cant get it to play.

2: Re: Embeding an mp3 (response to 1)
Posted by amunizp on

Have you tried converting the file to *.ogg? mp3 is not compliant with world wide web standards so I do not think it will work without using a widget of some sort.

3: Re: Embeding an mp3 (response to 2)
Posted by Deleted User on

Yes i have tried that. when i use the embed media button and the choose an audio file from my assets. Nothing seems to happen.

4: Re: Embeding an mp3 (response to 1)
Posted by Voice Admin on

Hi - I have had a play with this and discovered:

  1. TinyMCE was stripping out the <audio> tag that the Media button was adding. I have now corrected this.
  2. Although the Media button allows you to specify several versions of the file (e.g., MP3 and Ogg), TinyMCE rewrites the HTML in such a way to prevent any of the alternatives being used by the browser.

So the upshot of this is that you can only really use one encoding of the file per widget. Unless you disable TinyMCE and edit the page source directly (you can do this by temporarily disabling JavaScript in your browser).

MP3 is supported by IE9+ and Safari, and Ogg is supported by Firefox.

I have set up an audio test page on the demosite here. I added the last widget manually after disabling JavaScript in the browser, so that TinyMCE didn't appear. This widget therefore should retain its ability to have both the MP3 and Ogg file at the same time, and work on more browsers. (Note that with JavaScript disabled, you need to publish the page from the Publishing tab, as the Save and Publish button won't do so). You'll also need to re-enable JavaScript to see the widgets appear in Firefox!

So, for an easy life, perhaps just use the MP3 version. If you want to support Firefox too then have two widgets, or use the manual HTML editing version - though this latter option is for advanced webmasters only! :-)

Thanks

Joe