#40819 closed defect (bug) (fixed)
Audio widget in WP 4.8 - unsupported audio files (eliminate support for WMV and WMA files)
Reported by: | Guido07111975 | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | 4.8 |
Component: | Media | Keywords: | has-patch commit has-dev-note |
Focuses: | Cc: |
Description
Hi members of Core team,
When using an unsupported audio file such as .wma (Windows Media Audio) it doesn't display nicely in both frontend/backend. Check attachment.
Guido
Attachments (6)
Change History (30)
#2
@
7 years ago
Took a stab at adjusting the CSS to produce a better output for non supported audio files.
#3
@
7 years ago
- Keywords reporter-feedback added; has-patch needs-testing removed
@vijustin Modifying mediaelementplayer.min.css
isn't an option since it is part of a 3rd-party library. I see a similar issue was posted in https://github.com/mediaelement/mediaelement/issues/1728
@Guido07111975 Thanks for the report. You'll notice actually that if you have a WMA file uploaded to your media library, it is not listed among the files that you can select. How did you select the WMA file to begin with? Note that there is a quirk with the uploader whereby it is not restricting the file types for upload according to what is shown in the media browser. Is that how you were able to upload and select an WMA file? See https://github.com/xwp/wp-core-media-widgets/issues/128
Or did you select it via supplying a URL to embed?
#4
@
7 years ago
Working off of Version 4.8-beta1-40787, when selecting audio files to add the the Audio Widget .wma files are showing as an option for me.
#5
@
7 years ago
@westonruter I was able to upload .wma file directly in the media library and select it while adding the audio widget (check new attachment).
I can also upload .wma file while adding the audio widget BUT it's not listed there after upload is finished. When visiting the media library afterwards, the file is listed there.
Guido
#6
follow-up:
↓ 20
@
7 years ago
- Keywords needs-patch added; reporter-feedback removed
- Milestone changed from Awaiting Review to 4.8
Indeed. I can see in the Ajax request that the MIME types being queried are: audio/mpeg,audio/ogg,audio/x-ms-wma,audio/mpeg,audio/wav
. The audio/x-ms-wma
format really shouldn't be included because it is not embeddable. If MediaElement.js isn't able to play them, then they shouldn't be included in wp.media.view.settings.embedMimes
.
And in fact, I see that MediaElement.js no longer supports these formats:
Support for wmv and wma has been dropped since most of the major players are not supporting it as well.
The solution to this may be to eliminate WMV and WMA from being considered embeddable media.
@Guido07111975 @vijustin the behavior you see for embedding WMV and WMA files is no better in the context of the edit post screen, is it?
#7
@
7 years ago
@westonruter no strange behaviour when adding unsupported .wma file in post or page. So yes, I can add this file type in post or page.
#8
@
7 years ago
@westonruter Confirmed, when adding .wma files in the post editor the "Attachment Display Setting" defaults to Embed Media Player which creates the same issue as the audio widget. Removing aduio/x-ms-wma as a supported mime type for embeding seems like the a good solution to this problem.
I spent some time looking so I could submit a .diff, but I'm can't seem to find where WordPress defines which mime types should be supported for embedding. Looks like this one is beyond me at the moment.
#9
@
7 years ago
- Keywords has-patch added; needs-patch removed
- Summary changed from Audio widget in WP 4.8 - unsupported audio files to Audio widget in WP 4.8 - unsupported audio files (eliminate support for WMV and WMA files)
@vijustin @Guido07111975 try 40819.2.diff
#10
@
7 years ago
@westonruter Ahh man can't believe I couldn't find that.
On a positive note after applying the patch locally the Audio Widget no longer offers .wma files as an option and adding media during post editing no longer offers the 'embedded media player' as an option and instead defaults to 'link to media file".
#11
@
7 years ago
- Keywords 2nd-opinion added
Need a 2nd opinion on the impacts for removing WMA and WMV format support.
This ticket was mentioned in Slack in #core-media by westonruter. View the logs.
7 years ago
#13
@
7 years ago
- Keywords commit needs-dev-note added; 2nd-opinion removed
This will probably need a dev note.
#16
follow-up:
↓ 18
@
7 years ago
@westonruter I'm having the same experience as @vijustin describes:
On a positive note after applying the patch locally the Audio Widget no longer offers .wma files as an option and adding media during post editing no longer offers the 'embedded media player' as an option and instead defaults to 'link to media file".
Besides this I'm wondering whether it's possible to do a filetype check upon upload. I can upload all supported filetypes while adding the (audio/video/image) widget.
Guido
#17
@
7 years ago
Based on MediaElement.js dropping support for these filetypes, I think it makes sense for us to remove embed support since the current behavior creates confusing user expectations.
#18
in reply to:
↑ 16
@
7 years ago
Replying to Guido07111975:
Besides this I'm wondering whether it's possible to do a filetype check upon upload. I can upload all supported filetypes while adding the (audio/video/image) widget.
Yes. I believe this should be addressed with the resolution of https://github.com/xwp/wp-core-media-widgets/issues/128
Essentially, when opening the media modal for the audio widget, the uploader should prevent uploading WMA files at that time. @joemcgill is there a trac ticket for this anywhere?
#20
in reply to:
↑ 6
;
follow-up:
↓ 22
@
7 years ago
Replying to westonruter:
Support for wmv and wma has been dropped since most of the major players are not supporting it as well.
I may be wrong, but I think that applies to MediaElement starting with version 3. WordPress still uses 2.22, see #39686.
Regardless, FWIW I'd agree with removing core embedding support for WMV and WMA files. Not sure what should be done with these two lines: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/js/mediaelement/wp-mediaelement.js?rev=40659#L6
#22
in reply to:
↑ 20
@
7 years ago
Replying to afercia:
Not sure what should be done with these two lines: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/js/mediaelement/wp-mediaelement.js?rev=40659#L6
I don't see any harm in keeping them around for now, but eventually they can be removed.
#23
@
7 years ago
Hi,
Just installed 4.8 beta 2 and I notice an unsupported file still isn't listed very nice in dashboard. Check attachment.
@vijustin added this attachment last week: https://core.trac.wordpress.org/attachment/ticket/40819/40819.diff
Guido
WP 4.8 audio widget