CC-4393: Please ignore AAC and Flac items for Playlist Preview and disable to preview it as a single track
-disable preview icon
This commit is contained in:
parent
20f5fe6480
commit
1c293839da
|
@ -156,7 +156,7 @@ class LibraryController extends Zend_Controller_Action
|
||||||
$user = new Application_Model_User($userInfo->id);
|
$user = new Application_Model_User($userInfo->id);
|
||||||
|
|
||||||
//Open a jPlayer window and play the audio clip.
|
//Open a jPlayer window and play the audio clip.
|
||||||
$menu["play"] = array("name"=> "Preview", "icon" => "play");
|
$menu["play"] = array("name"=> "Preview", "icon" => "play", "disabled" => false);
|
||||||
|
|
||||||
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||||
|
|
||||||
|
@ -166,6 +166,8 @@ class LibraryController extends Zend_Controller_Action
|
||||||
|
|
||||||
$file = Application_Model_StoredFile::Recall($id);
|
$file = Application_Model_StoredFile::Recall($id);
|
||||||
|
|
||||||
|
$menu["play"]["mime"] = $file->getPropelOrm()->getDbMime();
|
||||||
|
|
||||||
if (isset($obj_sess->id) && $screen == "playlist") {
|
if (isset($obj_sess->id) && $screen == "playlist") {
|
||||||
// if the user is not admin or pm, check the creator and see if this person owns the playlist or Block
|
// if the user is not admin or pm, check the creator and see if this person owns the playlist or Block
|
||||||
if ($obj_sess->type == 'playlist') {
|
if ($obj_sess->type == 'playlist') {
|
||||||
|
|
|
@ -717,6 +717,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
callback = function() {
|
callback = function() {
|
||||||
var url = '/Playlist/edit';
|
var url = '/Playlist/edit';
|
||||||
AIRTIME.playlist.fnEdit(data.id, data.ftype, url);
|
AIRTIME.playlist.fnEdit(data.id, data.ftype, url);
|
||||||
|
AIRTIME.playlist.validatePlaylistElements();
|
||||||
};
|
};
|
||||||
} else if (data.ftype === "stream") {
|
} else if (data.ftype === "stream") {
|
||||||
callback = function() {
|
callback = function() {
|
||||||
|
@ -731,6 +732,13 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
//define a play callback.
|
//define a play callback.
|
||||||
if (oItems.play !== undefined) {
|
if (oItems.play !== undefined) {
|
||||||
|
|
||||||
|
if (oItems.play.mime !== undefined) {
|
||||||
|
if (!isAudioSupported(oItems.play.mime)) {
|
||||||
|
oItems.play.disabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
callback = function() {
|
callback = function() {
|
||||||
if (data.ftype === 'playlist' && data.length !== '0.0'){
|
if (data.ftype === 'playlist' && data.length !== '0.0'){
|
||||||
playlistIndex = $(this).parent().attr('id').substring(3); //remove the pl_
|
playlistIndex = $(this).parent().attr('id').substring(3); //remove the pl_
|
||||||
|
|
|
@ -346,7 +346,6 @@ var AIRTIME = (function(AIRTIME){
|
||||||
}
|
}
|
||||||
|
|
||||||
function openPlaylist(json) {
|
function openPlaylist(json) {
|
||||||
|
|
||||||
$("#side_playlist")
|
$("#side_playlist")
|
||||||
.empty()
|
.empty()
|
||||||
.append(json.html);
|
.append(json.html);
|
||||||
|
@ -361,23 +360,11 @@ var AIRTIME = (function(AIRTIME){
|
||||||
appendModAddButton();
|
appendModAddButton();
|
||||||
removeButtonCheck();
|
removeButtonCheck();
|
||||||
}
|
}
|
||||||
|
|
||||||
//sets events dynamically for playlist entries (each row in the playlist)
|
//Purpose of this function is to iterate over all playlist elements
|
||||||
function setPlaylistEntryEvents() {
|
//and verify whether they can be previewed by the browser or not. If not
|
||||||
|
//then the playlist element is greyed out
|
||||||
$pl.delegate("#spl_sortable .ui-icon-closethick",
|
mod.validatePlaylistElements = function(){
|
||||||
{"click": function(ev){
|
|
||||||
var id;
|
|
||||||
id = parseInt($(this).attr("id").split("_").pop(), 10);
|
|
||||||
AIRTIME.playlist.fnDeleteItems([id]);
|
|
||||||
}});
|
|
||||||
|
|
||||||
$pl.delegate(".spl_fade_control",
|
|
||||||
{"click": openFadeEditor});
|
|
||||||
|
|
||||||
$pl.delegate(".spl_cue",
|
|
||||||
{"click": openCueEditor});
|
|
||||||
|
|
||||||
$.each($(".big_play"), function(index, value){
|
$.each($(".big_play"), function(index, value){
|
||||||
var mime = $(value).attr("data-mime-type");
|
var mime = $(value).attr("data-mime-type");
|
||||||
if (isAudioSupported(mime)) {
|
if (isAudioSupported(mime)) {
|
||||||
|
@ -405,6 +392,25 @@ var AIRTIME = (function(AIRTIME){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//sets events dynamically for playlist entries (each row in the playlist)
|
||||||
|
function setPlaylistEntryEvents() {
|
||||||
|
|
||||||
|
$pl.delegate("#spl_sortable .ui-icon-closethick",
|
||||||
|
{"click": function(ev){
|
||||||
|
var id;
|
||||||
|
id = parseInt($(this).attr("id").split("_").pop(), 10);
|
||||||
|
AIRTIME.playlist.fnDeleteItems([id]);
|
||||||
|
}});
|
||||||
|
|
||||||
|
$pl.delegate(".spl_fade_control",
|
||||||
|
{"click": openFadeEditor});
|
||||||
|
|
||||||
|
$pl.delegate(".spl_cue",
|
||||||
|
{"click": openCueEditor});
|
||||||
|
|
||||||
|
mod.validatePlaylistElements();
|
||||||
|
|
||||||
$pl.delegate(".spl_block_expand",
|
$pl.delegate(".spl_block_expand",
|
||||||
{"click": function(ev){
|
{"click": function(ev){
|
||||||
|
|
Loading…
Reference in New Issue