Opened 12 years ago
Closed 12 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 | 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)
Change History (9)
#2
@
12 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
@
12 years ago
Patch still works although broken for post formats by [23843]. Working on a fix.
#4
follow-up:
↓ 5
@
12 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
@
12 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:
↓ 7
@
12 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
@
12 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.
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.