Add inline support for m4a audio

TimWilson

Active member
Although I've added .m4a to my approved attachments list, and those files can indeed be attached, there's no "Insert" button that would allow those files to be played within a post without downloading.

As @Jeremy P noted in his reply to my question about this, "XenForo doesn't consider the .m4a extension 'safe' for inline display. He continues,

That said, it might be worth us reconsidering as it's a reasonably common extension and MP4 audio should be broadly supported.

Here then is my official suggestion/request to add inline support for .m4a audio. :-)

Thanks,
Tim
 
Last edited:
Upvote 6
You do not necessarily have to wait for XenForo to "officially" support MP4 audio.

Putting
PHP:
$c->extend('inlineAudioTypes', function (array $types) {
    $types['m4a'] = 'audio/mp4';

    return $types;
});
in src/config.php should be sufficient.

Confirming that this works! Thanks so much for a solution that works today, @Kirby! Using it now, and members are digging it!
 
Back
Top Bottom