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! :-)