Bug #86934
closed
No rendering of audio files with "Text & Media" when they contain cover art
Added by Jeff C about 6 years ago.
Updated over 4 years ago.
Category:
Fluid Styled Content
Description
The issue https://forge.typo3.org/issues/86834 still exists.
It will work with simple mp3s, but not with files, that have cover art embedded, e.g. the windows example sounds. They are registered with file type "5".
Files
- Related to Bug #86834: No rendering of audio files with "Text & Media" added
- Related to Bug #71474: No rendering of audio files with "Text & Media" added
Can you add an example file?
I can't reproduce it with a test file and 9.5.1.
I attached the three files, that I used for testing this on Typo3 9.5.1.
The original mp3 file works. Then I added the JPG as Cover Art to the mp3 file – now Typo3 will register it as an Image rather than an audio file.
Basically if you can make \TYPO3\CMS\Core\Resource\Rendering\AudioTagRenderer::canRender() (or your own implementation that is registered with \TYPO3\CMS\Core\Resource\Rendering\RendererRegistry::registerRendererClass() ) return true on that file it is rendered in an <audio> tag.
Normal filetype-sniffers report application/octet-stream on that file. So to achieve that it would need reading ID3-tags on those files.
EDIT: typo3/sysext/fluid_styled_content/Resources/Private/Partials/Media/Type.html would need adjustment, too. With the current type=5 (FILETYPE_APPLICATION) it never gets rendered as an audio file.
A minimal approach would be to react to application/octet-stream in \TYPO3\CMS\Core\Resource\Driver\LocalDriver::getSpecificFileInformation() and resolve to mimetype=audio/mpeg if some better content sniffer detects audio inside the file. This would set type=3 (audio).
Is this an edge case or are there other media file types that don't get well detected by TYPO3?
- Complexity deleted (
easy)
With which tool do you add the cover art? I use https://www.mp3tag.de/ and i have no problems with this mp3 and image.
- Category set to Fluid Styled Content
- Status changed from New to Closed
Please use "$GLOBALS['TYPO3_CONF_VARS']['SYS']['FileInfo']['fileExtensionToMimeType']" setting in this case. To reliably natively identify all mp3 versions / mime-types is currently more or less impossible, and we have that configuration setting for exactly this kind of case.
(In addition, if you don't need the info from the ID3 tag you could also think about building a post-upload processor stripping the ID3 tags).
Also available in: Atom
PDF