Added placeholders for player embed code and preview
This commit is contained in:
parent
cf11291877
commit
2272451e08
7 changed files with 35 additions and 34 deletions
|
@ -92,7 +92,7 @@ class Config {
|
|||
public static function setAirtimeVersion() {
|
||||
$airtime_version = Application_Model_Preference::GetAirtimeVersion();
|
||||
$uniqueid = Application_Model_Preference::GetUniqueId();
|
||||
$buildVersion = file_get_contents(self::$rootDir."/../VERSION");
|
||||
$buildVersion = @file_get_contents(self::$rootDir."/../VERSION");
|
||||
self::$CC_CONFIG['airtime_version'] = md5($airtime_version.$buildVersion);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,23 +9,12 @@ class EmbeddablePlayerController extends Zend_Controller_Action
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'css/embed-player.css?'.$CC_CONFIG['airtime_version']);
|
||||
|
||||
$form = new Application_Form_EmbeddablePlayer();
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
if ($request->isPost()) {
|
||||
$formValues = $request->getPost();
|
||||
if ($form->isValid($formValues)) {
|
||||
|
||||
$this->view->statusMsg = "<div class='success'>". _("Preferences updated.")."</div>";
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
$this->view->form = $form;
|
||||
}
|
||||
|
||||
$this->view->form = $form;
|
||||
}
|
||||
}
|
|
@ -5,15 +5,22 @@ class Application_Form_EmbeddablePlayer extends Zend_Form_SubForm
|
|||
public function init()
|
||||
{
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/embeddableplayer.html'))
|
||||
array('ViewScript', array('viewScript' => 'form/embeddableplayer.phtml'))
|
||||
));
|
||||
|
||||
$displayTrackMetadata = new Zend_Form_Element_Checkbox('display_track_metadata');
|
||||
$embedSrc = new Zend_Form_Element_Text('player_embed_src');
|
||||
$embedSrc->setAttrib("readonly", "readonly");
|
||||
$embedSrc->setAttrib("class", "player_embed_src");
|
||||
$embedSrc->setValue('<iframe></iframe>');
|
||||
$embedSrc->removeDecorator('label');
|
||||
$this->addElement($embedSrc);
|
||||
|
||||
$displayTrackMetadata = new Zend_Form_Element_Checkbox('player_display_track_metadata');
|
||||
$displayTrackMetadata->setValue(true);
|
||||
$displayTrackMetadata->setLabel(_('Display track metadata?'));
|
||||
$this->addElement($displayTrackMetadata);
|
||||
|
||||
$streamURL = new Zend_Form_Element_Radio('stream_url');
|
||||
$streamURL = new Zend_Form_Element_Radio('player_stream_url');
|
||||
$urlOptions = Array();
|
||||
foreach(Application_Model_StreamSetting::getEnabledStreamUrls() as $type => $url) {
|
||||
$urlOptions[$url] = $type;
|
||||
|
@ -21,10 +28,9 @@ class Application_Form_EmbeddablePlayer extends Zend_Form_SubForm
|
|||
$streamURL->setMultiOptions(
|
||||
$urlOptions
|
||||
);
|
||||
$streamURL->setValue(0);
|
||||
$streamURL->setLabel(_('Select stream:'));
|
||||
$this->addElement($streamURL);
|
||||
|
||||
$submit = new Zend_Form_Element_Submit('submit');
|
||||
$this->addElement($submit);
|
||||
}
|
||||
}
|
|
@ -1,16 +1,13 @@
|
|||
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong preferences">
|
||||
<h2 style="float:left"><?php echo _("Embeddable Player") ?></h2>
|
||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
||||
|
||||
<form method="post" id="player_form" enctype="multipart/form-data">
|
||||
|
||||
|
||||
<div style="clear:both"></div>
|
||||
<?php
|
||||
<?php echo $this->form; ?>
|
||||
|
||||
echo $this->statusMsg;
|
||||
echo $this->form;
|
||||
?>
|
||||
<?php echo $this->form->getElement('submit')->render() ?>
|
||||
<br />
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<fieldset class="padded">
|
||||
<dl class="zend_form">
|
||||
<?php echo $this->element->getElement('display_track_metadata'); ?>
|
||||
|
||||
<?php echo $this->element->getElement('stream_url'); ?>
|
||||
|
||||
</dl>
|
||||
</fieldset>
|
|
@ -0,0 +1,13 @@
|
|||
<fieldset class="padded">
|
||||
<dl class="zend_form">
|
||||
|
||||
<?php echo $this->element->getElement('player_embed_src'); ?>
|
||||
|
||||
<?php echo $this->element->getElement('player_display_track_metadata'); ?>
|
||||
|
||||
<?php echo $this->element->getElement('player_stream_url'); ?>
|
||||
|
||||
<div style="clear:both"></div>
|
||||
<div id="embed_player_preview">player preview holder</div>
|
||||
</dl>
|
||||
</fieldset>
|
4
airtime_mvc/public/css/embed-player.css
Normal file
4
airtime_mvc/public/css/embed-player.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
#embed_player_preview {
|
||||
margin-top:20px;
|
||||
border: 1px solid;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue