Permalink
Browse files

feature(views): added html5 audio support to the file plugin

fixes #5928
  • Loading branch information...
jdalsem authored and ewinslow committed Apr 10, 2015
1 parent ace5225 commit e5a32390885c99d65ebf5a937f0e29abe983e4de
Showing with 20 additions and 0 deletions.
  1. +20 −0 mod/file/views/default/file/specialcontent/audio/default.php
@@ -0,0 +1,20 @@
<?php
/**
* Outputs an audio player in full view
*
* @uses $vars['entity']
*/
$file = elgg_extract('entity', $vars);
if (!$file) {
return;
}
if (!elgg_extract('full_view', $vars, false)) {
return;
}
$download_url = elgg_normalize_url("file/download/{$file->getGUID()}");
$mimetype = $file->mimetype;
echo "<audio controls><source src='{$download_url}' type='{$mimetype}'></audio>";

0 comments on commit e5a3239

Please sign in to comment.