Add HTML5 audio player in public view

Signed-off-by: William Pain <pain.william@gmail.com>
This commit is contained in:
William Pain 2017-11-22 13:37:17 +01:00
parent 399a965240
commit beac223fa6

View file

@ -97,6 +97,12 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
<source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" />
</video>
</div>
<?php elseif ($_['previewEnabled'] && substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'audio'): ?>
<div id="imgframe">
<audio tabindex="0" controls="" preload="none" style="width: 100%; max-width: <?php p($_['previewMaxX']); ?>px; max-height: <?php p($_['previewMaxY']); ?>px">
<source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" />
</audio>
</div>
<?php else: ?>
<!-- Preview frame is filled via JS to support SVG images for modern browsers -->
<div id="imgframe"></div>