CC-2438: Add a button to listen to the stream immediately
-initial commit
This commit is contained in:
parent
4213b05a8d
commit
e580c5ae0d
4 changed files with 55 additions and 23 deletions
|
@ -48,36 +48,38 @@ $front->registerPlugin(new RabbitMqPlugin());
|
||||||
Actions that return JSON will not use the bootstrap class! */
|
Actions that return JSON will not use the bootstrap class! */
|
||||||
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||||
{
|
{
|
||||||
protected function _initDoctype()
|
protected function _initDoctype()
|
||||||
{
|
{
|
||||||
$this->bootstrap('view');
|
$this->bootstrap('view');
|
||||||
$view = $this->getResource('view');
|
$view = $this->getResource('view');
|
||||||
$view->doctype('XHTML1_STRICT');
|
$view->doctype('XHTML1_STRICT');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function _initHeadLink()
|
protected function _initHeadLink()
|
||||||
{
|
{
|
||||||
$view = $this->getResource('view');
|
$view = $this->getResource('view');
|
||||||
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
||||||
|
|
||||||
$view->headLink()->appendStylesheet($baseUrl.'/css/redmond/jquery-ui-1.8.8.custom.css');
|
$view->headLink()->appendStylesheet($baseUrl.'/css/redmond/jquery-ui-1.8.8.custom.css');
|
||||||
$view->headLink()->appendStylesheet($baseUrl.'/css/pro_dropdown_3.css');
|
$view->headLink()->appendStylesheet($baseUrl.'/css/pro_dropdown_3.css');
|
||||||
$view->headLink()->appendStylesheet($baseUrl.'/css/styles.css');
|
$view->headLink()->appendStylesheet($baseUrl.'/css/styles.css');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function _initHeadScript()
|
protected function _initHeadScript()
|
||||||
{
|
{
|
||||||
$view = $this->getResource('view');
|
$view = $this->getResource('view');
|
||||||
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
||||||
|
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-1.5.2.min.js','text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-1.5.2.min.js','text/javascript');
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-ui-1.8.11.custom.min.js','text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-ui-1.8.11.custom.min.js','text/javascript');
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery.stickyPanel.js','text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery.stickyPanel.js','text/javascript');
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/qtip/jquery.qtip-1.0.0.min.js','text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/qtip/jquery.qtip-1.0.0.min.js','text/javascript');
|
||||||
|
$view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js');
|
||||||
|
|
||||||
|
|
||||||
//scripts for now playing bar
|
//scripts for now playing bar
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/helperfunctions.js','text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/helperfunctions.js','text/javascript');
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/playlist.js','text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/playlist.js','text/javascript');
|
||||||
|
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/airtime/common/common.js','text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/airtime/common/common.js','text/javascript');
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ class LibraryController extends Zend_Controller_Action
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js');
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.fnSetFilteringDelay.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.fnSetFilteringDelay.js','text/javascript');
|
||||||
|
|
|
@ -141,6 +141,36 @@ function getFileExt(filename){
|
||||||
return filename.split('.').pop();
|
return filename.split('.').pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function audioStream(){
|
||||||
|
|
||||||
|
if ($("#jquery_jplayer_1").data("jPlayer") && $("#jquery_jplayer_1").data("jPlayer").status.paused != true){
|
||||||
|
$('#jquery_jplayer_1').jPlayer('clearMedia');
|
||||||
|
$('#jquery_jplayer_1').jPlayer('destroy');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var uri = "http://localhost:8000/airtime_128.ogg";
|
||||||
|
var ext = getFileExt(uri);
|
||||||
|
|
||||||
|
var media;
|
||||||
|
var supplied;
|
||||||
|
if (ext == "ogg"){
|
||||||
|
media = {oga:uri};
|
||||||
|
supplied = "oga";
|
||||||
|
} else {
|
||||||
|
media = {mp3:uri};
|
||||||
|
supplied = "mp3";
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#jquery_jplayer_1").jPlayer({
|
||||||
|
ready: function () {
|
||||||
|
$(this).jPlayer("setMedia", media).jPlayer("play");
|
||||||
|
},
|
||||||
|
swfPath: "/js/jplayer",
|
||||||
|
supplied: supplied
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function audioPreview(filename, elemID){
|
function audioPreview(filename, elemID){
|
||||||
|
|
||||||
var elems = $('.ui-icon.ui-icon-pause');
|
var elems = $('.ui-icon.ui-icon-pause');
|
||||||
|
@ -164,17 +194,14 @@ function audioPreview(filename, elemID){
|
||||||
supplied = "mp3";
|
supplied = "mp3";
|
||||||
}
|
}
|
||||||
|
|
||||||
//$('#jquery_jplayer_1').jPlayer('stop');
|
$("#jquery_jplayer_1").jPlayer("destroy");
|
||||||
$("#jquery_jplayer_1").jPlayer("destroy");
|
$("#jquery_jplayer_1").jPlayer({
|
||||||
$("#jquery_jplayer_1").jPlayer({
|
ready: function () {
|
||||||
ready: function () {
|
$(this).jPlayer("setMedia", media).jPlayer("play");
|
||||||
//alert(media);
|
},
|
||||||
$(this).jPlayer("setMedia", media).jPlayer("play");
|
|
||||||
},
|
|
||||||
swfPath: "/js/jplayer",
|
swfPath: "/js/jplayer",
|
||||||
supplied: supplied
|
supplied: supplied
|
||||||
});
|
});
|
||||||
|
|
||||||
//$('#jquery_jplayer_1').jPlayer('setMedia', media).jPlayer('play');
|
|
||||||
$('#'+elemID+' div.list-item-container a span').attr("class", "ui-icon ui-icon-pause");
|
$('#'+elemID+' div.list-item-container a span').attr("class", "ui-icon ui-icon-pause");
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,6 +257,10 @@ function init() {
|
||||||
secondsTimer();
|
secondsTimer();
|
||||||
|
|
||||||
setupQtip();
|
setupQtip();
|
||||||
|
|
||||||
|
$('#on-air-info').click(function() {
|
||||||
|
audioStream()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue