Inhaltselement youtube überarbeiten?
In der Contao Demo sieht man eigentlich schon , dass das Inhaltselement Youtube so wie es aktuell ist nicht wirklich brauchbar ist.
Abgesehen von der fehlenden Responsivität die man ja selbst per CSS umsetzen kann, ist die Vollbilddarstellung nicht wählbar, wenn man auf das viereckige Symbol unten rechts in der Playerleiste klickt.
Das Video passt sich ja offensichtlich auch nicht in den Player ein.
Youtube bringt doch schon einen Player mit, wozu also den mediaelement Player, der sichtlich Probleme macht ?
Wie macht Ihr das , außer jetzt den Code direkt per „eigener HTML Code“ einzubinden, was selbstverständlich auch ‚ne Lösung ist ;)
Wird das evtl. überarbeitet zukünftig ?
LG
Bennie
Liste der Anhänge anzeigen (Anzahl: 4)
Habe das noch mal alles überarbeitet, geht nun , habe hier mal alles angefügt für die nachfolgenden die auch das Problem haben. dank geht an Spooky für den CODE ...
Template:
Habe im Iframe noch die Vollbildfunktion eingebaut. kollege war mal so freundlich mir eben zu helfen.
HTML-Code:
<?php $this->extend('block_searchable'); ?>
<?php $this->block('content'); ?>
<!-- indexer::stop -->
<?php if( $this->type == 'youtube' ): ?>
<div class="video-wrapper">
<iframe type="text/html" src="https://www.youtube.com/embed/<?= $this->youtube ?><?php if( $this->autoplay ): ?>?autoplay=1<?php endif; ?>" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
<?php elseif ($this->isVideo): ?>
<video<?= $this->size ?><?php if ($this->poster): ?> poster="<?= $this->poster ?>" preload="none"<?php endif; ?><?php if ($this->autoplay): ?> autoplay<?php endif; ?> controls>
<?php foreach ($this->files as $file): ?>
<source type="<?= $file->mime ?>" src="<?= $file->path ?>" title="<?= $file->title ?>">
<?php endforeach; ?>
</video>
<?php else: ?>
<audio<?= $this->size ?> preload="none"<?php if ($this->autoplay): ?> autoplay<?php endif; ?> controls>
<?php foreach ($this->files as $file): ?>
<source type="<?= $file->mime ?>" src="<?= $file->path ?>" title="<?= $file->title ?>">
<?php endforeach; ?>
</audio>
<?php endif; ?>
<!-- indexer::continue -->
<?php $this->endblock(); ?>
CSS:
Anhang 17203
Seitenlayout:
Anhang 17204
Inhaltselement Youtube:
Anhang 17205