Previously: https://make.wordpress.org/core/2014/01/29/audiovideo-2-0-update/
It has been a slow and steady burn of commits related to media and necessary for playlists:
[27059], [27063], [27907], [27100], [27127], [27209], [27212], [27213], [27214], [27215]
A few items for conversation….
Thumbnails for Audio and Video
We have been parsing the ID3 tags in audio and video files on upload since 3.6. ID3 tags, in many cases, contain the binary bits for an image related to the item (album cover, still, etc). On upload, if your theme and the relevant pseudo post type for attachment:audio
or attachment:video
registered support for thumbnails AND your current theme supported it, we would upload the image bits and attach to the media item as its featured image A featured image is the main image used on your blog archive page and is pulled when the post or page is shared on social media. The image can be used to display in widget areas on your site or in a summary list of posts..
So basically it was a hidden feature, because it required you to jump through hoops to turn it on.
add_post_type_support( 'attachment:audio', 'thumbnail' );
add_post_type_support( 'attachment:video', 'thumbnail' );
add_theme_support( 'post-thumbnails', array( 'post', 'attachment:audio', 'attachment:video' ) );
On top of that, if you switch themes, and the theme doesn’t support thumbnails for audio or video, the images will no longer appear alongside the media on the Edit Media page. Weird.
Playlists are best enjoyed with images, videos are best enjoyed with poster images. Soundcloud is doing some awesome things with images in their embeds – see a few on the homepage here: http://highforthis.com. Moral of the story: I think this support should be on by default. Alternately, we could add that code to every default theme’s functions.php
, but then what if you switch themes…
Playlist UI User interface
As I mentioned previously, the UI for playlists needs to be:
1) Adaptable
2) Extensible This is the ability to add additional functionality to the code. Plugins extend the WordPress core software.
3) Generic
Translation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization.: it needs to show up in a theme without much drama, inherit the style of the theme, respond the theme’s $content_width
, all while allowing you to completely override this behavior. So, what I have is an ultra generic design controlled by settings in the media modal:
I have tested this in the last 5 default themes:
Twenty Fourteen
Twenty Thirteen
Twenty Twelve
Twenty Eleven
Twenty Ten
I would like to drop this code in soon, but I wanted to give an opportunity for feedback. All of this can easily be iterated upon once it goes in.
Documentation of 3.5 Media Code
This is ongoing – there has been a lot of code churn in the Backbone code, by myself and others, I’ll be picking this back up once that settles down.
#audio, #media, #playlists, #video
You must be logged in to post a comment.