toggle UIA support
This commit is contained in:
@@ -73,12 +73,14 @@ import { checkFeatureAccess } from "./feature-gate.js";
|
||||
const statusEl = document.getElementById("streamStatus");
|
||||
const clipboardSyncCtrl = document.getElementById("clipboardSyncCtrl");
|
||||
const dxgiCtrl = document.getElementById("dxgiCtrl");
|
||||
const uiaCtrl = document.getElementById("uiaCtrl");
|
||||
const hvncResolutionSelect = document.getElementById("hvncResolutionSelect");
|
||||
|
||||
function syncInputEnableState() {
|
||||
if (mouseCtrl) sendCmd("hvnc_enable_mouse", { enabled: mouseCtrl.checked });
|
||||
if (kbdCtrl) sendCmd("hvnc_enable_keyboard", { enabled: kbdCtrl.checked });
|
||||
if (dxgiCtrl) sendCmd("hvnc_enable_dxgi", { enabled: dxgiCtrl.checked });
|
||||
if (uiaCtrl) sendCmd("hvnc_enable_uia", { enabled: uiaCtrl.checked });
|
||||
pushHvncResolution();
|
||||
}
|
||||
let activeClientId = clientId;
|
||||
@@ -619,6 +621,11 @@ import { checkFeatureAccess } from "./feature-gate.js";
|
||||
sendCmd("hvnc_enable_dxgi", { enabled: dxgiCtrl.checked });
|
||||
});
|
||||
}
|
||||
if (uiaCtrl) {
|
||||
uiaCtrl.addEventListener("change", function () {
|
||||
sendCmd("hvnc_enable_uia", { enabled: uiaCtrl.checked });
|
||||
});
|
||||
}
|
||||
|
||||
function pushHvncResolution() {
|
||||
if (hvncResolutionSelect) {
|
||||
|
||||
@@ -137,6 +137,9 @@
|
||||
><input type="checkbox" id="dxgiCtrl" /> DXGI Capture
|
||||
<i class="fa-solid fa-triangle-exclamation text-amber-400 text-xs" title="If Chrome or HVNC is running slowly, DXGI capture may be the cause — uncheck this and restart Chrome inside HVNC to fix it."></i></label
|
||||
>
|
||||
<label class="flex items-center gap-2 text-sm text-slate-200" title="Use UI Automation for WinUI3 app input (modern Windows apps). Disable if input is unreliable in non-WinUI3 apps."
|
||||
><input type="checkbox" id="uiaCtrl" checked /> UIA Support</label
|
||||
>
|
||||
<label for="hvncResolutionSelect" class="text-sm text-slate-200">Resolution</label>
|
||||
<select
|
||||
id="hvncResolutionSelect"
|
||||
|
||||
@@ -840,6 +840,9 @@ export function handleHVNCViewerMessage(ws: ServerWebSocket<SocketData>, raw: st
|
||||
case "hvnc_enable_dxgi":
|
||||
if (state.isStreaming) sendHVNCCommand(target, "hvnc_enable_dxgi", { enabled: !!payload.enabled });
|
||||
break;
|
||||
case "hvnc_enable_uia":
|
||||
if (state.isStreaming) sendHVNCCommand(target, "hvnc_enable_uia", { enabled: !!payload.enabled });
|
||||
break;
|
||||
case "hvnc_set_resolution": {
|
||||
const maxHeight = Number(payload.maxHeight) || 0;
|
||||
if (state.isStreaming) sendHVNCCommand(target, "hvnc_set_resolution", { maxHeight });
|
||||
|
||||
Reference in New Issue
Block a user