aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Pain <pain.william@gmail.com>2017-11-22 13:37:17 +0100
committerWilliam Pain <pain.william@gmail.com>2017-11-22 16:07:17 +0100
commitbeac223fa6260e588966a3e3025fe20f1f822603 (patch)
tree5c0c64109a9dca9c96944c53affe59aaa68c044d
parent399a965240af81e471af041d78b791baf99d7973 (diff)
downloadnextcloud-server-beac223fa6260e588966a3e3025fe20f1f822603.tar.gz
nextcloud-server-beac223fa6260e588966a3e3025fe20f1f822603.zip
Add HTML5 audio player in public view
Signed-off-by: William Pain <pain.william@gmail.com>
-rw-r--r--apps/files_sharing/templates/public.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 5417809b908..e17595d548b 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -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>