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

View File

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

View File

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

View File

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