mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-07 12:52:54 -05:00
Added deviceinfo support to meshCtrl.
This commit is contained in:
@@ -196,6 +196,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
||||
if (obj.debugmode > 1) { console.log("KRecv(" + str.length + "): " + rstr2hex(str.substring(0, Math.min(str.length, 40)))); }
|
||||
if (str.length < 4) return;
|
||||
var cmdmsg = null, X = 0, Y = 0, command = ReadShort(str, 0), cmdsize = ReadShort(str, 2), jumboAdd = 0;
|
||||
if (obj.recordedData != null) { obj.recordedData.push({ t: Date.now(), d: str }); }
|
||||
if ((command == 27) && (cmdsize == 8)) {
|
||||
// Jumbo packet
|
||||
if (str.length < 12) return;
|
||||
@@ -777,6 +778,18 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
||||
return true;
|
||||
}
|
||||
|
||||
obj.StartRecording = function () {
|
||||
obj.recordedData = [];
|
||||
obj.recordedStart = Date.now();
|
||||
}
|
||||
|
||||
obj.StopRecording = function () {
|
||||
var r = obj.recordedData;
|
||||
delete obj.recordedData;
|
||||
delete obj.recordedStart;
|
||||
return r;
|
||||
}
|
||||
|
||||
// Private method
|
||||
obj.MuchTheSame = function (a, b) { return (Math.abs(a - b) < 4); }
|
||||
obj.Debug = function (msg) { console.log(msg); }
|
||||
|
||||
Reference in New Issue
Block a user