[fix] restore iOS video after returning to the foreground

This commit is contained in:
dijunkun
2026-09-07 21:31:08 +08:00
parent d498d3f0ef
commit abc8f907f3
6 changed files with 73 additions and 10 deletions
@@ -23,12 +23,15 @@ struct ContentView: View {
}
if scenePhase == .active {
session.refreshRecentConnectionPresenceAfterForeground()
session.resumeVideoAfterForeground()
}
}
.onChange(of: scenePhase) { phase in
if phase == .active {
session.refreshRecentConnectionPresenceAfterForeground()
session.resumeVideoAfterForeground()
} else if phase == .background {
session.suspendVideoForBackground()
session.suspendPresenceMonitoring()
}
}