mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 18:35:05 +00:00
Keep playback alive when dismissing tvOS player with Menu button
Calling stop() on Menu-button dismiss cleared currentVideo and tore down the backend, so audio did not continue and the "Now Playing" sidebar tab never appeared. Match the iOS/macOS dismissal path instead and just collapse the fullScreenCover.
This commit is contained in:
@@ -467,10 +467,10 @@ struct TVPlayerView: View {
|
||||
}
|
||||
|
||||
private func dismissPlayer() {
|
||||
// Save progress and stop player before dismissing (matches iOS/macOS pattern)
|
||||
// This ensures watch history is updated when user exits player with Menu button
|
||||
playerService?.stop()
|
||||
|
||||
// Collapse the player but keep it alive so audio continues in the background
|
||||
// and the "Now Playing" sidebar entry can restore the session. Matches the
|
||||
// iOS/macOS ExpandedPlayerWindow dismissal path, which also does not stop()
|
||||
// on dismiss.
|
||||
appEnvironment?.navigationCoordinator.isPlayerExpanded = false
|
||||
dismiss()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user