mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Refactor websocket + true receive (#471)
* save it * ws: multiframe receive now works * port cfg write with autocorrect to jsonprocessor cleanup * cleanup * cleanup * add support for image data over ws binary frame
This commit is contained in:
@@ -421,7 +421,6 @@ $(document).ready(function() {
|
||||
|
||||
aceEdt.set(finalLedArray);
|
||||
$('#collapse4').collapse('show');
|
||||
|
||||
});
|
||||
|
||||
// create and update editor
|
||||
|
@@ -97,6 +97,7 @@ function initWebSocket()
|
||||
case 1015: reason = "The connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."; break;
|
||||
default: reason = "Unknown reason";
|
||||
}
|
||||
console.log("[websocket::onclose] "+reason)
|
||||
$(hyperion).trigger({type:"close", reason:reason});
|
||||
watchdog = 10;
|
||||
connectionLostDetection();
|
||||
@@ -262,15 +263,7 @@ function requestWriteConfig(config, full)
|
||||
});
|
||||
}
|
||||
|
||||
var config_str = escape(encode_utf8(JSON.stringify(serverConfig)));
|
||||
|
||||
$.post( "/cgi/cfg_set", { cfg: config_str })
|
||||
.done(function( data ) {
|
||||
$("html, body").animate({ scrollTop: 0 }, "slow");
|
||||
})
|
||||
.fail(function() {
|
||||
showInfoDialog('error', $.i18n('infoDialog_writeconf_error_title'), $.i18n('infoDialog_writeconf_error_text'));
|
||||
});
|
||||
sendToHyperion("config","setconfig", '"config":'+JSON.stringify(serverConfig));
|
||||
}
|
||||
|
||||
function requestWriteEffect(effectName,effectPy,effectArgs)
|
||||
|
Reference in New Issue
Block a user