WordPress 3.6 Audio Autoplay
How to Make Audio Autoplay Using a Shortcode in WordPress 3.6
Music: “Rise of the Nazi Machine”, courtesy: John Keltonic | copyright JDK Music | All Rights Reserved
How is the above audio clip playing natively within a post AND with autoplay enabled too? You can read the official WP blog post on new audio features and you won’t find it. There is documentation listing available attributes: preload, loop, autoplay, etc.., but nothing on how to enable them.
You can check the Codex, too, but good luck finding out how actually to get the mp3 to start playing. (note: Apple has disabled autoplay on iPhone since iOS 4.2.x. iPad WILL autoplay.)
After fiddling with all possible iterations of autoplay=”true”, autoplay=”1″, autoplay=”yes”, etc.., I stumbled upon the apparently undocumented answer earlier today while working on a client site.
(Ignore additional spaces in the word “audio.”)
[a u d i o mp3="your_URL/music.mp3" autoplay="y"][/audio]
Overall, 3.6 seems to be a great release in my testing and live site usage. Kudos to the WP Team for making embedded audio and video work natively.