getgrav / grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony

Home Page:https://getgrav.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Add FLAC and AAC as media types

suterma opened this issue · comments

In config/media, many file types are included by default, including audio files, like e.g. MP3. I suggest that you also add FLAC and AAC files there since these are also popular file types.

Additionally, I suggest that these are also added in the media player handler mentioned here: https://learn.getgrav.org/17/content/media#audio-actions

Currently, these files do not produce an audio element, even when added to the configuration media.

Hi @suterma
In fact Grav has support for those types of audio files, you just have to add the extensions in config/media.yaml, as follows:

flac:
     type: audio
     thumb: media/thumb-fla.png
     mime: audio/flac
     image:null
aac:
     type: audio
     thumb: media/thumb-aac.png
     mime: audio/aac
     image:null

Then on your page load the audio files and call them from the page editor. Here I show you a screenshot (and I can assure you that the audio plays)

Flac sample

![sample3.flac](sample3.flac)

AAC sample

![sample3.aac](sample3.aac)

flac_aac_grav

Thanks @pmoreno-rodriguez for coming back to me. It now works, however, I had also one more problem to fix: I forgot the exclamation mark in front of the FLAC-link:

DID NOT WORK: [FLAC](8%20-%20Truth.flac?preload=metadata)
DOES WORK: ![FLAC](8%20-%20Truth.flac?preload=metadata)