Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#24076 closed defect (bug) (invalid)

Post Formats: Uploading an unsupported video or audio file type results in a grey box

Reported by: ocean90's profile ocean90 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.6
Component: Media Keywords: needs-patch
Focuses: Cc:

Description

  • Create a new post
  • Choose video post format
  • Upload a .mov video

Result:

A grey box which size is 1920x1080px. In the upper left is the download link, since mediaelement/HTML5 doesn't support .mov videos.
IMO there should be a notice, which video files are supported.

Attachments (1)

24076.diff (424 bytes) - added by kovshenin 11 years ago.

Download all attachments as: .zip

Change History (9)

@kovshenin
11 years ago

#1 @kovshenin
11 years ago

  • Keywords has-patch added; needs-patch removed

Not sure at which point we can issue a notice about supported video file types.

24076.diff falls back to wp.media.string.link for unsupported video formats.

#2 @ocean90
11 years ago

  • Keywords needs-patch added; has-patch removed

Patch doesn't work for me. Still getting the grey box. After a refresh I get the link.

#3 @kovshenin
11 years ago

Patch still works although broken for post formats by [23843]. Working on a fix.

Update: actually no, the patch just didn't address that, my bad :)

Last edited 11 years ago by kovshenin (previous) (diff)

#4 follow-up: @kovshenin
11 years ago

Looked into this a little more and there are several issues that need to be addressed.

First is code duplication between post-formats.js and media-editor.js where we convert a chosen video to a shortcode. It seems like we can simply use wp.media.editor.send.attachment in post-formats.js which will take into account supported types in media-editor.js and produce the correct HTML code for the output. However, mediaPreview in that respect is slightly different since it does not operate on a shortcode, but rather renders a video from the attachment model.

Second is the whole UX flow of supported and unsupported media formats. During a mediaPreview with an attachment model, we can find out whether the file type is supported and render an error message if not. However, that only works during the video selection flow, so as soon as you save the post and cause a refresh, the preview will just render whatever HTML is in the PF meta, which is weird, especially since the preview area is not clearly marked as a preview area.

Finally, I think the HTML area is too permissive. We know we're expecting a video, but we're really accepting arbitrary HTML. I'm trying to think of a way we can restrict it to supported media only, including all possible video shortcodes, oEmbed, etc. Any ideas?

#5 in reply to: ↑ 4 @SergeyBiryukov
11 years ago

Replying to kovshenin:

Finally, I think the HTML area is too permissive. We know we're expecting a video, but we're really accepting arbitrary HTML. I'm trying to think of a way we can restrict it to supported media only, including all possible video shortcodes, oEmbed, etc. Any ideas?

Related: #24301

#6 follow-up: @anderton
11 years ago

When i tested, the issue was not only with .mov, but also for .AVI (different codecs), MKV (different codecs) and .MPG

#7 in reply to: ↑ 6 @kovshenin
11 years ago

  • Summary changed from Uploading .mov file results in a big grey box to Post Formats: Uploading an unsupported video or audio file type results in a grey box

Replying to anderton: Right, whatever is not supported by our MediaElement.js implementation and not limited to video.

#8 @markjaquith
11 years ago

  • Milestone 3.6 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Removing post formats UI from core: #24452

Note: See TracTickets for help on using tickets.