Display TCA fields for specific video file type (TYPO3 v12.4)

Adding an option to add panopto videos via the “Add media by URL” button inside the “Text & Media” element.
My new PanoptoHelper is working. However i am struggeling to get the fields displayed for only panopto files. Here is what i have done:

$GLOBALS['TCA']['tt_content']['columns']['assets']['config']['overrideChildTca']['types']['panopto'] = [
    'showitem' => '
        --palette--;;videoOverlayPalette,
        --palette--;;filePalette,
        --palette--;;panoptoMode,
        --palette--;;panoptoOptions'
];

The above is not working. But this is:

$GLOBALS['TCA']['tt_content']['columns']['assets']['config']['overrideChildTca']['types'][\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO]['showitem'] .= '--palette--;;panoptoMode,--palette--;;panoptoOptions';

This will however display the fields for all video files (also youtube and vimeo).
Perhaps i am missing something in my ext_localconf.php?

// Register the Panopto online media helper
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['onlineMediaHelpers']['panopto'] = \Aarhus\Panopto\Resource\OnlineMedia\Helpers\PanoptoHelper::class;

// Register the Panopto renderer
$rendererRegistry = GeneralUtility::makeInstance(RendererRegistry::class);
$rendererRegistry->registerRendererClass(PanoptoRenderer::class);

// Register panopto file extension
$GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] .= ',panopto';

// Register a custom mime-type for the panopto file extension
$GLOBALS['TYPO3_CONF_VARS']['SYS']['FileInfo']['mimeTypeCompatibility']['text/plain']['panopto'] = 'video/panopto';

I am working on a TYPO3 v12.4 installation.

Any suggestions?

Hi @antonbrixtoro!

I think this is caused by the mime type starting with “video”.

TYPO3 uses the first part of the mime type to detect the file type, so a mime type “video/panopto” will be classified as a video file and be handled the same. I don’t think there’s a good way to make one particular video format handle itself differently.

Here’s the lines affecting you in TYPO3 v12.4: