This blog now uses HTML5 for audio

Though this might not sound interesting, but today I made an important step: I switched from using an old, but trusty Flash-based audio player plugin to the current state of the art for embedding audio into HTML: the HTML5 Audio element.

What’s in for you? Finally, the audio tracks can be listened on all mobile devices that usually lack Flash. Together with the new Twenty Fourteen theme, my blog is finally fully enjoyable on the go. More technical details on the transition can be found below:

WordPress, since version 3.6, supports adding audio to blog posts natively by offering a handy shortcode:

[audio src="audio-file.mp3"]

Unfortunately, all my old reviews (over 100) relied on the shortcode provided the old plugin, and both schemes could not coexist:

[audio:audio-file.mp3]

Fortunately, there is a regular expression search & replace plugin for WordPress that saved me from having to code the translation in SQL. The plugin has a life-saving preview function, and one replace operation later all old shortcodes were all new and shiny. Enjoy!


Posted

in

by

Tags: