mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-11-06 06:02:37 +08:00
[fix] restore iOS video after returning to the foreground
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user