I realized people on iOS and other devices that don’t support Flash couldn’t use the embedded Flash player for listening to audio when using the WordPress Audio Player plugin.  I wanted to customize it so that sites would fall back to HTML5 if Flash wasn’t present. I found a post in the WordPress forums of someone who did this here.

However, his script didn’t work as it was for two reasons. First, he was Base64 encoding the url to the mp3 — not sure why. So I remmed out that code. Second, he was replacing the parent element with the <audio> tag, which was blowing away the entire post!  By replacing the element witht the id of the audio tag itself, walla!  Everything works!

You can download the modified file here and minify if you’d like.