Make WordPress Core

Opened 9 years ago

Last modified 6 years ago

#23282 closed feature request

Add shortcodes for inline HTML5 audio / video — at Initial Version

Reported by: wonderboymusic Owned by:
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.6
Component: Media Keywords:
Focuses: Cc:


WordPress supports the 'audio' and 'video' post formats, however WordPress has no native ability to play audio or video.

I have been using and following MedaElement.js for a while. It is, in my opinion, the most cross-browser compatible and extensible HTML5 solution out there. https://github.com/johndyer/mediaelement

in a nutshell:

A complete HTML/CSS audio/video player built on top MediaElement.js and jQuery. Many great HTML5 players have a completely separate Flash UI in fallback mode, but MediaElementPlayer.js uses the same HTML/CSS for all players.


Flash Fallbackforward

Instead of offering an HTML5 player to modern browsers and a totally separate Flash player to older browsers, MediaElement.js upgrades them with custom Flash and Silverlight plugins that mimic the HTML5 MediaElement API.

Magic happens, and then IE6-8 supports <video> and <audio>, Firefox and Opera support h.264, and Safari and IE9 support WebM (*if Adobe makes good on promises to support VP8 in Flash).

My patch makes 2 new shortcodes [audio] and [video], both will pull the first attached mp3 (for audio) or mp4 (for video) attached to the post. If the src attribute is passed, the shortcode doesn't check for an attachment.

The patch is proof of concept and could (maybe?) use some more features. I will attach a sample mp3 and mp4 to the ticket to use for testing.

Change History (0)

Note: See TracTickets for help on using tickets.