[wp-trac] [WordPress Trac] #40921: Inconsistent Handling of mp4 by Audio Widget
WordPress Trac
noreply at wordpress.org
Thu Oct 12 19:33:38 UTC 2017
#40921: Inconsistent Handling of mp4 by Audio Widget
------------------------------------------------------+------------------
Reporter: toddhalfpenny | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9
Component: Media | Version: 3.6
Severity: normal | Resolution:
Keywords: 2nd-opinion dev-feedback has-screenshots | Focuses:
------------------------------------------------------+------------------
Comment (by mikeschroder):
Agreed @blobfolio @westonruter -- WordPress assumes an extension can be
either audio or video, but not both.
This means strange things are going to happen if an extension is allowed
as both.
One example that seems to cause the symptom @blobfolio noted:
https://developer.wordpress.org/reference/functions/wp_attachment_is/
Specifically, https://core.trac.wordpress.org/browser/tags/4.8/src/wp-
includes/post.php#L5215 defaults to audio over video when checking what an
attachment is, solely based on what the extension is.
I definitely think we should fix it, but will need to also handle it in
terms of detecting media types more accurately on upload, rather than only
adding types that might be either to the audio or video extension lists.
In the meantime, it's not ideal, but folks should be able to work around
this by renaming `.mp4` audio files to `.m4a` before upload. I tested, and
this works for the example file above, [attachment:WhatsApp Audio
2017-05-14 at 12.58.14.mp4].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40921#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list