CC-4393: Please ignore Flac items for Playlist Preview and disable to preview it as a single track

-detect flash fallback
This commit is contained in:
Martin Konecny 2012-09-13 14:55:17 -04:00
parent 4fd9993108
commit b04afaec2c
1 changed files with 6 additions and 1 deletions

View File

@ -9,5 +9,10 @@ function isAudioSupported(mime){
bMime = mime;
}
return !!bMime && !!audio.canPlayType && audio.canPlayType(bMime) != "";
//return a true of the browser can play this file natively, or if the
//file is an mp3 and flash is installed (jPlayer will fall back to flash to play mp3s).
//Note that checking the navigator.mimeTypes value does not work for IE7, but the alternative
//is adding a javascript library to do the work for you, which seems like overkill....
return (!!audio.canPlayType && audio.canPlayType(bMime) != "") ||
(mime.indexOf("mp3") != -1 && navigator.mimeTypes ["application/x-shockwave-flash"] != undefined);
}