[wp-trac] [WordPress Trac] #23282: Add shortcodes for inline HTML5 audio / video
WordPress Trac
noreply at wordpress.org
Tue Jan 29 16:31:12 UTC 2013
#23282: Add shortcodes for inline HTML5 audio / video
-----------------------------+------------------
Reporter: wonderboymusic | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 3.6
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-----------------------------+------------------
Comment (by wonderboymusic):
[attachment:23282.2.diff] supports fallbacks for video of type
`video/webm` (WebM, V8 codec) and `video/ogg` (Ogg Theora). Also allows
flash fallback to be turned on or off. Also supports the `poster`
attribute on the video and the flash fallback when enabled (it is by
default). Example shortcode with all of the current features:
`[video src="1.mp4" ogv="2.ogv" webm="3.webm" poster="/4.jpg"
flash="false"/]`
Why is this necessary? Specifying `webm` AND `H.264` give you the most
native HTML5 support: http://mediaelementjs.com/#devices
Why a shortcode for video?
- Easiest way the slap a video anywhere
- For right now easiest way to specify multiple versions of a video,
post_parent-ing and relationships can be a mess when you attach multiple
videos to the same post, since currently there is no way to associate
attachments with each other
I have implemented MediaElement a bunch of times, and each time I used the
first plugin I ever wrote: [https://github.com/staylor/shuffle Shuffle].
Shuffle lets you attach attachments to other attachments, since all you
are really doing is setting post_parent on the "child" attachments. By
doing this, you can assign images and other codecs to a video or mp3. So
your Post can have a Video that has a Poster Image and an Ogg Theora
version and a WebM version. This way, you can attach 12 MP4s to your post
if you so choose, and you can cleanly get their counterparts with having
to dig through all media attached to the post ID.
Not sure what to propose happens to core for stuff like this right now, so
sticking with the shortcode. Patch will evolve with my thinking.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23282#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list