CC-2430: Preview tracks in the library + better preview (ability to jump around in clip)

- updates to audio preview on library and playlist
This commit is contained in:
Daniel 2012-02-14 15:43:27 -05:00
parent 0b9ed43e50
commit 1aab682104
5 changed files with 32 additions and 90 deletions

View file

@ -15,6 +15,7 @@ class PlaylistController extends Zend_Controller_Action
->addActionContext('new', 'json')
->addActionContext('edit', 'json')
->addActionContext('delete', 'json')
->addActionContext('play', 'json')
->addActionContext('set-playlist-fades', 'json')
->addActionContext('get-playlist-fades', 'json')
->addActionContext('set-playlist-name', 'json')
@ -111,6 +112,7 @@ class PlaylistController extends Zend_Controller_Action
$baseUrl = $request->getBaseUrl();
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/spl.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/playlist_jplayer_preview.js?'.filemtime($baseDir.'/js/airtime/library/playlist_jplayer_preview.js'), 'text/javascript');
$this->view->headLink()->appendStylesheet($baseUrl.'/css/playlist_builder.css?'.$CC_CONFIG['airtime_version']);
$this->_helper->viewRenderer->setResponseSegment('spl');
@ -194,6 +196,31 @@ class PlaylistController extends Zend_Controller_Action
$this->playlistUnknownError($e);
}
}
public function audioPreviewPlayerAction()
{
Logging::log("PlaylistControler::in the play action");
$fileName = $this->_getParam('elementFilename');
$playlistIndex = $this->_getParam('elemIndexString');
$request = $this->getRequest();
$baseUrl = $request->getBaseUrl();
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/playlist_jplayer_preview.js?'.filemtime($baseDir.'/js/airtime/library/playlist_jplayer_preview.js'),'text/javascript');
$this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.blue.monday.css?'.filemtime($baseDir.'/js/jplayer/skin/jplayer.blue.monday.css'));
$this->_helper->layout->setLayout('bare');
$logo = Application_Model_Preference::GetStationLogo();
if($logo){
$this->view->logo = "data:image/png;base64,$logo";
} else {
$this->view->logo = "$baseUrl/css/images/airtime_logo_jp.png";
}
$this->view->fileName = $fileName;
$this->view->playlistIndex= $playlistIndex;
}
public function addItemsAction()
{