summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-11-27 12:32:21 +0100
committerGitHub <noreply@github.com>2017-11-27 12:32:21 +0100
commite02229e412bcca562a892e3c0692f7ac2ab43c4a (patch)
treecaa9414b655ada07b1de3f2b6bf56e2f628cb584 /apps/files_sharing
parent7bb42438fa44a663934103ef2e83a9692516e165 (diff)
parentbeac223fa6260e588966a3e3025fe20f1f822603 (diff)
downloadnextcloud-server-e02229e412bcca562a892e3c0692f7ac2ab43c4a.tar.gz
nextcloud-server-e02229e412bcca562a892e3c0692f7ac2ab43c4a.zip
Merge pull request #7246 from william-p/Add_html5_audioplayer_public
Add HTML5 audio player in public view
Diffstat (limited to 'apps/files_sharing')
-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>