diff options
Diffstat (limited to 'include/controls.php')
-rwxr-xr-x | include/controls.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/controls.php b/include/controls.php index 037e331cc..e64a90a8b 100755 --- a/include/controls.php +++ b/include/controls.php @@ -286,18 +286,22 @@ function format_inline_player($url, $ctype) { if (strpos($ctype, "audio/") === 0) { + $entry .= "<div class='inline-player'>"; + if ($_SESSION["hasAudio"] && (strpos($ctype, "ogg") !== false || $_SESSION["hasMp3"])) { $entry .= "<audio preload=\"none\" controls> <source type=\"$ctype\" src=\"$url\"/> - </audio>"; + </audio> "; } - if ($entry) $entry .= " <a target=\"_blank\" rel=\"noopener noreferrer\" + if ($entry) $entry .= "<a target=\"_blank\" rel=\"noopener noreferrer\" href=\"$url\">" . basename($url) . "</a>"; + $entry .= "</div>"; + return $entry; } |