Support » Fixing WordPress » Embedding audio to play in post/page – why is this so difficult?

  • Hi all,

    I have a self-hosted WordPress 3.5.1 site. It’s a stock installation with the Twenty Eleven theme. The only plugin I’m using is ‘Disable comments’.

    I would like to embed some mp3 files, which are in my media library, within pages on the site. I’m not too bothered about having a Flash player but would like them to appear as HTML5 players, or as download links for those with older browsers.

    If I insert an mp3 via the “Add media” button above the page editor, I get a hyperlink to the mp3 file. Clicking on it opens a new browser page where an HTML5 audio player plays the file. The audio player is fine, but how do I make it appear on the original page, not in a new window?

    I found this discussion from 2008, where somebody asked a similar question: they fixed it, but it’s not clear how.

    I then tried the audio shortcode described here, but this didn’t work, presumably for the reason described here in 2010.

    So I then looked at

    I found that the instructions under “Using the HTML5 audio Element” did produce an inline HTML5 audio player as I’d hoped – but the use of fallback text (“Your browser does not support this audio format”) doesn’t work — it appears in addition to the HTML5 player.

    Following the instructions under “Best HTML Solution” also produces an audio player, but after saving the code in the page editor, I noticed that WordPress automatically removes the fallback “embed” option.

    Isn’t the audio shortcode meant to simplify this process, or does it really not work at all on self-hosted sites in the current version of WordPress? Is the only alternative to a plugin — until WordPress 3.6 is released — to do all this in html?

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’ve always used this plugin: MediaElement.js I recommend that everyone uses it, especially now that the shortcodes will continue to work in 3.6 without the plugin.

    Thank you. Plugin installed and working well.

    Hmm, it seems that whereas the hand-coded HTML5 audio players will scale to the width of the screen, the MediaElement.js ones won’t.

    Does anyone know if MediaElement players will be “fluid” for different screen sizes when the plugin is rolled into WordPress core?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Embedding audio to play in post/page – why is this so difficult?’ is closed to new replies.