WordPress audio/video embed

WordPress mp4 videos supported without plugins in 3.6

Following on from my last post on WordPress 3.6 and post formats comes the news that mp3 audio and mp4 videos are now supported directly via new video and audio shortcodes.

WordPress audio/video embed
WordPress audio/video embed

Previously you needed to install separate plugins to embed these formats, as they weren’t supported by the standard WP_embed shortcode. Here’s the full details directly from the Make WordPress core blog;

Audio / Video support in Core

Post Formats are a big feature in WordPress 3.6. What you may not know is: there is now native support for Audio and Video in core! There has been great support for embeds by way of WP_Embed and oEmbed providers for a while, but, if you wanted to play an MP3 from your Media Library, you had to install a plugin. Supporting audio and video in core gives bands, podcasters, vloggers, et al the ability to easily and beautifully expresses themselves through sounds and moving pictures without using an external service.

How does this work?

At the core of the experience is the fantastic library, MediaElement.js. MediaElement is the facade layer that gives us maximum file support and cross-browser compatibility. While some libraries require a Flash-only solution to make your media work cross-environment, MediaElement lets you use HTML5 audio / video tags in every browser, and, only when necessary, will use a Flash or Silverlight plugin in the background to make incompatible media work. Translation, things like this: <audio> tag works in old IE, Windows Media files work in Chrome.

MediaElement uses the same HTML markup, regardless of playback implementation, and you can use CSS to skin the players.

More at Make WordPress Core

This is a great step forward for WordPress media handling, and a timely one for me as I’m just starting to build a new online digital marketing course extension for the Smart Insights site – this will be using mp4 as the video format so it’s nice to know that using core I can add WordPress mp4 videos natively now!

Published by

Stu Miller

Web consultant and specialist, WordPress developer and PHP developer based in Leeds, UK. 15 years experience in architecting web sites and applications. Co-founder and Technical Director of SmartInsights.com, formerly the same of First 10 Digital

Leave a Reply