CC-1665: Scheduled stream rebroadcasting and recording
-started working on UI
This commit is contained in:
parent
2ad7e78e10
commit
31176f525e
5 changed files with 113 additions and 14 deletions
|
@ -10,31 +10,33 @@ $ccAcl->addRole(new Zend_Acl_Role('G'))
|
||||||
->addRole(new Zend_Acl_Role('A'), 'P');
|
->addRole(new Zend_Acl_Role('A'), 'P');
|
||||||
|
|
||||||
$ccAcl->add(new Zend_Acl_Resource('library'))
|
$ccAcl->add(new Zend_Acl_Resource('library'))
|
||||||
->add(new Zend_Acl_Resource('index'))
|
->add(new Zend_Acl_Resource('index'))
|
||||||
->add(new Zend_Acl_Resource('user'))
|
->add(new Zend_Acl_Resource('user'))
|
||||||
->add(new Zend_Acl_Resource('error'))
|
->add(new Zend_Acl_Resource('error'))
|
||||||
->add(new Zend_Acl_Resource('login'))
|
->add(new Zend_Acl_Resource('login'))
|
||||||
->add(new Zend_Acl_Resource('playlist'))
|
->add(new Zend_Acl_Resource('playlist'))
|
||||||
->add(new Zend_Acl_Resource('plupload'))
|
->add(new Zend_Acl_Resource('plupload'))
|
||||||
->add(new Zend_Acl_Resource('schedule'))
|
->add(new Zend_Acl_Resource('schedule'))
|
||||||
->add(new Zend_Acl_Resource('api'))
|
->add(new Zend_Acl_Resource('api'))
|
||||||
->add(new Zend_Acl_Resource('systemstatus'))
|
->add(new Zend_Acl_Resource('systemstatus'))
|
||||||
->add(new Zend_Acl_Resource('dashboard'))
|
->add(new Zend_Acl_Resource('dashboard'))
|
||||||
->add(new Zend_Acl_Resource('preference'))
|
->add(new Zend_Acl_Resource('preference'))
|
||||||
->add(new Zend_Acl_Resource('showbuilder'))
|
->add(new Zend_Acl_Resource('showbuilder'))
|
||||||
->add(new Zend_Acl_Resource('playouthistory'))
|
->add(new Zend_Acl_Resource('playouthistory'))
|
||||||
->add(new Zend_Acl_Resource('usersettings'))
|
->add(new Zend_Acl_Resource('usersettings'))
|
||||||
->add(new Zend_Acl_Resource('audiopreview'));
|
->add(new Zend_Acl_Resource('audiopreview'))
|
||||||
|
->add(new Zend_Acl_Resource('webstream'));
|
||||||
|
|
||||||
/** Creating permissions */
|
/** Creating permissions */
|
||||||
$ccAcl->allow('G', 'index')
|
$ccAcl->allow('G', 'index')
|
||||||
->allow('G', 'login')
|
->allow('G', 'login')
|
||||||
->allow('G', 'error')
|
->allow('G', 'error')
|
||||||
->allow('G', 'showbuilder')
|
->allow('G', 'showbuilder')
|
||||||
->allow('G', 'api')
|
->allow('G', 'api')
|
||||||
->allow('G', 'schedule')
|
->allow('G', 'schedule')
|
||||||
->allow('G', 'dashboard')
|
->allow('G', 'dashboard')
|
||||||
->allow('G', 'audiopreview')
|
->allow('G', 'audiopreview')
|
||||||
|
->allow('G', 'webstream')
|
||||||
->allow('H', 'preference', 'is-import-in-progress')
|
->allow('H', 'preference', 'is-import-in-progress')
|
||||||
->allow('H', 'usersettings')
|
->allow('H', 'usersettings')
|
||||||
->allow('H', 'plupload')
|
->allow('H', 'plupload')
|
||||||
|
|
30
airtime_mvc/application/controllers/WebstreamController.php
Normal file
30
airtime_mvc/application/controllers/WebstreamController.php
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class WebstreamController extends Zend_Controller_Action
|
||||||
|
{
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||||
|
$ajaxContext->addActionContext('new', 'json')
|
||||||
|
->initContext();
|
||||||
|
//TODO
|
||||||
|
//$this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function newAction()
|
||||||
|
{
|
||||||
|
$this->view->ws = new Application_Model_Webstream();
|
||||||
|
$this->view->html = $this->view->render('webstream/webstream.phtml');
|
||||||
|
/*
|
||||||
|
$pl_sess = $this->pl_sess;
|
||||||
|
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||||
|
|
||||||
|
$pl = new Application_Model_Playlist();
|
||||||
|
$pl->setName("Untitled Playlist");
|
||||||
|
$pl->setPLMetaData('dc:creator', $userInfo->id);
|
||||||
|
|
||||||
|
$this->changePlaylist($pl->getId());
|
||||||
|
$this->createFullResponse($pl);
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
}
|
24
airtime_mvc/application/models/Webstream.php
Normal file
24
airtime_mvc/application/models/Webstream.php
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class Application_Model_Webstream{
|
||||||
|
|
||||||
|
public static function getName(){
|
||||||
|
return "Default";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getId(){
|
||||||
|
return "id";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getLastModified($p_type){
|
||||||
|
return "modified";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getDefaultLength(){
|
||||||
|
return "length";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getDescription(){
|
||||||
|
return "desc";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
<button id="spl_new" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">New</button>
|
||||||
|
<?php if (isset($this->ws)) : ?>
|
||||||
|
<button id="spl_delete" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">Delete</button>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($this->ws)) : ?>
|
||||||
|
<input id="ws_id" type="hidden" value="<?php echo $this->ws->getId(); ?>"></input>
|
||||||
|
<input id="pl_lastMod" type="hidden" value="<?php echo $this->ws->getLastModified('U'); ?>"></input>
|
||||||
|
<div class="playlist_title">
|
||||||
|
<h3 id="ws_name">
|
||||||
|
<a id="playlist_name_display" contenteditable="true"><?php echo $this->ws->getName(); ?></a>
|
||||||
|
</h3>
|
||||||
|
<h4 id="ws_length"><?php echo $this->ws->getDefaultLength(); ?></h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<fieldset class="toggle closed" id="fieldset-metadate_change">
|
||||||
|
<legend style="cursor: pointer;"><span class="ui-icon ui-icon-triangle-2-n-s"></span>View / edit description</legend>
|
||||||
|
<dl class="zend_form">
|
||||||
|
<dt id="description-label"><label for="description">Description</label></dt>
|
||||||
|
<dd id="description-element">
|
||||||
|
<textarea cols="80" rows="24" id="description" name="description"><?php echo $this->ws->getDescription(); ?></textarea>
|
||||||
|
</dd>
|
||||||
|
<dt id="submit-label" style="display: none;"> </dt>
|
||||||
|
<dt id="streamurl-label"><label for="streamurl">Stream URL:</label></dt>
|
||||||
|
<dd id="streamurl-element">
|
||||||
|
<input type="text" value="http://"/>
|
||||||
|
</dd>
|
||||||
|
<dt id="length-label"><label for="length">Default Length:</label></dt>
|
||||||
|
<dd id="length-element">
|
||||||
|
<input type="text" value="00h 20m"/>
|
||||||
|
</dd>
|
||||||
|
<dd id="submit-element" class="buttons">
|
||||||
|
<input class="ui-button ui-state-default" type="submit" value="Cancel" id="description_cancel" name="cancel">
|
||||||
|
<input class="ui-button ui-state-default" type="submit" value="Save" id="description_save" name="submit">
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php else : ?>
|
||||||
|
<div>No webstream</div>
|
||||||
|
<?php endif; ?>
|
|
@ -616,7 +616,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
}
|
}
|
||||||
|
|
||||||
mod.fnNew = function() {
|
mod.fnNew = function() {
|
||||||
var url = '/Playlist/new';
|
var url = '/Webstream/new';
|
||||||
|
|
||||||
stopAudioPreview();
|
stopAudioPreview();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue