diff --git a/airtime_mvc/application/configs/conf.php b/airtime_mvc/application/configs/conf.php
index d38a03797..6cf5f9d6c 100644
--- a/airtime_mvc/application/configs/conf.php
+++ b/airtime_mvc/application/configs/conf.php
@@ -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);
}
diff --git a/airtime_mvc/application/controllers/EmbeddableplayerController.php b/airtime_mvc/application/controllers/EmbeddableplayerController.php
index 3cd0e3af4..f30683b79 100644
--- a/airtime_mvc/application/controllers/EmbeddableplayerController.php
+++ b/airtime_mvc/application/controllers/EmbeddableplayerController.php
@@ -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 = "
". _("Preferences updated.")."
";
-
- } else {
-
- }
-
- $this->view->form = $form;
- }
-
$this->view->form = $form;
}
}
\ No newline at end of file
diff --git a/airtime_mvc/application/forms/EmbeddablePlayer.php b/airtime_mvc/application/forms/EmbeddablePlayer.php
index 2accf23a5..00f49384a 100644
--- a/airtime_mvc/application/forms/EmbeddablePlayer.php
+++ b/airtime_mvc/application/forms/EmbeddablePlayer.php
@@ -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('');
+ $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);
}
}
\ No newline at end of file
diff --git a/airtime_mvc/application/views/scripts/embeddableplayer/index.phtml b/airtime_mvc/application/views/scripts/embeddableplayer/index.phtml
index 51e00dc03..0a9e66daa 100644
--- a/airtime_mvc/application/views/scripts/embeddableplayer/index.phtml
+++ b/airtime_mvc/application/views/scripts/embeddableplayer/index.phtml
@@ -1,16 +1,13 @@
diff --git a/airtime_mvc/application/views/scripts/form/embeddableplayer.html b/airtime_mvc/application/views/scripts/form/embeddableplayer.html
deleted file mode 100644
index 8a1ad551e..000000000
--- a/airtime_mvc/application/views/scripts/form/embeddableplayer.html
+++ /dev/null
@@ -1,8 +0,0 @@
-
\ No newline at end of file
diff --git a/airtime_mvc/application/views/scripts/form/embeddableplayer.phtml b/airtime_mvc/application/views/scripts/form/embeddableplayer.phtml
new file mode 100644
index 000000000..f1ca8d478
--- /dev/null
+++ b/airtime_mvc/application/views/scripts/form/embeddableplayer.phtml
@@ -0,0 +1,13 @@
+
\ No newline at end of file
diff --git a/airtime_mvc/public/css/embed-player.css b/airtime_mvc/public/css/embed-player.css
new file mode 100644
index 000000000..1f19319e8
--- /dev/null
+++ b/airtime_mvc/public/css/embed-player.css
@@ -0,0 +1,4 @@
+#embed_player_preview {
+ margin-top:20px;
+ border: 1px solid;
+}