Is it reasonable to ask to add support for .FLAC and .AAC audio type of file with HTML 5 audio player?
Is it scheduled? Does it ask a lot of dev?
the problem i face is that i use mediaelement.js as audio player and i can play flac and aac with it on front end. the problem is that in the backend if i render audio file with the native drupal player audio, the player audio display for mp3, wav and ogg, but dont display for flac and aac. i dont want to use the mediaelement.js in the backend.

| Comment | File | Size | Author |
|---|---|---|---|
| #24 | add_support_flac_aac-3136196-24.patch | 1.15 KB | andrew answer |
Comments
Comment #2
OCTOGONE.dev commentedComment #3
cilefen commentedComment #4
OCTOGONE.dev commentedComment #5
OCTOGONE.dev commentedComment #6
nitesh624Comment #7
nitesh624@OCTOGONE.dev please check this patch in your system
Comment #8
nitesh624Comment #9
OCTOGONE.dev commentedThank you for your prompt contribution.
Comment #10
nitvirus commentedI was reviewing the patch , found out there were some extra spaces
Attaching patch and interdiff file for this.
Not changing the status of ticket.
----
Nit
Comment #11
nitvirus commentedComment #12
andypostIs there a logic behind the way the additions are ordered?
Is there a test to extend?
Comment #13
nitesh624@andypost thanks for you reply.
1. this issue was caused due to the mime type of .flac was set to "112 => 'application/x-flac'," so i added another mime type "112 => 'audio/flac' ," which solving the issue , so we need to decide which one to keep? in #7 I kept both mime type.
2. I could not find any test related to mime type. Can yiu help me if you somthing. I looked into it core/modules/file/tests/src/Functional/Formatter/FileAudioFormatterTest.php
Comment #14
phenaproximaIt doesn't look like this is specifically related to the media system.
Comment #18
andrew answer commentedCorrect patch uploaded; this patch fix the spaces and don't add additional unneeded line chemical/x-alchemy.
Comment #19
mfbI don't think there's any reason to add a duplicate key 112 for flac. Just fix the existing entry (
112 => 'application/x-flac',).It seems like a good idea to add a change record as well, just in case someone has custom code around this mimetype?
(Possibly it could even make sense to update the filemime of existing files in the file_managed table, although I don't know if there is any precedent of doing that.)
Comment #21
andrew answer commentedAdded new patch which deleted existing FLAC record. I also found that OPUS files (*.opus) have same problem like AAC/FLAC. Fixed now.
Comment #23
mfbThis patch needs a couple little tweaks: It looks like the
$defaultMapping['mimetypes']array is in alphabetical order, so e.g. audio/flac should be moved up to follow audio/basic rather than being at the end of all the audio mimetypes. And the$defaultMapping['extensions']array seems to be maintained in numerical order, so the 189 entry should be moved up.Comment #24
andrew answer commented@mfb patch updated.
Comment #25
mfbThis looks good to me. Added a draft change record.
Comment #26
alexpottWhy not audio/x-acc and audio/x-flac - this is consistent with \GuzzleHttp\Psr7\MimeType::MIME_TYPES - ah I see looking at https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#flac audio/flac is now the standard. Same with audio/aac.
Nice.
Comment #27
alexpottCommitted 448519a and pushed to 10.1.x. Thanks!