Merge branch '2.2.x' of dev.sourcefabric.org:airtime into 2.2.x
This commit is contained in:
commit
a937df30ad
13 changed files with 39 additions and 18 deletions
|
@ -14,5 +14,6 @@ function isAudioSupported(mime){
|
|||
//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);
|
||||
(mime.indexOf("mp3") != -1 && navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) ||
|
||||
(mime.indexOf("mp4") != -1 && navigator.mimeTypes ["application/x-shockwave-flash"] != undefined);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,11 @@ var AIRTIME = (function(AIRTIME) {
|
|||
var $nRow = $(nRow);
|
||||
if (aData.ftype === "audioclip") {
|
||||
$nRow.addClass("lib-audio");
|
||||
$image = $nRow.find('td.library_type');
|
||||
if (!isAudioSupported(aData.mime)) {
|
||||
$image.html('<span class="ui-icon ui-icon-locked"></span>');
|
||||
aData.image = '<span class="ui-icon ui-icon-locked"></span>';
|
||||
}
|
||||
} else if (aData.ftype === "stream") {
|
||||
$nRow.addClass("lib-stream");
|
||||
} else if (aData.ftype === "block") {
|
||||
|
|
|
@ -29,6 +29,11 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
if (aData.ftype === "audioclip") {
|
||||
$nRow.addClass("lib-audio");
|
||||
$image = $nRow.find('td.library_type');
|
||||
if (!isAudioSupported(aData.mime)) {
|
||||
$image.html('<span class="ui-icon ui-icon-locked"></span>');
|
||||
aData.image = '<span class="ui-icon ui-icon-locked"></span>';
|
||||
}
|
||||
} else if (aData.ftype === "stream") {
|
||||
$nRow.addClass("lib-stream");
|
||||
} else {
|
||||
|
|
|
@ -542,7 +542,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
type = $("#library_display_type").find("select").val();
|
||||
type = (type === undefined) ? 0 : type;
|
||||
aoData.push( { name: "type", value: type} );
|
||||
|
||||
|
||||
$.ajax( {
|
||||
"dataType": 'json',
|
||||
"type": "POST",
|
||||
|
@ -562,7 +562,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
// pl_
|
||||
open_playlist_preview(playlistIndex, 0);
|
||||
} else if (aData.ftype === 'audioclip') {
|
||||
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
|
||||
if (isAudioSupported(aData.mime)) {
|
||||
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
|
||||
}
|
||||
} else if (aData.ftype == 'stream') {
|
||||
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
|
||||
} else if (aData.ftype == 'block' && aData.bl_type == 'static') {
|
||||
|
|
|
@ -369,7 +369,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
/* cue in */ {"mDataProp": "cuein", "sTitle": "Cue In", "bVisible": false, "sClass": "sb-cue-in"},
|
||||
/* cue out */ {"mDataProp": "cueout", "sTitle": "Cue Out", "bVisible": false, "sClass": "sb-cue-out"},
|
||||
/* fade in */ {"mDataProp": "fadein", "sTitle": "Fade In", "bVisible": false, "sClass": "sb-fade-in"},
|
||||
/* fade out */ {"mDataProp": "fadeout", "sTitle": "Fade Out", "bVisible": false, "sClass": "sb-fade-out"}
|
||||
/* fade out */ {"mDataProp": "fadeout", "sTitle": "Fade Out", "bVisible": false, "sClass": "sb-fade-out"},
|
||||
/* Mime */ {"mDataProp" : "mime", "sTitle" : "Mime", "bVisible": false, "sClass": "sb-mime"}
|
||||
],
|
||||
|
||||
"bJQueryUI": true,
|
||||
|
@ -549,11 +550,16 @@ var AIRTIME = (function(AIRTIME){
|
|||
$image = $nRow.find('td.sb-image');
|
||||
//check if the file exists.
|
||||
if (aData.image === true) {
|
||||
$image.html('<img title="Track preview" src="/css/images/icon_audioclip.png"></img>')
|
||||
$nRow.addClass("lib-audio");
|
||||
if (!isAudioSupported(aData.mime)) {
|
||||
$image.html('<span class="ui-icon ui-icon-locked"></span>');
|
||||
} else {
|
||||
$image.html('<img title="Track preview" src="/css/images/icon_audioclip.png"></img>')
|
||||
.click(function() {
|
||||
open_show_preview(aData.instance, aData.pos);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
$image.html('<span class="ui-icon ui-icon-alert"></span>');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue