diff --git a/translate/translate.json b/translate/translate.json
index 5e04ba2778..155ec5dbf2 100644
--- a/translate/translate.json
+++ b/translate/translate.json
@@ -28311,7 +28311,9 @@
"zh-cht": "編碼",
"hu": "Kódolás",
"xloc": [
- "default-mobile.handlebars->dialog->3->dialog7->d7amtkvm->3->1->0->1"
+ "default-mobile.handlebars->dialog->3->dialog7->d7amtkvm->3->1->0->1",
+ "default-mobile.handlebars->dialog->3->dialog7->d7meshkvm->3->1->6->1",
+ "default.handlebars->container->dialog->dialogBody->dialog7->d7meshkvm->9->1"
]
},
{
@@ -40112,6 +40114,13 @@
"zh-cht": "物品",
"hu": "Elem"
},
+ {
+ "en": "JPEG",
+ "xloc": [
+ "default-mobile.handlebars->dialog->3->dialog7->d7meshkvm->3->1->6->3->d7encoding->1",
+ "default.handlebars->container->dialog->dialogBody->dialog7->d7meshkvm->9->d7encoding->1"
+ ]
+ },
{
"bs": "JSON",
"cs": "JSON",
@@ -43882,7 +43891,7 @@
"zh-cht": "斷開連接鎖定",
"hu": "Zárolás a kapcsolat bontásakor",
"xloc": [
- "default-mobile.handlebars->dialog->3->dialog7->d7meshkvm->3->1->6->3->d7deskAutoLockLabel",
+ "default-mobile.handlebars->dialog->3->dialog7->d7meshkvm->3->1->8->3->d7deskAutoLockLabel",
"default.handlebars->container->dialog->dialogBody->dialog7->d7meshkvm->d7desktopOtherSettings->d7otherset2->d7deskAutoLockLabel"
]
},
@@ -80665,6 +80674,13 @@
"default.handlebars->47->113"
]
},
+ {
+ "en": "WEBP",
+ "xloc": [
+ "default-mobile.handlebars->dialog->3->dialog7->d7meshkvm->3->1->6->3->d7encoding->3",
+ "default.handlebars->container->dialog->dialogBody->dialog7->d7meshkvm->9->d7encoding->3"
+ ]
+ },
{
"bs": "WIN + Down",
"cs": "VYHRAJTE + Dolů",
diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars
index 505239f84e..a06bc570ae 100644
--- a/views/default-mobile.handlebars
+++ b/views/default-mobile.handlebars
@@ -1,4 +1,4 @@
-
+
|
@@ -1344,7 +1355,13 @@
// Check if WebP is supported
var webpSupport = false;
- check_webp_feature('lossy', function (f, x) { webpSupport = x; });
+ check_webp_feature('lossy', function (f, x) {
+ webpSupport = x;
+ if (!x) {
+ d7encoding.options[1].disabled = true;
+ d7encoding.value = 1;
+ }
+ });
function startup() {
if ((features & 32) == 0) {
@@ -4424,7 +4441,7 @@
var desktop;
var desktopNode;
- var desktopsettings = { encoding: 2, showfocus: false, showmouse: true, showcad: true, quality: 40, scaling: 1024, framerate: 50, autolock: false };
+ var desktopsettings = { encoding: 2, showfocus: false, showmouse: true, showcad: true, quality: 40, scaling: 1024, framerate: 50, autolock: false, agentencoding: 4 };
function setupDesktop() {
// Setup the remote desktop
if ((desktopNode != currentNode) && (desktop != null)) { desktop.Stop(); desktopNode = null; desktop = null; }
@@ -4548,7 +4565,7 @@
p11clearConsoleMsg();
}
}
- desktop.m.ImageType = webpSupport ? 4 : 1; // Send 4 if WebP is supported, otherwise send 1 for JPEG.
+ desktop.m.ImageType = desktopsettings.agentencoding; // Send 4 if WebP is supported, otherwise send 1 for JPEG.
desktop.m.CompressionLevel = desktopsettings.quality; // Number from 1 to 100. 50 or less is best.
desktop.m.ScalingLevel = desktopsettings.scaling;
desktop.m.FrameRateTimer = desktopsettings.framerate;
@@ -4632,12 +4649,14 @@
desktopsettings.scaling = d7bitmapscaling.value;
desktopsettings.framerate = d7framelimiter.value;
desktopsettings.autolock = d7deskAutoLock.checked;
+ desktopsettings.agentencoding = d7encoding.value;
localStorage.setItem('desktopsettings', JSON.stringify(desktopsettings));
applyDesktopSettings();
if (desktop) {
if (desktop.contype == 1) {
- if (desktop.State != 0) { desktop.m.SendCompressionLevel(webpSupport ? 4 : 1, desktopsettings.quality, desktopsettings.scaling, desktopsettings.framerate); }
+ if (desktop.State != 0) { desktop.m.SendCompressionLevel(desktopsettings.agentencoding, desktopsettings.quality, desktopsettings.scaling, desktopsettings.framerate); }
desktop.sendCtrlMsg('{"ctrlChannel":"102938","type":"autolock","value":' + desktopsettings.autolock + '}');
+ desktop.m.SendRefresh();
}
if (desktop.contype == 2) {
if (desktop.State != 0) { desktop.Stop(); setTimeout(function () { connectDesktop(null, 2); }, 50); }
@@ -4651,6 +4670,7 @@
QH('d7bitmapquality', r);
d7desktopmode.value = desktopsettings.encoding;
d7bitmapquality.value = 40; // Default value
+ if (desktopsettings.agentencoding) { d7encoding.value = desktopsettings.agentencoding; } else { desktopsettings.agentencoding = 4; }
if (ops.indexOf(parseInt(desktopsettings.quality)) >= 0) { d7bitmapquality.value = desktopsettings.quality; }
d7bitmapscaling.value = desktopsettings.scaling;
if (desktopsettings.framerate) { d7framelimiter.value = desktopsettings.framerate; }
diff --git a/views/default.handlebars b/views/default.handlebars
index 7ad2307d9c..90b51bb226 100644
--- a/views/default.handlebars
+++ b/views/default.handlebars
@@ -1402,6 +1402,13 @@
+
+ Encoding
+
+
Other Settings
@@ -1524,8 +1531,8 @@
var stars = {}; // Devices that have been "stared" by the user.
var nodeShortIdent = 0;
var desktop;
- var desktopsettings = { encoding: 2, showfocus: false, showmouse: true, showcad: true, quality: 40, scaling: 1024, framerate: 50, localkeymap: false, swapmouse: false, remotekeymap: false, autoclipboard: false, autolock: false };
- var multidesktopsettings = { quality: 20, scaling: 128, framerate: 1000 };
+ var desktopsettings = { encoding: 2, showfocus: false, showmouse: true, showcad: true, quality: 40, scaling: 1024, framerate: 50, localkeymap: false, swapmouse: false, remotekeymap: false, autoclipboard: false, autolock: false, agentencoding: 4 };
+ var multidesktopsettings = { quality: 20, scaling: 128, framerate: 1000, agentencoding: 4 };
var terminal;
var files;
var debugLevel = parseInt('{{{debuglevel}}}');
@@ -1600,7 +1607,13 @@
// Check if WebP is supported
var webpSupport = false;
- check_webp_feature('lossy', function (f, x) { webpSupport = x; });
+ check_webp_feature('lossy', function (f, x) {
+ webpSupport = x;
+ if (!x) {
+ d7encoding.options[1].disabled = true;
+ d7encoding.value = 1;
+ }
+ });
function startup() {
if ((features & 32) == 0) {
@@ -4612,7 +4625,7 @@
c.removeAttribute('onmousemove');
Q('xkvmid_' + shortid).appendChild(c);
QH('skvmid_' + shortid, ["Disconnected", "Connecting...", "Setup...", '', ''][((desktop.m.State == null)?desktop.m.state:desktop.m.State)]);
- if (desktop.m.SendCompressionLevel) { desktop.m.SendCompressionLevel(webpSupport?4:1, multidesktopsettings.quality, multidesktopsettings.scaling, multidesktopsettings.framerate); }
+ if (desktop.m.SendCompressionLevel) { desktop.m.SendCompressionLevel(multidesktopsettings.agentencoding, multidesktopsettings.quality, multidesktopsettings.scaling, multidesktopsettings.framerate); }
desktop.shortid = shortid;
desktop.onStateChanged = onMultiDesktopStateChange;
desktop.m.onRemoteInputLockChanged = null;
@@ -5147,6 +5160,7 @@
QV('d7desktopOtherSettings', false);
d7bitmapquality.value = multidesktopsettings.quality;
d7bitmapscaling.value = multidesktopsettings.scaling;
+ d7encoding.value = multidesktopsettings.agentencoding;
if (multidesktopsettings.framerate) { d7framelimiter.value = multidesktopsettings.framerate; } else { d7framelimiter.value = 100; }
setDialogMode(7, "Remote Desktop Settings", 3, showMultiDesktopSettingsChanged);
}
@@ -5155,9 +5169,10 @@
multidesktopsettings.quality = d7bitmapquality.value;
multidesktopsettings.scaling = d7bitmapscaling.value;
multidesktopsettings.framerate = d7framelimiter.value;
+ multidesktopsettings.agentencoding = d7encoding.value;
localStorage.setItem('multidesktopsettings', JSON.stringify(multidesktopsettings));
// Make changes to all current connections
- for (var i in multiDesktop) { multiDesktop[i].m.SendCompressionLevel(webpSupport?4:1, multidesktopsettings.quality, multidesktopsettings.scaling, multidesktopsettings.framerate); }
+ for (var i in multiDesktop) { multiDesktop[i].m.SendCompressionLevel(multidesktopsettings.agentencoding, multidesktopsettings.quality, multidesktopsettings.scaling, multidesktopsettings.framerate); }
}
function connectMultiDesktop(node, contype) {
@@ -5189,7 +5204,7 @@
desk.attemptWebRTC = attemptWebRTC;
desk.onStateChanged = onMultiDesktopStateChange;
//desk.onConsoleMessageChange = function () { console.log('CONSOLEMSG:', desk.consoleMessage); }
- desk.m.ImageType = webpSupport?4:1; // Send 4 if WebP is supported, otherwise send 1 for JPEG.
+ desk.m.ImageType = multidesktopsettings.agentencoding; // Send 4 if WebP is supported, otherwise send 1 for JPEG.
desk.m.CompressionLevel = multidesktopsettings.quality;
desk.m.ScalingLevel = multidesktopsettings.scaling;
if (multidesktopsettings.framerate) { desk.m.FrameRateTimer = multidesktopsettings.framerate; }
@@ -9004,7 +9019,7 @@
c.removeAttribute('onclick');
Q('DeskParent').appendChild(c);
desktop = xdesk;
- if (desktop.m.SendCompressionLevel) { desktop.m.SendCompressionLevel(webpSupport?4:1, desktopsettings.quality, desktopsettings.scaling, desktopsettings.framerate); }
+ if (desktop.m.SendCompressionLevel) { desktop.m.SendCompressionLevel(desktopsettings.agentencoding, desktopsettings.quality, desktopsettings.scaling, desktopsettings.framerate); }
desktop.onStateChanged = onDesktopStateChange;
desktop.onMetadataChange = function(metadata) { updateMetadata(desktop, 'deskmetadata'); }
if ((features2 & 0x2000) != 0) desktop.m.stopInput = true;
@@ -9277,7 +9292,7 @@
}
}
desktop.onMetadataChange = function(metadata) { updateMetadata(desktop, 'deskmetadata'); }
- desktop.m.ImageType = webpSupport?4:1; // Send 4 if WebP is supported, otherwise send 1 for JPEG.
+ desktop.m.ImageType = desktopsettings.agentencoding; // Send 4 if WebP is supported, otherwise send 1 for JPEG.
desktop.m.CompressionLevel = desktopsettings.quality; // Number from 1 to 100. 50 or less is best.
desktop.m.ScalingLevel = desktopsettings.scaling;
if (desktopsettings.framerate) { desktop.m.FrameRateTimer = desktopsettings.framerate; }
@@ -9583,6 +9598,7 @@
desktopsettings.quality = d7bitmapquality.value;
desktopsettings.scaling = d7bitmapscaling.value;
desktopsettings.framerate = d7framelimiter.value;
+ desktopsettings.agentencoding = d7encoding.value;
desktopsettings.swapmouse = d7deskSwapMouse.checked;
desktopsettings.rmw = d7deskrmw.checked;
desktopsettings.remotekeymap = d7deskRemoteKeyMap.checked;
@@ -9601,16 +9617,17 @@
applyDesktopSettings();
updateDesktopButtons();
if (desktop) {
- if (desktop.contype == 1) { // Intel AMT KVM
+ if (desktop.contype == 1) { // Mesh Agent Remote Desktop
desktop.m.SwapMouse = desktopsettings.swapmouse;
desktop.m.ReverseMouseWheel = desktopsettings.rmw;
desktop.m.remoteKeyMap = desktopsettings.remotekeymap;
if (desktop.State != 0) {
- desktop.m.SendCompressionLevel(webpSupport?4:1, desktopsettings.quality, desktopsettings.scaling, desktopsettings.framerate);
+ desktop.m.SendCompressionLevel(desktopsettings.agentencoding, desktopsettings.quality, desktopsettings.scaling, desktopsettings.framerate);
desktop.sendCtrlMsg('{"ctrlChannel":"102938","type":"autolock","value":' + desktopsettings.autolock + '}');
+ desktop.m.SendRefresh();
}
}
- if (desktop.contype == 2) { // Mesh Agent Remote Desktop
+ if (desktop.contype == 2) { // Intel AMT KVM
desktop.m.ReverseMouseWheel = desktopsettings.kvmrmw;
if (desktopsettings.showfocus == false) { desktop.m.focusmode = 0; deskFocusBtn.value = "All Focus"; }
if (desktop.State != 0) { desktop.Stop(); setTimeout(function () { connectDesktop(null, 2); }, 50); }
@@ -9629,6 +9646,7 @@
d7desktopmode.value = desktopsettings.encoding;
d7showfocus.checked = desktopsettings.showfocus;
d7showcursor.checked = desktopsettings.showmouse;
+ if (desktopsettings.agentencoding) { d7encoding.value = desktopsettings.agentencoding; } else { desktopsettings.agentencoding = 4; }
d7bitmapquality.value = 40; // Default value
if (ops.indexOf(parseInt(desktopsettings.quality)) >= 0) { d7bitmapquality.value = desktopsettings.quality; }
d7bitmapscaling.value = desktopsettings.scaling;
diff --git a/webserver.js b/webserver.js
index 7b4310aed8..a65e3b41ba 100644
--- a/webserver.js
+++ b/webserver.js
@@ -8758,7 +8758,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
// Filter the user web site and only output state that we need to keep
const acceptableUserWebStateStrings = ['webPageStackMenu', 'notifications', 'deviceView', 'nightMode', 'webPageFullScreen', 'search', 'showRealNames', 'sort', 'deskAspectRatio', 'viewsize', 'DeskControl', 'uiMode', 'footerBar'];
- const acceptableUserWebStateDesktopStrings = ['encoding', 'showfocus', 'showmouse', 'showcad', 'limitFrameRate', 'noMouseRotate', 'quality', 'scaling']
+ const acceptableUserWebStateDesktopStrings = ['encoding', 'showfocus', 'showmouse', 'showcad', 'limitFrameRate', 'noMouseRotate', 'quality', 'scaling', 'agentencoding']
obj.filterUserWebState = function (state) {
if (typeof state == 'string') { try { state = JSON.parse(state); } catch (ex) { return null; } }
if ((state == null) || (typeof state != 'object')) { return null; }
|