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.
So I then looked at http://www.w3schools.com/html/html_sounds.asp.
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.
- The topic ‘Embedding audio to play in post/page – why is this so difficult?’ is closed to new replies.