Native video/audio – My favourite WordPress 3.6 feature

Video Camera

Without a doubt, since the expulsion of the Post Formats UI from WordPress 3.6, my favourite feature is native video and audio support.

Clients have often asked me how best to include video on their sites, but WordPress has always been a bit clunky with video. You could upload the video file to your WordPress site, but it would only provide a link to the file, which would then be played in the browser (not embedded in your site).

Your alternative was to use a video hosting site like YouTube or Vimeo, for which there is shortcode support (via Jetpack) and oEmbed support.

Beyond that, you could always use a plugin to provide embedded video on your site, but there was never a clear-cut best option, and I for one had a hard time picking and choosing the best one at any given time.

Native audio and support

Now, with the release of WordPress 3.6, you finally have a stable, reliable choice. Using MediaElements.js under the hood, you can embed audio and video directly on your site and it includes cross-browser and cross-format compatibility, so your video will be viewable by the vast majority of users.

MediaElements.js cross-browser compatibility

So, you can now use most file formats to display video on nearly any device/browser within WordPress. That’s pretty sweet, and there’s no longer a need to go in search of a plugin or a third-party service to embed video in your WordPress site. As you can see from the chart above, your best bet is to use WebM + h.264 for the best cross-browser compatibility.

To demonstrate how it works, I embedded a video of my beautiful daughter below.

3 thoughts on “Native video/audio – My favourite WordPress 3.6 feature”

  1. Matt says:

    Hey Dave – is your “what next” box a plugin or created by you? Any info would be great!

    Thanks

    1. The box has been upgraded since I wrote the tutorial, but you can read all about it here. I coded it myself and have added a couple of extras since :)

      1. Matt says:

        Thanks Dave – much appreciated!

Leave a Reply

7ads6x98y