xwp / wp-core-media-widgets

Feature plugin for development of new core media widgets for image, video, and audio (and others)
https://wordpress.org/plugins/wp-core-media-widgets/
35 stars 8 forks source link

Show error when unsupported video type is selected. #172

Closed timmyc closed 7 years ago

timmyc commented 7 years ago

This branch seeks to inform users that certain video file types are not supported via the renderPreview() in the widget itself. The .mov issue detailed in #171 is a bit complex - and until uploads can be properly restricted ( #128 ) - users will still be able to upload a .mov file which will not function properly when the widget is rendered on the front-end of the site.

So this branch is implementing @jasmussen 's idea - to not render a functioning <video /> preview in the widget for a file type that we know will not work. I borrowed @obenland's error message suggestion:

customize__wordpress_develop_ _just_another_wordpress_site

To Test

melchoyce commented 7 years ago

Looks good 👍

Can we tighten up the padding inside the notice code blocks to padding: 0 3px 0 0px;?

screen shot 2017-05-10 at 4 58 13 pm

Should "movie" be "video?"

timmyc commented 7 years ago

Thanks for testing it out @melchoyce - addressed the verbiage and padding in 23eaa1b

jasmussen commented 7 years ago

💖