Fehler: Nach Update auf Contao 4.13 Probleme Mit Video in Customs Element
Produkt: Custom Elements Contao
Contao-Version: 4.13
Ich gebe ein Video als Hintergrund aus, bis Contao 4.9 hat das gut funktioniert:
rsce_video_config.php:
'backgroundVideo' => array(
'label' => array(
'en' => array('Background video', ''),
'de' => array('Hintergrundvideo', ''),
),
'inputType' => 'fileTree',
'eval' => array(
'tl_class' => 'clr',
'fieldType' => 'radio',
'filesOnly' => true,
'extensions' => \Config::get('validImageTypes') . ',mp4,webm,ogv,ogg',
),
),
rsce_video.html:
<?php if ($video = $this->getImageObject($this->arrData['backgroundVideo'])): ?>
<video class="video-background" src="<?php echo $video->src ?>" autoplay loop playsinline muted></video>
<?php endif ?>
Die if-Abfrage gibt NULL zurück.
Was hat sich hier geändert? Ich finde einfach den Fehler nicht.
Danke.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by RockSolid Theme... on 14 Jul, 2023 02:23 PM
Vielen Dank für Ihre Frage.
Mit folgendem Code im Template sollte sich der Pfad zur Video-Datei ausgeben lassen: