CC-3483: Live Stream: default fade in/out for live stream transition
- done. changing fade value doesn't require LS to restart
This commit is contained in:
parent
4bb0421cf7
commit
6b768c2f99
8 changed files with 68 additions and 5 deletions
|
@ -211,6 +211,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
Application_Model_Preference::SetStreamLabelFormat($values['streamFormat']);
|
||||
Application_Model_Preference::SetLiveSteamMasterUsername($values["master_username"]);
|
||||
Application_Model_Preference::SetLiveSteamMasterPassword($values["master_password"]);
|
||||
Application_Model_Preference::SetDefaultTransitionFade($values["transition_fade"]);
|
||||
|
||||
// extra info that goes into cc_stream_setting
|
||||
Application_Model_StreamSetting::SetMasterLiveSteamPort($values["master_harbor_input_port"]);
|
||||
|
|
|
@ -5,6 +5,21 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
|
||||
public function init()
|
||||
{
|
||||
$defaultFade = Application_Model_Preference::GetDefaultTransitionFade();
|
||||
if($defaultFade == ""){
|
||||
$defaultFade = '00.000000';
|
||||
}
|
||||
|
||||
//Default transition fade
|
||||
$transition_fade = new Zend_Form_Element_Text("transition_fade");
|
||||
$transition_fade->setLabel("Switch Transition Fade (s)")
|
||||
->setFilters(array('StringTrim'))
|
||||
->addValidator('regex', false, array('/^[0-5][0-9](\.\d{1,6})?$/',
|
||||
'messages' => 'enter a time in seconds 00{.000000}'))
|
||||
->setValue($defaultFade)
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($transition_fade);
|
||||
|
||||
//Master username
|
||||
$master_username = new Zend_Form_Element_Text('master_username');
|
||||
$master_username->setAttrib('autocomplete', 'off')
|
||||
|
|
|
@ -153,6 +153,18 @@ class Application_Model_Preference
|
|||
public static function GetDefaultFade() {
|
||||
return self::GetValue("default_fade");
|
||||
}
|
||||
|
||||
public static function SetDefaultTransitionFade($fade) {
|
||||
self::SetValue("default_transition_fade", $fade);
|
||||
|
||||
$eventType = "update_transition_fade";
|
||||
$md = array("transition_fade"=>$fade);
|
||||
Application_Model_RabbitMq::SendMessageToPypo($eventType, $md);
|
||||
}
|
||||
|
||||
public static function GetDefaultTransitionFade() {
|
||||
return self::GetValue("default_transition_fade");
|
||||
}
|
||||
|
||||
public static function SetStreamLabelFormat($type){
|
||||
self::SetValue("stream_label_format", $type);
|
||||
|
|
|
@ -1,6 +1,20 @@
|
|||
<fieldset class="padded stream-setting-global" style="margin-top: 15px">
|
||||
<legend>Input Stream Settings</legend>
|
||||
<dl class="zend_form">
|
||||
<dt id="transition_fade-label">
|
||||
<label class="optional" for="transition_fade"><?php echo $this->element->getElement('transition_fade')->getLabel() ?> :
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="transition_fade-element">
|
||||
<?php echo $this->element->getElement('transition_fade') ?>
|
||||
<?php if($this->element->getElement('transition_fade')->hasErrors()) : ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('transition_fade')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt id="master_username-label">
|
||||
<label class="optional" for="master_username"><?php echo $this->element->getElement('master_username')->getLabel() ?> :
|
||||
</label>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue