diff --git a/airtime_mvc/application/forms/EmbeddablePlayer.php b/airtime_mvc/application/forms/EmbeddablePlayer.php index 537abd39a..ba7c5fce9 100644 --- a/airtime_mvc/application/forms/EmbeddablePlayer.php +++ b/airtime_mvc/application/forms/EmbeddablePlayer.php @@ -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."; diff --git a/airtime_mvc/application/forms/StreamSettingSubForm.php b/airtime_mvc/application/forms/StreamSettingSubForm.php index 874f38dc5..b84adf63d 100644 --- a/airtime_mvc/application/forms/StreamSettingSubForm.php +++ b/airtime_mvc/application/forms/StreamSettingSubForm.php @@ -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) diff --git a/airtime_mvc/application/models/StreamSetting.php b/airtime_mvc/application/models/StreamSetting.php index a85fad988..19a147798 100644 --- a/airtime_mvc/application/models/StreamSetting.php +++ b/airtime_mvc/application/models/StreamSetting.php @@ -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; diff --git a/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml b/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml index 6b76ab84a..a8d61d247 100644 --- a/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml +++ b/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml @@ -14,6 +14,13 @@