diff options
author | Andrew Dolgov <[email protected]> | 2013-04-16 15:44:38 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-04-16 15:44:38 +0400 |
commit | 40fe2d73821788e7c202191dc7b94b025585d338 (patch) | |
tree | e9195c9267258966fe763481ff1c078912077764 /include/functions.php | |
parent | 82d77f24a596153b043809cb86398744ebda2b9a (diff) |
remove js-based player, better mp3 support detection for html5 audio
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/include/functions.php b/include/functions.php index 018520648..87eb3d6a9 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2990,19 +2990,12 @@ if (strpos($ctype, "audio/") === 0) { if ($_SESSION["hasAudio"] && (strpos($ctype, "ogg") !== false || - strpos($_SERVER['HTTP_USER_AGENT'], "Chrome") !== false || - strpos($_SERVER['HTTP_USER_AGENT'], "Safari") !== false )) { + $_SESSION["hasMp3"])) { - $id = 'AUDIO-' . uniqid(); - - $entry .= "<audio id=\"$id\"\" controls style='display : none'> + $entry .= "<audio controls> <source type=\"$ctype\" src=\"$url\"></source> </audio>"; - $entry .= "<span onclick=\"player(this)\" - title=\"".__("Click to play")."\" status=\"0\" - class=\"player\" audio-id=\"$id\">".__("Play")."</span>"; - } else { $entry .= "<object type=\"application/x-shockwave-flash\" |