CC-2430: Preview tracks in the library + better preview (ability to jump around in clip)
- updated logic removed when doing a rebase with devel
This commit is contained in:
parent
aacbac4757
commit
2de81c6027
|
@ -112,7 +112,7 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
$baseUrl = $request->getBaseUrl();
|
$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/spl.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/preview.js?'.filemtime($baseDir.'/js/airtime/library/preview.js'), 'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/preview.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/playlist_builder.css?'.$CC_CONFIG['airtime_version']);
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/playlist_builder.css?'.$CC_CONFIG['airtime_version']);
|
||||||
|
|
||||||
$this->_helper->viewRenderer->setResponseSegment('spl');
|
$this->_helper->viewRenderer->setResponseSegment('spl');
|
||||||
|
|
|
@ -19,7 +19,8 @@ class ShowbuilderController extends Zend_Controller_Action
|
||||||
$this->_helper->layout->setLayout('builder');
|
$this->_helper->layout->setLayout('builder');
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/events/library_showbuilder.js'),'text/javascript');
|
$this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/events/library_showbuilder.js'),'text/javascript');
|
||||||
|
$this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/preview.js'), 'text/javascript');
|
||||||
|
|
||||||
$this->_helper->actionStack('library', 'library');
|
$this->_helper->actionStack('library', 'library');
|
||||||
$this->_helper->actionStack('builder', 'showbuilder');
|
$this->_helper->actionStack('builder', 'showbuilder');
|
||||||
}
|
}
|
||||||
|
|
|
@ -631,6 +631,9 @@ Logging::log("getting media! - 2");
|
||||||
|
|
||||||
$results = Application_Model_StoredFile::searchFiles($displayColumns, $fromTable, $datatables);
|
$results = Application_Model_StoredFile::searchFiles($displayColumns, $fromTable, $datatables);
|
||||||
|
|
||||||
|
//Used by the audio preview functionality in the library.
|
||||||
|
$audioResults = Application_Model_StoredFile::getAllAudioFilePaths();
|
||||||
|
|
||||||
foreach ($results['aaData'] as &$row) {
|
foreach ($results['aaData'] as &$row) {
|
||||||
$row['id'] = intval($row['id']);
|
$row['id'] = intval($row['id']);
|
||||||
|
|
||||||
|
@ -656,7 +659,7 @@ Logging::log("getting media! - 2");
|
||||||
//datatable stuff really needs to be pulled out and generalized within the project
|
//datatable stuff really needs to be pulled out and generalized within the project
|
||||||
//access to zend view methods to access url helpers is needed.
|
//access to zend view methods to access url helpers is needed.
|
||||||
|
|
||||||
if($type == "au") {
|
if($type == "au" && isset( $audioResults )) {
|
||||||
$audioFile = $audioResults[$row['id']-1]['gunid'].".".pathinfo($audioResults[$row['id']-1]['filepath'], PATHINFO_EXTENSION);
|
$audioFile = $audioResults[$row['id']-1]['gunid'].".".pathinfo($audioResults[$row['id']-1]['filepath'], PATHINFO_EXTENSION);
|
||||||
$row['image'] = '<img src="/css/images/big_play_arrow.png" onClick="open_audio_preview(\''.$audioFile.'\', \'spl_'.$row['id'].'\')">';
|
$row['image'] = '<img src="/css/images/big_play_arrow.png" onClick="open_audio_preview(\''.$audioFile.'\', \'spl_'.$row['id'].'\')">';
|
||||||
|
|
||||||
|
@ -669,6 +672,19 @@ Logging::log("getting media! - 2");
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getAllAudioFilePaths(){
|
||||||
|
try {
|
||||||
|
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME);
|
||||||
|
$r = $con->query("SELECT id, gunid, filepath FROM cc_files");
|
||||||
|
$r->setFetchMode(PDO::FETCH_ASSOC);
|
||||||
|
$results = $r->fetchAll();
|
||||||
|
|
||||||
|
return $results;
|
||||||
|
}catch (Exception $e) {
|
||||||
|
Logging::log($e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function searchFiles($displayColumns, $fromTable, $data)
|
public static function searchFiles($displayColumns, $fromTable, $data)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME);
|
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME);
|
||||||
|
|
Loading…
Reference in New Issue