Audio/Video 2.0 Update


Upgraded to 2.13.2: [27059]

Documentation of 3.5 Media code

#26870 Add (JSDoc)umentation to the Backbone-centric Media files

This is underway, with several commits already. Slow-and-steady approach. Have started with annotations, gradually adding top-level comments to all class methods. I have been using pseudo-code to map out each file:

Start with identifying every piece of the tree, then making sure all methods have each piece of the documentation.


#26650 Replace media file type icons with Dashicons

These will replace the “crystal” icon set. For AV2, we are interested in replacing the icons that show up in the media list tables, and using the icons in the placeholders for Audio, Video, Playlist, and Video Playlist shortcodes in TinyMCE content.

wpautop() changes

#26864 Consolidate handling of object, audio and video tags in wpautop

PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher and JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. versions of wpautop() need to respect the inner elements of media HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. tags for media: <param>, <embed>, <track>, <source>
Initial patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. – ongoing work from azaozz

#26628 Use the content of a video shortcodeShortcode A shortcode is a placeholder used within a WordPress post, page, or widget to insert a form or function generated by a plugin in a specific location on your site. when provided – depends on ^

Placeholders (TinyMCE views) for Audio / Video shortcodes


Depends on: #26628

Chromeless YouTube via ME.js

#24764 Support mediaelement.js YouTube sources in the video shortcode

This has a patch:

I have just been letting it soak in the wild for a day.

Metadata Regeneration for audio/video

#26825 Add ability to generate metadata for audio / video files on-demand

This currently has 2 implementations.

  1. a button on the Edit Media page if your audio or video does not have a row in postmeta for _wp_attachment_metadata (! isset(), not ! empty())
  2. On the fly in wp_prepare_attachment_for_js()

#1 requires the user to care

#2 IMO does not scale, as the media modal loads ALL of your media in one fell swoop upon being opened – let’s say you have 300 videos uploaded pre-3.6: there will be no metadata, so you might melt your filesystem by scanning and analyzing 300 files at once.

This is still in the exploratory phase – would love some UXUX User experience thinking on this.

Playlist and Video Playlist shortcodes

#26631 Add a “playlist” shortcode

The TinyMCE view code can probably be merged into the wpaudiovideo TinyMCE pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the Plugin Directory or can be cost-based plugin from a third-party once #26628 goes in, which has its own dependencies. As I mentioned, Playlists and Video Playlists probably need their own identifying icons.

I have created a basic UIUI User interface for playlists that inherits styles from your existing theme. The HTML and CSSCSS Cascading Style Sheets. is minimal and generic. Here are some screenshots of it in action:

Twenty Ten

Screen Shot 2014-01-29 at 3.06.07 PM

Twenty Eleven

Screen Shot 2014-01-29 at 3.05.12 PM

Twenty Twelve

Screen Shot 2014-01-29 at 3.04.45 PM

Twenty Thirteen

Screen Shot 2014-01-29 at 3.05.52 PM

Twenty Fourteen

Screen Shot 2014-01-29 at 3.05.31 PM