Details coming soon.

This commit is contained in:
Paulchen-Panther
2018-12-27 23:11:32 +01:00
parent e3be03ea73
commit d762aa2f3e
186 changed files with 6156 additions and 5444 deletions

View File

@@ -86,22 +86,6 @@ $(document).ready(function() {
requestSetColor(rgb.r, rgb.g, rgb.b,duration);
}
function updateRemote()
{
if ($('#componentsbutton').length == 0)
{
$(hyperion).off("cmd-serverinfo",updateRemote);
}
else
{
updateInputSelect();
updateLedMapping();
updateVideoMode();
updateComponents();
updateEffectlist();
}
}
function updateInputSelect()
{
$('.sstbody').html("");
@@ -123,6 +107,7 @@ $(document).ready(function() {
var priority = prios[i].priority;
var compId = prios[i].componentId;
var duration = prios[i].duration_ms/1000;
var value = "0,0,0";
var btn_type = "default";
var btn_text = $.i18n('remote_input_setsource_btn');
var btn_state = "enabled";
@@ -145,13 +130,16 @@ $(document).ready(function() {
if(ip)
origin += '<br/><span style="font-size:80%; color:grey;">'+$.i18n('remote_input_ip')+' '+ip+'</span>';
if("value" in prios[i])
value = prios[i].value.RGB;
switch (compId)
{
case "EFFECT":
owner = $.i18n('remote_effects_label_effects')+' '+owner;
break;
case "COLOR":
owner = $.i18n('remote_color_label_color')+' '+'<div style="width:18px; height:18px; border-radius:20px; margin-bottom:-4px; border:1px grey solid; background-color: rgb('+prios[i].value.RGB+'); display:inline-block" title="RGB: ('+prios[i].value.RGB+')"></div>';
owner = $.i18n('remote_color_label_color')+' '+'<div style="width:18px; height:18px; border-radius:20px; margin-bottom:-4px; border:1px grey solid; background-color: rgb('+value+'); display:inline-block" title="RGB: ('+value+')"></div>';
break;
case "GRABBER":
owner = $.i18n('general_comp_GRABBER')+': ('+owner+')';
@@ -165,6 +153,9 @@ $(document).ready(function() {
case "UDPLISTENER":
owner = $.i18n('general_comp_UDPLISTENER');
break;
case "PROTOSERVER":
owner = "Proto";
break;
}
if(duration && compId != "GRABBER" && compId != "PROTOSERVER")
@@ -195,7 +186,7 @@ $(document).ready(function() {
function updateLedMapping()
{
mapping = serverInfo.ledMAppingType;
mapping = serverInfo.imageToLedMappingType;
$('#mappingsbutton').html("");
for(var ix = 0; ix < mappingList.length; ix++)
@@ -211,16 +202,19 @@ $(document).ready(function() {
function updateComponents()
{
components = serverInfo.components;
components = comps;
// create buttons
$('#componentsbutton').html("");
for ( idx=0; idx<components.length;idx++)
{
if(components[idx].name == "ALL")
continue
enable_style = (components[idx].enabled? "btn-success" : "btn-danger");
enable_icon = (components[idx].enabled? "fa-play" : "fa-stop");
comp_name = components[idx].name;
comp_btn_id = "comp_btn_"+comp_name;
comp_goff = serverInfo.hyperion.off? "disabled" : "enabled";
comp_goff = serverInfo.hyperion.enabled? "enabled" : "disabled";
// create btn if not there
if ($("#"+comp_btn_id).length == 0)
@@ -266,7 +260,7 @@ $(document).ready(function() {
function updateVideoMode()
{
videoModes = ["2D","3DSBS","3DTAB"];
currVideoMode = serverInfo.grabbers.videomode;
currVideoMode = serverInfo.videomode;
$('#videomodebtns').html("");
for(var ix = 0; ix < videoModes.length; ix++)
@@ -327,10 +321,34 @@ $(document).ready(function() {
});
//force first update
updateRemote();
updateComponents();
updateInputSelect();
updateLedMapping();
updateVideoMode();
updateEffectlist();
// interval updates
$(hyperion).on("cmd-serverinfo",updateRemote);
$(hyperion).on("components-updated",updateComponents);
$(hyperion).on("cmd-priorities-update", function(event){
serverInfo.priorities = event.response.data.priorities
serverInfo.priorities_autoselect = event.response.data.priorities_autoselect
updateInputSelect()
});
$(hyperion).on("cmd-imageToLedMapping-update", function(event){
serverInfo.imageToLedMappingType = event.response.data.imageToLedMappingType
updateLedMapping()
});
$(hyperion).on("cmd-videomode-update", function(event){
serverInfo.videomode = event.response.data.videomode
updateVideoMode()
});
$(hyperion).on("cmd-effects-update", function(event){
serverInfo.effects = event.response.data.effects
updateEffectlist();
});
removeOverlay();
});