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

@@ -22,6 +22,17 @@ var loggingHandlerInstalled = false;
var watchdog = 0;
var debugMessagesActive = true;
var wSess = [];
var plugins_installed = {};
var plugins_available = {};
//comps serverinfo lock
comps = [];
compsInited = false;
// prios serverinfo lock
priosInited = false;
// token list
tokenList = {}
function initRestart()
{
@@ -59,6 +70,7 @@ function connectionLostDetection(type)
setInterval(connectionLostDetection, 3000);
// init websocket to hyperion and bind socket events to jquery events of $(hyperion) object
function initWebSocket()
{
if ("WebSocket" in window)
@@ -66,8 +78,8 @@ function initWebSocket()
if (websocket == null)
{
jsonPort = (document.location.port == '') ? '80' : document.location.port;
websocket = new WebSocket('ws://'+document.location.hostname+":"+document.location.port);
console.log(jsonPort)
websocket = new WebSocket('ws://'+document.location.hostname+":"+jsonPort);
websocket.onopen = function (event) {
$(hyperion).trigger({type:"open"});
@@ -108,7 +120,7 @@ function initWebSocket()
response = JSON.parse(event.data);
success = response.success;
cmd = response.command;
if (success)
if (success || typeof(success) == "undefined")
{
$(hyperion).trigger({type:"cmd-"+cmd, response:response});
}
@@ -161,7 +173,7 @@ function sendToHyperion(command, subcommand, msg)
// also used for watchdog
function requestServerInfo()
{
sendToHyperion("serverinfo");
sendToHyperion("serverinfo","",'"subscribe":["components-update","sessions-update","priorities-update", "imageToLedMapping-update", "adjustment-update", "videomode-update", "effects-update"]');
}
function requestSysInfo()
@@ -218,7 +230,7 @@ function requestPriorityClear(prio)
function requestClearAll()
{
sendToHyperion("clearall");
requestPriorityClear(-1)
}
function requestPlayEffect(effectName, duration)