Merge branch '2.2.x' into 2.2.x-saas

Conflicts:
	airtime_mvc/application/forms/LiveStreamingPreferences.php
This commit is contained in:
Martin Konecny 2012-11-28 16:10:33 -05:00
commit 4983721565
27 changed files with 385 additions and 246 deletions

View file

@ -153,12 +153,24 @@ function buildplaylist(p_url, p_playIndex) {
continue;
}
} else if (data[index]['type'] == 1) {
media = {title: data[index]['element_title'],
artist: data[index]['element_artist'],
mp3:data[index]['uri']
};
var mime = data[index]['mime'];
if (mime.search(/mp3/i) > 0 || mime.search(/mpeg/i) > 0) {
key = "mp3";
} else if (mime.search(/og(g|a)/i) > 0 || mime.search(/vorbis/i) > 0) {
key = "oga";
} else if (mime.search(/mp4/i) > 0) {
key = "m4a";
} else if (mime.search(/wav/i) > 0) {
key = "wav";
}
if (key) {
media = {title: data[index]['element_title'],
artist: data[index]['element_artist']
};
media[key] = data[index]['uri']
}
}
console.log(data[index]);
if (media && isAudioSupported(data[index]['mime'])) {
// javascript doesn't support associative array with numeric key
// so we need to remove the gap if we skip any of tracks due to

View file

@ -15,5 +15,6 @@ function isAudioSupported(mime){
//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("mp4") != -1 && navigator.mimeTypes ["application/x-shockwave-flash"] != undefined);
(mime.indexOf("mp4") != -1 && navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) ||
(mime.indexOf("mpeg") != -1 && navigator.mimeTypes ["application/x-shockwave-flash"] != undefined);
}

View file

@ -81,6 +81,10 @@ var AIRTIME = (function(AIRTIME) {
return container;
},
cursor : 'pointer',
cursorAt: {
top: 30,
left: 100
},
connectToSortable : '#show_builder_table'
});
};

View file

@ -975,7 +975,6 @@ function addProgressIcon(id) {
}
function checkLibrarySCUploadStatus(){
var url = '/Library/get-upload-to-soundcloud-status',
span,
id;
@ -1028,15 +1027,22 @@ function addQtipToSCIcons(){
});
}
else if($(this).hasClass("soundcloud")){
var sc_id = $(this).parent().parent().data("aData").soundcloud_id;
$(this).qtip({
content: {
//text: "The soundcloud id for this file is: "+sc_id
text: "Retrieving data from the server...",
ajax: {
url: "/Library/get-upload-to-soundcloud-status",
type: "post",
data: ({format: "json", id : id, type: "file"}),
success: function(json, status){
this.set('content.text', "The soundcloud id for this file is: "+json.sc_id);
id = sc_id;
if (id == undefined) {
id = json.sc_id;
}
this.set('content.text', "The soundcloud id for this file is: "+id);
}
}
},

View file

@ -402,8 +402,9 @@ function setupUI() {
$(".repeat_tracks_help_icon").qtip({
content: {
text: "If your criteria is too strict, Airtime may not be able to fill up the desired smart block length." +
" Hence, if you check this option, tracks will be used more than once."
text: "The desired block length will not be reached if Airtime cannot find " +
"enough unique tracks to match your criteria. Enable this option if you wish to allow " +
"tracks to be added multiple times to the smart block."
},
hide: {
delay: 500,