Mercurial > hg > fapweb
changeset 799:cce7307d2c75
Handle preview audio mime type.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 21 Nov 2014 23:57:43 +0200 |
parents | b97d4b754bc0 |
children | 98aae54eb940 |
files | msite.inc.php |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/msite.inc.php Fri Nov 21 23:57:11 2014 +0200 +++ b/msite.inc.php Fri Nov 21 23:57:43 2014 +0200 @@ -731,8 +731,8 @@ $res["fileBase"] = stMakePath(FALSE, "_sample", array($filename)); $res["preferType"] = "PNG"; $fileTypeList = array( - "MP3" => array(".mp3", ".MP3"), - "OGG" => array(".ogg", ".OGG", ".oga", ".OGA"), + "audio/mpeg" => array(".mp3", ".MP3"), + "audio/ogg; codecs=vorbis" => array(".ogg", ".OGG", ".oga", ".OGA"), ); break; @@ -800,8 +800,8 @@ if ($pdata["previewSize"] !== FALSE) { echo - "<audio controls class=\"audioPreview\">". - "<source src=\"".ihentities($pdata["previewURL"])."\" type=\"audio/mpeg\">-". + "<audio controls preload=\"none\" class=\"audioPreview\">". + "<source src=\"".ihentities($pdata["previewURL"])."\" type=\"".$pdata["previewFileType"]."\">". "</audio>"; } break;