2017-02-08 14:36:28 +01:00
|
|
|
$(document).ready(function() {
|
|
|
|
performTranslation();
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
var oldEffects = [];
|
|
|
|
var cpcolor = '#B500FF';
|
|
|
|
var mappingList = serverSchema.properties.color.properties.imageToLedMappingType.enum;
|
2017-02-28 17:53:41 +01:00
|
|
|
var duration = 0;
|
2017-04-07 21:33:40 +02:00
|
|
|
var rgb = {r:255,g:0,b:0};
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
//create html
|
|
|
|
createTable('ssthead', 'sstbody', 'sstcont');
|
|
|
|
$('.ssthead').html(createTableRow([$.i18n('remote_input_origin'), $.i18n('remote_input_owner'), $.i18n('remote_input_priority'), $.i18n('remote_input_status')], true, true));
|
|
|
|
createTable('crthead', 'crtbody', 'adjust_content', true);
|
2017-09-04 23:12:59 +02:00
|
|
|
|
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
//create introduction
|
|
|
|
if(showOptHelp)
|
|
|
|
{
|
|
|
|
createHint("intro", $.i18n('remote_color_intro', $.i18n('remote_losthint')), "color_intro");
|
|
|
|
createHint("intro", $.i18n('remote_input_intro', $.i18n('remote_losthint')), "sstcont");
|
|
|
|
createHint("intro", $.i18n('remote_adjustment_intro', $.i18n('remote_losthint')), "adjust_content");
|
|
|
|
createHint("intro", $.i18n('remote_components_intro', $.i18n('remote_losthint')), "comp_intro");
|
|
|
|
createHint("intro", $.i18n('remote_maptype_intro', $.i18n('remote_losthint')), "maptype_intro");
|
2017-09-04 23:12:59 +02:00
|
|
|
createHint("intro", $.i18n('remote_videoMode_intro', $.i18n('remote_losthint')), "videomode_intro");
|
2017-02-08 14:36:28 +01:00
|
|
|
}
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
//color adjustment
|
|
|
|
var sColor = sortProperties(serverSchema.properties.color.properties.channelAdjustment.items.properties)
|
2017-03-18 00:05:04 +01:00
|
|
|
var values = serverInfo.adjustment[0]
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
for(key in sColor)
|
|
|
|
{
|
|
|
|
if(sColor[key].key != "id" && sColor[key].key != "leds")
|
|
|
|
{
|
|
|
|
var title = '<label for="cr_'+sColor[key].key+'">'+$.i18n(sColor[key].title)+'</label>';
|
|
|
|
var property;
|
|
|
|
var value = values[sColor[key].key]
|
|
|
|
|
|
|
|
if(sColor[key].type == "array")
|
|
|
|
{
|
|
|
|
property = '<div id="cr_'+sColor[key].key+'" class="input-group colorpicker-component" ><input type="text" class="form-control" /><span class="input-group-addon"><i></i></span></div>';
|
|
|
|
$('.crtbody').append(createTableRow([title, property], false, true));
|
|
|
|
createCP('cr_'+sColor[key].key, value, function(rgb,hex,e){
|
|
|
|
requestAdjustment(e.target.id.substr(e.target.id.indexOf("_") + 1), '['+rgb.r+','+rgb.g+','+rgb.b+']');
|
|
|
|
});
|
|
|
|
}
|
2017-02-15 15:53:35 +01:00
|
|
|
else if(sColor[key].type == "boolean")
|
|
|
|
{
|
|
|
|
property = '<div class="checkbox"><input id="cr_'+sColor[key].key+'" type="checkbox" value="'+value+'"/><label></label></div>';
|
|
|
|
$('.crtbody').append(createTableRow([title, property], false, true));
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-15 15:53:35 +01:00
|
|
|
$('#cr_'+sColor[key].key).off().on('change', function(e){
|
|
|
|
requestAdjustment(e.target.id.substr(e.target.id.indexOf("_") + 1), e.currentTarget.checked);
|
|
|
|
});
|
|
|
|
}
|
2017-02-08 14:36:28 +01:00
|
|
|
else
|
|
|
|
{
|
2017-09-04 23:12:59 +02:00
|
|
|
if(sColor[key].key == "brightness" || sColor[key].key == "brightnessCompensation" || sColor[key].key == "backlightThreshold")
|
2017-04-07 21:33:40 +02:00
|
|
|
property = '<div class="input-group"><input id="cr_'+sColor[key].key+'" type="number" class="form-control" min="0" max="100" step="10" value="'+value+'"/><span class="input-group-addon">'+$.i18n("edt_append_percent")+'</span></div>';
|
2017-02-08 14:36:28 +01:00
|
|
|
else
|
2017-03-24 10:17:36 +01:00
|
|
|
property = '<input id="cr_'+sColor[key].key+'" type="number" class="form-control" min="0.1" max="4.0" step="0.1" value="'+value+'"/>';
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
$('.crtbody').append(createTableRow([title, property], false, true));
|
|
|
|
$('#cr_'+sColor[key].key).off().on('change', function(e){
|
2017-02-28 17:53:41 +01:00
|
|
|
valValue(this.id,this.value,this.min,this.max);
|
2017-02-08 14:36:28 +01:00
|
|
|
requestAdjustment(e.target.id.substr(e.target.id.indexOf("_") + 1), e.currentTarget.value);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-04-07 21:33:40 +02:00
|
|
|
function sendEffect()
|
|
|
|
{
|
|
|
|
efx = $("#effect_select").val();
|
|
|
|
if(efx != "__none__")
|
|
|
|
{
|
|
|
|
requestPriorityClear();
|
|
|
|
$(hyperion).one("cmd-clear", function(event) {
|
|
|
|
setTimeout(function() {requestPlayEffect(efx,duration)}, 100);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-04-07 21:33:40 +02:00
|
|
|
function sendColor()
|
|
|
|
{
|
|
|
|
requestSetColor(rgb.r, rgb.g, rgb.b,duration);
|
|
|
|
}
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2016-09-09 18:59:58 +02:00
|
|
|
function updateInputSelect()
|
2017-09-04 23:12:59 +02:00
|
|
|
{
|
2017-02-08 14:36:28 +01:00
|
|
|
$('.sstbody').html("");
|
2016-09-09 18:59:58 +02:00
|
|
|
var data = "";
|
2017-03-18 00:05:04 +01:00
|
|
|
var prios = serverInfo.priorities
|
2016-09-09 18:59:58 +02:00
|
|
|
var i;
|
2017-03-24 10:17:36 +01:00
|
|
|
var clearAll = false;
|
2017-02-28 17:53:41 +01:00
|
|
|
|
2017-01-17 21:53:35 +01:00
|
|
|
for(i = 0; i < prios.length; i++)
|
|
|
|
{
|
2017-03-24 10:17:36 +01:00
|
|
|
var origin = prios[i].origin ? prios[i].origin : "System";
|
|
|
|
origin = origin.split("@");
|
|
|
|
var ip = origin[1];
|
|
|
|
origin = origin[0];
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-01-17 21:53:35 +01:00
|
|
|
var owner = prios[i].owner;
|
|
|
|
var active = prios[i].active;
|
|
|
|
var visible = prios[i].visible;
|
|
|
|
var priority = prios[i].priority;
|
|
|
|
var compId = prios[i].componentId;
|
|
|
|
var duration = prios[i].duration_ms/1000;
|
2018-12-27 23:11:32 +01:00
|
|
|
var value = "0,0,0";
|
2016-09-09 18:59:58 +02:00
|
|
|
var btn_type = "default";
|
2017-01-17 21:53:35 +01:00
|
|
|
var btn_text = $.i18n('remote_input_setsource_btn');
|
|
|
|
var btn_state = "enabled";
|
2017-03-30 06:20:20 +02:00
|
|
|
|
|
|
|
if (active)
|
|
|
|
btn_type = "primary";
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-03-30 06:20:20 +02:00
|
|
|
if(priority > 254)
|
|
|
|
continue;
|
|
|
|
if(priority < 254 && (compId == "EFFECT" || compId == "COLOR") )
|
|
|
|
clearAll = true;
|
|
|
|
|
2017-01-17 21:53:35 +01:00
|
|
|
if (visible)
|
|
|
|
{
|
|
|
|
btn_state = "disabled";
|
|
|
|
btn_type = "success";
|
|
|
|
btn_text = $.i18n('remote_input_sourceactiv_btn');
|
|
|
|
}
|
2017-03-30 06:20:20 +02:00
|
|
|
|
2017-01-17 21:53:35 +01:00
|
|
|
if(ip)
|
|
|
|
origin += '<br/><span style="font-size:80%; color:grey;">'+$.i18n('remote_input_ip')+' '+ip+'</span>';
|
2017-03-30 06:20:20 +02:00
|
|
|
|
2018-12-27 23:11:32 +01:00
|
|
|
if("value" in prios[i])
|
|
|
|
value = prios[i].value.RGB;
|
|
|
|
|
2017-03-30 06:20:20 +02:00
|
|
|
switch (compId)
|
2017-03-24 10:17:36 +01:00
|
|
|
{
|
2017-03-30 06:20:20 +02:00
|
|
|
case "EFFECT":
|
|
|
|
owner = $.i18n('remote_effects_label_effects')+' '+owner;
|
|
|
|
break;
|
|
|
|
case "COLOR":
|
2018-12-27 23:11:32 +01:00
|
|
|
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>';
|
2017-03-30 06:20:20 +02:00
|
|
|
break;
|
|
|
|
case "GRABBER":
|
|
|
|
owner = $.i18n('general_comp_GRABBER')+': ('+owner+')';
|
|
|
|
break;
|
|
|
|
case "V4L":
|
|
|
|
owner = $.i18n('general_comp_V4L')+': ('+owner+')';
|
|
|
|
break;
|
|
|
|
case "BOBLIGHTSERVER":
|
|
|
|
owner = $.i18n('general_comp_BOBLIGHTSERVER');
|
|
|
|
break;
|
|
|
|
case "UDPLISTENER":
|
|
|
|
owner = $.i18n('general_comp_UDPLISTENER');
|
|
|
|
break;
|
2018-12-31 00:21:44 +01:00
|
|
|
case "FLATBUFSERVER":
|
|
|
|
owner = $.i18n('general_comp_FLATBUFSERVER');
|
2018-12-27 23:11:32 +01:00
|
|
|
break;
|
2017-03-24 10:17:36 +01:00
|
|
|
}
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-03-21 17:55:46 +01:00
|
|
|
if(duration && compId != "GRABBER" && compId != "PROTOSERVER")
|
2017-01-17 21:53:35 +01:00
|
|
|
owner += '<br/><span style="font-size:80%; color:grey;">'+$.i18n('remote_input_duration')+' '+duration.toFixed(0)+$.i18n('edt_append_s')+'</span>';
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-01-17 21:53:35 +01:00
|
|
|
var btn = '<button id="srcBtn'+i+'" type="button" '+btn_state+' class="btn btn-'+btn_type+' btn_input_selection" onclick="requestSetSource('+priority+');">'+btn_text+'</button>';
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-03-30 06:20:20 +02:00
|
|
|
if((compId == "EFFECT" || compId == "COLOR") && priority < 254)
|
2017-01-17 21:53:35 +01:00
|
|
|
btn += '<button type="button" class="btn btn-sm btn-danger" style="margin-left:10px;" onclick="requestPriorityClear('+priority+');"><i class="fa fa-close"></button>';
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2016-12-21 18:24:03 +01:00
|
|
|
if(btn_type != 'default')
|
2017-02-08 14:36:28 +01:00
|
|
|
$('.sstbody').append(createTableRow([origin, owner, priority, btn], false, true));
|
2016-09-09 18:59:58 +02:00
|
|
|
}
|
2017-03-18 00:05:04 +01:00
|
|
|
var btn_auto_color = (serverInfo.priorities_autoselect? "btn-success" : "btn-danger");
|
|
|
|
var btn_auto_state = (serverInfo.priorities_autoselect? "disabled" : "enabled");
|
|
|
|
var btn_auto_text = (serverInfo.priorities_autoselect? $.i18n('general_btn_on') : $.i18n('general_btn_off'));
|
2017-03-24 10:17:36 +01:00
|
|
|
var btn_call_state = (clearAll? "enabled" : "disabled");
|
|
|
|
$('#auto_btn').html('<button id="srcBtn'+i+'" type="button" '+btn_auto_state+' class="btn '+btn_auto_color+'" style="margin-right:5px;display:inline-block;" onclick="requestSetSource(\'auto\');">'+$.i18n('remote_input_label_autoselect')+' ('+btn_auto_text+')</button>');
|
|
|
|
$('#auto_btn').append('<button type="button" '+btn_call_state+' class="btn btn-danger" style="display:inline-block;" onclick="requestClearAll();">'+$.i18n('remote_input_clearall')+'</button>');
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-01-17 21:53:35 +01:00
|
|
|
var max_width=100;
|
2016-09-09 18:59:58 +02:00
|
|
|
$('.btn_input_selection').each(function() {
|
|
|
|
if ($(this).innerWidth() > max_width)
|
|
|
|
max_width = $(this).innerWidth();
|
|
|
|
});
|
2017-09-04 23:12:59 +02:00
|
|
|
$('.btn_input_selection').css("min-width",max_width+"px");
|
2016-09-09 18:59:58 +02:00
|
|
|
}
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2016-12-21 18:24:03 +01:00
|
|
|
function updateLedMapping()
|
|
|
|
{
|
2018-12-27 23:11:32 +01:00
|
|
|
mapping = serverInfo.imageToLedMappingType;
|
2016-12-21 18:24:03 +01:00
|
|
|
|
|
|
|
$('#mappingsbutton').html("");
|
|
|
|
for(var ix = 0; ix < mappingList.length; ix++)
|
|
|
|
{
|
|
|
|
if(mapping == mappingList[ix])
|
|
|
|
btn_style = 'btn-success';
|
|
|
|
else
|
2017-03-02 11:52:27 +01:00
|
|
|
btn_style = 'btn-primary';
|
2016-12-21 18:24:03 +01:00
|
|
|
|
2017-03-24 10:17:36 +01:00
|
|
|
$('#mappingsbutton').append('<button type="button" id="lmBtn_'+mappingList[ix]+'" class="btn '+btn_style+'" style="margin:3px;min-width:200px" onclick="requestMappingType(\''+mappingList[ix]+'\');">'+$.i18n('remote_maptype_label_'+mappingList[ix])+'</button><br/>');
|
2016-12-21 18:24:03 +01:00
|
|
|
}
|
|
|
|
}
|
2016-09-09 18:59:58 +02:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
function updateComponents()
|
|
|
|
{
|
2018-12-27 23:11:32 +01:00
|
|
|
components = comps;
|
2019-01-01 19:47:07 +01:00
|
|
|
var hyperionEnabled = true;
|
|
|
|
components.forEach( function(obj) {
|
|
|
|
if (obj.name == "ALL")
|
|
|
|
{
|
|
|
|
hyperionEnabled = obj.enabled
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
// create buttons
|
|
|
|
$('#componentsbutton').html("");
|
|
|
|
for ( idx=0; idx<components.length;idx++)
|
2016-09-09 18:59:58 +02:00
|
|
|
{
|
2018-12-27 23:11:32 +01:00
|
|
|
if(components[idx].name == "ALL")
|
|
|
|
continue
|
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
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;
|
2019-01-01 19:47:07 +01:00
|
|
|
comp_goff = hyperionEnabled? "enabled" : "disabled";
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
// create btn if not there
|
|
|
|
if ($("#"+comp_btn_id).length == 0)
|
2016-09-09 18:59:58 +02:00
|
|
|
{
|
2017-03-24 10:17:36 +01:00
|
|
|
d='<span style="display:block;margin:3px"><button type="button" '+comp_goff+' id="'+comp_btn_id+'" class="btn '+enable_style
|
2017-02-08 14:36:28 +01:00
|
|
|
+'" onclick="requestSetComponentState(\''+comp_name+'\','+(!components[idx].enabled)
|
2017-03-24 10:17:36 +01:00
|
|
|
+')"><i id="'+comp_btn_id+'_icon" class="fa '+enable_icon+'"></i></button> '+$.i18n('general_comp_'+components[idx].name)+'</span>';
|
2017-02-08 14:36:28 +01:00
|
|
|
$('#componentsbutton').append(d);
|
|
|
|
}
|
|
|
|
else // already create, update state
|
|
|
|
{
|
|
|
|
setClassByBool( $('#'+comp_btn_id) , components[idx].enabled, "btn-danger", "btn-success" );
|
|
|
|
setClassByBool( $('#'+comp_btn_id+"_icon"), components[idx].enabled, "fa-stop" , "fa-play" );
|
2017-03-24 10:17:36 +01:00
|
|
|
$('#'+comp_btn_id).attr("onclick",'requestSetComponentState(\''+comp_name+'\','+(!components[idx].enabled)+')').attr(comp_goff);
|
2016-09-09 18:59:58 +02:00
|
|
|
}
|
|
|
|
}
|
2016-11-21 22:16:57 +01:00
|
|
|
}
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
function updateEffectlist()
|
|
|
|
{
|
2017-03-18 00:05:04 +01:00
|
|
|
var newEffects = serverInfo.effects;
|
2016-11-21 22:16:57 +01:00
|
|
|
if (newEffects.length != oldEffects.length)
|
|
|
|
{
|
2016-11-30 17:32:12 +01:00
|
|
|
$('#effect_select').html('<option value="__none__"></option>');
|
|
|
|
var usrEffArr = [];
|
|
|
|
var sysEffArr = [];
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2016-11-21 22:16:57 +01:00
|
|
|
for(i = 0; i < newEffects.length; i++) {
|
2016-11-30 17:32:12 +01:00
|
|
|
var effectName = newEffects[i].name;
|
|
|
|
if(!/^\:/.test(newEffects[i].file)){
|
|
|
|
usrEffArr.push(effectName);
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
sysEffArr.push(effectName);
|
|
|
|
}
|
2016-11-21 22:16:57 +01:00
|
|
|
}
|
2016-12-04 19:32:23 +01:00
|
|
|
$('#effect_select').append(createSel(usrEffArr, $.i18n('remote_optgroup_usreffets')));
|
|
|
|
$('#effect_select').append(createSel(sysEffArr, $.i18n('remote_optgroup_syseffets')));
|
2016-11-21 22:16:57 +01:00
|
|
|
oldEffects = newEffects;
|
|
|
|
}
|
|
|
|
}
|
2017-09-04 23:12:59 +02:00
|
|
|
|
|
|
|
function updateVideoMode()
|
|
|
|
{
|
|
|
|
videoModes = ["2D","3DSBS","3DTAB"];
|
2018-12-27 23:11:32 +01:00
|
|
|
currVideoMode = serverInfo.videomode;
|
2017-09-04 23:12:59 +02:00
|
|
|
|
|
|
|
$('#videomodebtns').html("");
|
|
|
|
for(var ix = 0; ix < videoModes.length; ix++)
|
|
|
|
{
|
|
|
|
if(currVideoMode == videoModes[ix])
|
|
|
|
btn_style = 'btn-success';
|
|
|
|
else
|
|
|
|
btn_style = 'btn-primary';
|
|
|
|
$('#videomodebtns').append('<button type="button" id="vModeBtn_'+videoModes[ix]+'" class="btn '+btn_style+'" style="margin:3px;min-width:200px" onclick="requestVideoMode(\''+videoModes[ix]+'\');">'+$.i18n('remote_videoMode_'+videoModes[ix])+'</button><br/>');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
// colorpicker and effect
|
|
|
|
if (getStorage('rmcpcolor') != null)
|
2017-04-07 21:33:40 +02:00
|
|
|
{
|
2017-02-08 14:36:28 +01:00
|
|
|
cpcolor = getStorage('rmcpcolor');
|
2017-04-07 21:33:40 +02:00
|
|
|
rgb = hexToRgb(cpcolor);
|
|
|
|
}
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-28 17:53:41 +01:00
|
|
|
if (getStorage('rmduration') != null)
|
|
|
|
{
|
|
|
|
$("#remote_duration").val(getStorage('rmduration'));
|
|
|
|
duration = getStorage('rmduration');
|
|
|
|
}
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-04-07 21:33:40 +02:00
|
|
|
createCP('cp2', cpcolor, function(rgbT,hex){
|
|
|
|
rgb = rgbT;
|
|
|
|
sendColor()
|
2017-02-08 14:36:28 +01:00
|
|
|
setStorage('rmcpcolor', hex);
|
|
|
|
});
|
2016-09-09 18:59:58 +02:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
$("#reset_color").off().on("click", function(){
|
|
|
|
requestPriorityClear();
|
|
|
|
$("#effect_select").val("__none__");
|
|
|
|
});
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-28 17:53:41 +01:00
|
|
|
$("#remote_duration").off().on("change", function(){
|
|
|
|
duration = valValue(this.id,this.value,this.min,this.max);
|
|
|
|
setStorage('rmduration', duration);
|
|
|
|
});
|
2016-09-09 18:59:58 +02:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
$("#effect_select").off().on("change", function(event) {
|
2017-04-07 21:33:40 +02:00
|
|
|
sendEffect();
|
|
|
|
});
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-04-07 21:33:40 +02:00
|
|
|
$("#remote_input_reseff, #remote_input_rescol").off().on("click", function(){
|
|
|
|
if(this.id == "remote_input_rescol")
|
|
|
|
sendColor();
|
|
|
|
else
|
|
|
|
sendEffect();
|
2017-02-08 14:36:28 +01:00
|
|
|
});
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-28 17:53:41 +01:00
|
|
|
$("#remote_input_img").change(function(){
|
|
|
|
readImg(this, function(src,width,height){
|
|
|
|
console.log(src,width,height)
|
|
|
|
requestSetImage(src,width,height,duration)
|
|
|
|
});
|
|
|
|
});
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
//force first update
|
2018-12-27 23:11:32 +01:00
|
|
|
updateComponents();
|
|
|
|
updateInputSelect();
|
|
|
|
updateLedMapping();
|
|
|
|
updateVideoMode();
|
|
|
|
updateEffectlist();
|
2017-09-04 23:12:59 +02:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
// interval updates
|
2018-12-27 23:11:32 +01:00
|
|
|
$(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();
|
|
|
|
});
|
2017-09-04 23:12:59 +02:00
|
|
|
|
|
|
|
removeOverlay();
|
2016-09-09 18:59:58 +02:00
|
|
|
});
|