<?php $this->extend('block_unsearchable'); ?>
<?php $this->block('content'); ?>
<?php if ($this->type == 'youtube'): ?>
<div class="video-wrapper<?= $this->arClass ?>">
<iframe<?= $this->size ?> src="https://www.youtube-nocookie.com/embed/<?= $this->youtube ?><?= $this->ytStrParams ?>" 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; ?>
<?php $this->endblock(); ?>