Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
410a3406af
|
@ -184,6 +184,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
'element_artist' => isset($track['artist_name'])?$track['artist_name']:"",
|
||||
'element_id' => isset($track['id'])?$track['id']:"",
|
||||
'element_position' => isset($track['position'])?$track['position']:"",
|
||||
'mime' => isset($track['mime'])?$track['mime']:""
|
||||
);
|
||||
|
||||
/* If the track type is static we know it must be
|
||||
|
|
|
@ -1095,7 +1095,8 @@ class Application_Model_Preference
|
|||
public static function getCurrentLibraryTableSetting()
|
||||
{
|
||||
$v = self::getValue("library_datatable");
|
||||
if( $v === '' ) {
|
||||
|
||||
if ( $v === '' ) {
|
||||
return function ($x) { return $x; };
|
||||
} else {
|
||||
$ds = unserialize($v);
|
||||
|
|
|
@ -782,7 +782,10 @@ SQL;
|
|||
$media_id = $item['stream_id'];
|
||||
$uri = $item['url'];
|
||||
self::createStreamScheduleEvent($data, $item, $media_id, $uri);
|
||||
} else {
|
||||
throw new Exception("Unknown schedule type: ".print_r($item, true));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ function buildplaylist(p_url, p_playIndex) {
|
|||
mp3:data[index]['uri']
|
||||
};
|
||||
}
|
||||
if (media) {
|
||||
if (media && isAudioSupported(data[index]['mime'])) {
|
||||
myPlaylist[index] = media;
|
||||
}
|
||||
// we should create a map according to the new position in the
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue