Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
denise 2012-09-12 16:29:35 -04:00
commit 32b1ee95b7
11 changed files with 129 additions and 56 deletions

View file

@ -114,7 +114,6 @@
}
.ui-icon-closethick,
.ui-icon-play,
.spl_fade_control,
.spl_text_input {
cursor: pointer;
@ -164,15 +163,31 @@
background: -moz-linear-gradient(top, #707070 0, #666666 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #707070), color-stop(100%, #666666));
}
#spl_sortable div.big_play_disabled {
display:block;
width:20px;
height:50px;
margin:2px 0 0 2px;
text-align:center;
border:1px solid #5b5b5b;
float:left;
background-color: #707070;
background: -moz-linear-gradient(top, #707070 0, #666666 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #707070), color-stop(100%, #666666));
}
#spl_sortable div.big_play:hover {
border:1px solid #282828;
background-color: #3b3b3b;
background: -moz-linear-gradient(top, #3b3b3b 0, #292929 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #3b3b3b), color-stop(100%, #292929));
cursor: pointer;
}
#spl_sortable div.big_play .ui-icon {
margin: 17px 0 0 1px;
}
#spl_sortable div.big_play_disabled .ui-icon {
margin: 17px 0 0 1px;
}
#spl_sortable div.big_play:hover .ui-icon-play, #spl_sortable div.big_play:hover .ui-icon-pause {
background-image:url(redmond/images/ui-icons_ff5d1a_256x240.png);

View file

@ -2908,3 +2908,18 @@ dd .stream-status {
outline: 0;
border-top-color:#333333
}
.dark_class
{
background-color: black;
filter:alpha(opacity=20); /* IE */
opacity: 0.2; /* Safari, Opera */
-moz-opacity:0.20; /* FireFox */
z-index: 20;
height: 100%;
width: 100%;
background-repeat:no-repeat;
background-position:center;
/* position:absolute; */
top: 0px;
left: 0px;
}

View file

@ -0,0 +1,10 @@
var audio = new Audio();
supportedAudio = {};
supportedAudio["audio/ogg"] = !!audio.canPlayType && audio.canPlayType('audio/ogg; codecs="vorbis"') != "";
supportedAudio["audio/mp3"] = !!audio.canPlayType && audio.canPlayType('audio/mp3') != "";
supportedAudio["audio/mp4"] = !!audio.canPlayType && audio.canPlayType('audio/mp4') != "";
supportedAudio["audio/x-flac"] = !!audio.canPlayType && audio.canPlayType('audio/x-flac') != "";
function isAudioSupported(mime){
return mime in supportedAudio && supportedAudio[mime];
}

View file

@ -928,7 +928,7 @@ function addQtipToSCIcons(){
else if($(this).hasClass("soundcloud")){
$(this).qtip({
content: {
text: "Retreiving data from the server...",
text: "Retrieving data from the server...",
ajax: {
url: "/Library/get-upload-to-soundcloud-status",
type: "post",

View file

@ -378,10 +378,34 @@ var AIRTIME = (function(AIRTIME){
$pl.delegate(".spl_cue",
{"click": openCueEditor});
//add the play function to the play icon
$pl.delegate(".big_play",
{"click": openAudioPreview});
$.each($(".big_play"), function(index, value){
var mime = $(value).attr("data-mime-type");
if (isAudioSupported(mime)) {
$(value).bind("click", openAudioPreview);
} else {
$(value).attr("class", "big_play_disabled dark_class");
$(value).qtip({
content: 'Your browser does not support playing this file type: "'+ mime +'"',
show: 'mouseover',
hide: {
delay: 500,
fixed: true
},
style: {
border: {
width: 0,
radius: 4
},
classes: "ui-tooltip-dark ui-tooltip-rounded"
},
position: {
my: "left bottom",
at: "right center"
},
})
}
});
$pl.delegate(".spl_block_expand",
{"click": function(ev){
var id = parseInt($(this).attr("id").split("_").pop(), 10);