Load only video metadata in thumbnails

This commit is contained in:
Giuseppe Criscione 2024-10-21 22:18:41 +02:00
parent 0f9b8e413c
commit 076cc9c186

View File

@ -14,7 +14,7 @@
<?php endif ?> <?php endif ?>
<?php if ($file->type() === 'video') : ?> <?php if ($file->type() === 'video') : ?>
<video class="file-thumbnail"> <video class="file-thumbnail">
<source src="<?= $file->uri() ?>" type="<?= $file->mimeType() ?>" /> <source src="<?= $file->uri() ?>" type="<?= $file->mimeType() ?>" preload="metadata" />
</video> </video>
<?php endif ?> <?php endif ?>
<div class="file-icon"><?= $this->icon(is_null($file->type()) ? 'file' : 'file-' . $file->type()) ?></div> <div class="file-icon"><?= $this->icon(is_null($file->type()) ? 'file' : 'file-' . $file->type()) ?></div>