Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
ff2907823b
|
@ -231,6 +231,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
Application_Model_RabbitMq::SendMessageToPypo("update_stream_setting", $data);
|
||||
$this->view->statusMsg = "<div class='success'>Stream Setting Updated.</div>";
|
||||
}
|
||||
$live_stream_subform->updateConnectionURLs();
|
||||
}
|
||||
|
||||
$this->view->confirm_pypo_restart_text = "Updating settings will temporarily interrupt any currently playing shows. Click \'OK\' to continue.";
|
||||
|
|
|
@ -70,8 +70,39 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
$master_dj_connection_url = ($master_dj_connection_url == "")?("http://".$_SERVER['SERVER_NAME'].":".$m_port."/".$m_mount):$master_dj_connection_url;
|
||||
$live_dj_connection_url = ($live_dj_connection_url == "")?"http://".$_SERVER['SERVER_NAME'].":".$l_port."/".$l_mount:$live_dj_connection_url;
|
||||
|
||||
if($m_port=="" || $m_mount==""){
|
||||
$master_dj_connection_url = "N/A";
|
||||
}
|
||||
if($l_port=="" || $l_mount==""){
|
||||
$live_dj_connection_url = "N/A";
|
||||
}
|
||||
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/preferences_livestream.phtml', 'master_dj_connection_url'=>$master_dj_connection_url, 'live_dj_connection_url'=>$live_dj_connection_url,))
|
||||
));
|
||||
}
|
||||
|
||||
public function updateConnectionURLs(){
|
||||
$m_port = Application_Model_StreamSetting::GetMasterLiveSteamPort();
|
||||
$m_mount = Application_Model_StreamSetting::GetMasterLiveSteamMountPoint();
|
||||
$l_port = Application_Model_StreamSetting::GetDJLiveSteamPort();
|
||||
$l_mount = Application_Model_StreamSetting::GetDJLiveSteamMountPoint();
|
||||
|
||||
$master_dj_connection_url = Application_Model_Preference::GetMasterDJSourceConnectionURL();
|
||||
$live_dj_connection_url = Application_Model_Preference::GetLiveDJSourceConnectionURL();
|
||||
|
||||
$master_dj_connection_url = ($master_dj_connection_url == "")?("http://".$_SERVER['SERVER_NAME'].":".$m_port."/".$m_mount):$master_dj_connection_url;
|
||||
$live_dj_connection_url = ($live_dj_connection_url == "")?"http://".$_SERVER['SERVER_NAME'].":".$l_port."/".$l_mount:$live_dj_connection_url;
|
||||
|
||||
if($m_port=="" || $m_mount==""){
|
||||
$master_dj_connection_url = "N/A";
|
||||
}
|
||||
if($l_port=="" || $l_mount==""){
|
||||
$live_dj_connection_url = "N/A";
|
||||
}
|
||||
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/preferences_livestream.phtml', 'master_dj_connection_url'=>$master_dj_connection_url, 'live_dj_connection_url'=>$live_dj_connection_url,))
|
||||
));
|
||||
}
|
||||
}
|
|
@ -43,10 +43,11 @@
|
|||
<dd id="vorbisMetadata-element">
|
||||
<?php echo $this->form->getElement('icecast_vorbis_metadata') ?>
|
||||
</dd>
|
||||
<dt id="streamFormat-label" class="block-display">
|
||||
<dt id="streamFormat-label">
|
||||
<label class="optional"><?php echo $this->form->getElement('streamFormat')->getLabel() ?></label>
|
||||
</dt>
|
||||
<dd id="streamFormat-element" class="block-display radio-inline-list">
|
||||
<br>
|
||||
<dd id="streamFormat-element" class="radio-inline-list">
|
||||
<?php $i=0;
|
||||
$value = $this->form->getElement('streamFormat')->getValue();
|
||||
?>
|
||||
|
|
|
@ -18,8 +18,8 @@ airtime_dir = x
|
|||
base_url = localhost
|
||||
base_port = 80
|
||||
|
||||
#How many hours ahead of time should Airtime playout engine (PYPO)
|
||||
#cache scheduled media files.
|
||||
;How many hours ahead of time should Airtime playout engine (PYPO)
|
||||
;cache scheduled media files.
|
||||
cache_ahead_hours = 1
|
||||
|
||||
[soundcloud]
|
||||
|
|
|
@ -1876,7 +1876,7 @@ div.errors{
|
|||
}
|
||||
|
||||
.stream-config {
|
||||
width: 1080px;
|
||||
width: 1100px;
|
||||
}
|
||||
|
||||
.preferences .padded {
|
||||
|
|
|
@ -107,10 +107,11 @@ function checkLiquidsoapStatus(){
|
|||
}
|
||||
|
||||
function setLiveSourceConnectionOverrideListener(){
|
||||
$("[id=connection_url_override]").click(function(){
|
||||
$("[id=connection_url_override]").click(function(event){
|
||||
var div_ele = $(this).parent().find("div[id$='_dj_connection_url_tb']")
|
||||
div_ele.find(":input").val("")
|
||||
div_ele.show()
|
||||
event.preventDefault()
|
||||
})
|
||||
|
||||
// set action for "OK" and "X"
|
||||
|
@ -119,36 +120,42 @@ function setLiveSourceConnectionOverrideListener(){
|
|||
var master_dj_input = $("#master_dj_connection_url_tb")
|
||||
var master_dj_label = master_dj_input.parent().find("span")
|
||||
|
||||
live_dj_input.find("#ok").click(function(){
|
||||
live_dj_input.find("#ok").click(function(event){
|
||||
event.preventDefault()
|
||||
var url = $(this).parent().find(":input").val()
|
||||
live_dj_label.html(url)
|
||||
live_dj_input.hide()
|
||||
$.get("/Preference/set-source-connection-url/", {format: "json", type: "livedj", url:encodeURIComponent(url)});
|
||||
event.preventDefault()
|
||||
})
|
||||
|
||||
live_dj_input.find("#reset").click(function(){
|
||||
live_dj_input.find("#reset").click(function(event){
|
||||
event.preventDefault()
|
||||
var port = $("#dj_harbor_input_port").val()
|
||||
var mount = $("#dj_harbor_input_mount_point").val()
|
||||
var url = "http://"+location.hostname+":"+port+"/"+mount
|
||||
live_dj_label.html(url)
|
||||
live_dj_input.hide()
|
||||
$.get("/Preference/set-source-connection-url", {format: "json", type: "livedj", url:encodeURIComponent(url)});
|
||||
event.preventDefault()
|
||||
})
|
||||
|
||||
master_dj_input.find("#ok").click(function(){
|
||||
master_dj_input.find("#ok").click(function(event){
|
||||
var url = $(this).parent().find(":input").val()
|
||||
master_dj_label.html(url)
|
||||
master_dj_input.hide()
|
||||
$.get("/Preference/set-source-connection-url", {format: "json", type: "masterdj", url:encodeURIComponent(url)})
|
||||
event.preventDefault()
|
||||
})
|
||||
|
||||
master_dj_input.find("#reset").click(function(){
|
||||
master_dj_input.find("#reset").click(function(event){
|
||||
var port = $("#master_harbor_input_port").val()
|
||||
var mount = $("#master_harbor_input_mount_point").val()
|
||||
var url = "http://"+location.hostname+":"+port+"/"+mount
|
||||
master_dj_label.html(url)
|
||||
master_dj_input.hide()
|
||||
$.get("/Preference/set-source-connection-url", {format: "json", type: "masterdj", url:encodeURIComponent(url)})
|
||||
event.preventDefault()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -7,11 +7,6 @@ var _idToPostionLookUp;
|
|||
*or a playlist or a show.
|
||||
*/
|
||||
$(document).ready(function(){
|
||||
|
||||
if (useFlash())
|
||||
mySupplied = "oga, mp3, m4v";
|
||||
else
|
||||
mySupplied = "oga, mp3";
|
||||
|
||||
_playlist_jplayer = new jPlayerPlaylist({
|
||||
jPlayer: "#jquery_jplayer_1",
|
||||
|
@ -19,7 +14,12 @@ $(document).ready(function(){
|
|||
},[], //array of songs will be filled with below's json call
|
||||
{
|
||||
swfPath: "/js/jplayer",
|
||||
supplied:mySupplied,
|
||||
supplied:"oga, mp3, m4v",
|
||||
size: {
|
||||
width: "0px",
|
||||
height: "0px",
|
||||
cssClass: "jp-video-270p"
|
||||
},
|
||||
wmode: "window"
|
||||
});
|
||||
|
||||
|
@ -41,10 +41,6 @@ $(document).ready(function(){
|
|||
}
|
||||
});
|
||||
|
||||
function useFlash() {
|
||||
console.log(navigator.userAgent);
|
||||
return navigator.userAgent.toLowerCase().match('firefox');
|
||||
}
|
||||
/**
|
||||
* Sets up the jPlayerPlaylist to play.
|
||||
* - Get the playlist info based on the playlistID give.
|
||||
|
|
Loading…
Reference in New Issue