SAAS-661: Add mobile stream identifier on Stream Settings page
This commit is contained in:
parent
e2ca218ac2
commit
e32744668f
5 changed files with 20 additions and 3 deletions
|
@ -28,7 +28,10 @@ class Application_Form_EmbeddablePlayer extends Zend_Form_SubForm
|
|||
$opusStreamCount = 0;
|
||||
$urlOptions = Array();
|
||||
foreach(Application_Model_StreamSetting::getEnabledStreamData() as $stream => $data) {
|
||||
$urlOptions[$stream] = $data["codec"]." - ".$data["bitrate"]."kbps";
|
||||
$urlOptions[$stream] = strtoupper($data["codec"])." - ".$data["bitrate"]."kbps";
|
||||
if ($data["mobile"]) {
|
||||
$urlOptions[$stream] .= " - Mobile friendly";
|
||||
}
|
||||
if ($data["codec"] == "opus") {
|
||||
$opusStreamCount += 1;
|
||||
$urlOptions[$stream] .=" - The player does not support Opus streams.";
|
||||
|
|
|
@ -53,6 +53,12 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
|
|||
}
|
||||
$this->addElement($enable);
|
||||
|
||||
$mobile = new Zend_Form_Element_Checkbox('mobile');
|
||||
$mobile->setLabel(_('Good for mobile?'));
|
||||
$mobile->setValue($setting[$prefix.'_mobile']);
|
||||
$mobile->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($mobile);
|
||||
|
||||
$type = new Zend_Form_Element_Select('type');
|
||||
$type->setLabel(_("Stream Type:"))
|
||||
->setMultiOptions($stream_types)
|
||||
|
|
|
@ -94,7 +94,8 @@ class Application_Model_StreamSetting
|
|||
$streams[$id] = Array(
|
||||
"url" => "http://$host:$port/$mount",
|
||||
"codec" => $streamData[$prefix."type"],
|
||||
"bitrate" => $streamData[$prefix."bitrate"]
|
||||
"bitrate" => $streamData[$prefix."bitrate"],
|
||||
"mobile" => $streamData[$prefix."mobile"]
|
||||
);
|
||||
}
|
||||
return $streams;
|
||||
|
|
|
@ -14,6 +14,13 @@
|
|||
<dd id="<?php echo $s_name?>Enabled-element">
|
||||
<?php echo $this->element->getElement('enable')?>
|
||||
</dd>
|
||||
|
||||
<dt id="<?php echo $s_name?>Mobile-label">
|
||||
<label for="<?php echo $s_name?>Mobile"><?php echo $this->element->getElement('mobile')->getLabel() ?></label>
|
||||
</dt>
|
||||
<dd id="<?php echo $s_name?>Mobile-element">
|
||||
<?php echo $this->element->getElement('mobile')?>
|
||||
</dd>
|
||||
|
||||
<dt id="<?php echo $s_name?>Type-label">
|
||||
<label for="<?php echo $s_name?>Type"><?php echo $this->element->getElement('type')->getLabel()?></label>
|
||||
|
|
|
@ -29,7 +29,7 @@ $(document).ready(function() {
|
|||
$("#player_stream_url-element input[type='radio']").removeAttr("disabled");
|
||||
|
||||
$("input[name=player_stream_url]").each(function(i, obj) {
|
||||
if ($(this).parent().text().indexOf("opus") >= 0) {
|
||||
if ($(this).parent().text().toLowerCase().indexOf("opus") >= 0) {
|
||||
$(this).attr("disabled", "disabled");
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue