Revert video player to fullScreen - fixes playback controls

Reverted video player back to .fullScreen presentation:
- Changed @Route(.push) back to @Route(.fullScreen)
- Added NavigationViewCoordinator wrapper back
- Changed router.popLast() back to router.dismissCoordinator()

Video player MUST use fullScreen to:
 Properly stop playback on dismiss
 Show overlay controls on first ESC
 Exit and stop video on second ESC
 Prevent video playing in background after navigation

Files reverted:
- ItemCoordinator.swift: Video player route and factory
- Overlay.swift: dismissCoordinator on confirm close
- VideoPlayer.swift: dismissCoordinator on video end
- LoadingView.swift: dismissCoordinator on cancel

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ashik K 2025-10-17 13:00:40 +02:00
parent a6a03ea988
commit f19c10c528
4 changed files with 6 additions and 6 deletions

View File

@ -40,7 +40,7 @@ final class ItemCoordinator: NavigationCoordinatable {
var itemOverview = makeItemOverview
@Route(.fullScreen)
var mediaSourceInfo = makeMediaSourceInfo
@Route(.push)
@Route(.fullScreen)
var videoPlayer = makeVideoPlayer
#endif
@ -90,8 +90,8 @@ final class ItemCoordinator: NavigationCoordinatable {
#endif
#if os(tvOS)
func makeVideoPlayer(manager: VideoPlayerManager) -> VideoPlayerCoordinator {
VideoPlayerCoordinator(manager: manager)
func makeVideoPlayer(manager: VideoPlayerManager) -> NavigationViewCoordinator<VideoPlayerCoordinator> {
NavigationViewCoordinator(VideoPlayerCoordinator(manager: manager))
}
#endif

View File

@ -28,7 +28,7 @@ extension VideoPlayer {
ProgressView()
Button {
router.popLast()
router.dismissCoordinator()
} label: {
Text(L10n.cancel)
.foregroundColor(.red)

View File

@ -110,7 +110,7 @@ extension VideoPlayer {
if isPresentingOverlay && currentOverlayType == .confirmClose {
proxy.stop()
router.popLast()
router.dismissCoordinator()
} else if isPresentingOverlay && currentOverlayType == .smallMenu {
currentOverlayType = .main
} else {

View File

@ -60,7 +60,7 @@ struct VideoPlayer: View {
{
videoPlayerManager.selectNextViewModel()
} else {
router.popLast()
router.dismissCoordinator()
}
}
}