Add new features to API on air call which shows the status of the two streams and whether they are switched to live output
This commit is contained in:
parent
fd97b5744a
commit
9e36dda855
|
@ -185,6 +185,10 @@ class ApiController extends Zend_Controller_Action
|
|||
$result["on_air_light"] = false;
|
||||
$result["on_air_light_expected_status"] = false;
|
||||
$result["station_down"] = false;
|
||||
$result["master_stream"] = false;
|
||||
$result["live_stream"] = false;
|
||||
$result["master_stream_on_air"] = false;
|
||||
$result["live_stream_on_air"] = false;
|
||||
|
||||
$range = Application_Model_Schedule::GetPlayOrderRange();
|
||||
|
||||
|
@ -210,6 +214,25 @@ class ApiController extends Zend_Controller_Action
|
|||
$result["station_down"] = true;
|
||||
}
|
||||
|
||||
$live_dj_stream = Application_Model_Preference::GetSourceStatus("live_dj");
|
||||
$master_dj_stream = Application_Model_Preference::GetSourceStatus("master_dj");
|
||||
$live_dj_on_air = Application_Model_Preference::GetSourceSwitchStatus("live_dj");
|
||||
$master_dj_on_air = Application_Model_Preference::GetSourceSwitchStatus("master_dj");
|
||||
|
||||
if($live_dj_stream == true){
|
||||
$result["live_stream"] = true;
|
||||
if ($live_dj_on_air == "on") {
|
||||
$result["live_stream_on_air"] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if($master_dj_stream == true){
|
||||
$result["master_stream"] = true;
|
||||
if ($master_dj_on_air == "on") {
|
||||
$result["master_stream_on_air"] = true;
|
||||
}
|
||||
}
|
||||
|
||||
$this->returnJsonOrJsonp($request, $result);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
<div id="weekly-schedule-widget-preview" <?php if (isset($this->weekly_schedule_error_msg)) echo "style=display:none"; ?>>
|
||||
<label><?php echo _("Preview:") ?></label>
|
||||
<div class="schedule_iframe_wrapper">
|
||||
<iframe id="schedule_iframe" height="400px" width="550px" scrolling="no" frameborder="0" src=<?php echo Application_Common_HTTPHelper::getStationUrl()."embed/weekly-program"?>></iframe>
|
||||
<iframe id="schedule_iframe" height="400px" width="550px" scrolling="no" frameborder="0" src="<?php echo Application_Common_HTTPHelper::getStationUrl()."embed/weekly-program"?>"></iframe>
|
||||
</div>
|
||||
|
||||
<div style="clear:both"></div>
|
||||
<label>Embeddable Code:</label>
|
||||
<textarea style="width:98%" rows="3" readonly="readonly"><iframe height="400px" width="550px" scrolling="no" frameborder="0" src=<?php echo Application_Common_HTTPHelper::getStationUrl()."embed/weekly-program"?>></iframe>
|
||||
<textarea style="width:98%" rows="3" readonly="readonly"><iframe height="400px" width="550px" scrolling="no" frameborder="0" src="<?php echo Application_Common_HTTPHelper::getStationUrl()."embed/weekly-program"?>"></iframe>
|
||||
</textarea>
|
||||
<div><p>
|
||||
Copy this code and paste it into your website's HTML to embed the weekly schedule in your site.
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<?php endif; ?>
|
||||
|
||||
<div id="tab-1" class="schedule tab_content current">
|
||||
<iframe onLoad="autoResize('schedule_iframe');" id="schedule_iframe" height="300px" scrolling="yes" frameborder="0" src=<?php echo $this->stationUrl."embed/weekly-program?style=premium"?>></iframe>
|
||||
<iframe onLoad="autoResize('schedule_iframe');" id="schedule_iframe" height="300px" scrolling="yes" frameborder="0" src="<?php echo $this->stationUrl."embed/weekly-program?style=premium"?>"></iframe>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue