Fix memory leaks, stale game data, and audio volume fluctuation
Memory: clean observers even during PiP, nil player on tile disappear, track/cancel Werkout monitor tasks, add highlight player cleanup. Data: add scenePhase-triggered reload on day change, unconditional 10-minute full schedule refresh, keep fast 60s score refresh for live games. Audio: set mute state before playback starts, use consistent .moviePlayback mode, add audio session interruption recovery handler. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -583,11 +583,11 @@ struct SingleStreamPlayerView: UIViewControllerRepresentable {
|
||||
|
||||
static func dismantleUIViewController(_ uiViewController: AVPlayerViewController, coordinator: Coordinator) {
|
||||
logSingleStream("dismantleUIViewController start isPiPActive=\(coordinator.isPiPActive)")
|
||||
coordinator.clearDebugObservers()
|
||||
if coordinator.isPiPActive {
|
||||
logSingleStream("dismantleUIViewController skipped — PiP is active")
|
||||
logSingleStream("dismantleUIViewController — PiP active, observers cleared but keeping player")
|
||||
return
|
||||
}
|
||||
coordinator.clearDebugObservers()
|
||||
uiViewController.player?.pause()
|
||||
uiViewController.player = nil
|
||||
logSingleStream("dismantleUIViewController complete")
|
||||
|
||||
Reference in New Issue
Block a user