Route YouTube links tapped in descriptions through in-app playback

Description links to YouTube videos, channels, playlists, and external
video URLs now open in Yattee instead of Safari. When a video is
already playing, tapping a video link surfaces the existing
QueueActionSheet (Play Now / Play Next / Add to Queue) — the sheet is
hosted both at the app root and inside ExpandedPlayerSheet so it
appears above whichever layer is on screen.
This commit is contained in:
Arkadiusz Fal
2026-04-22 19:00:43 +02:00
parent 3afd0bdf78
commit b54c32edad
5 changed files with 103 additions and 1 deletions

View File

@@ -382,6 +382,19 @@ struct ExpandedPlayerSheet: View {
.sheet(isPresented: $showingErrorSheet) {
ErrorDetailsSheet(errorMessage: playerState?.errorMessage ?? "Unknown error")
}
.sheet(item: Binding<Video?>(
get: { appEnvironment?.navigationCoordinator.descriptionLinkQueueSheetVideo },
set: { newValue in
if newValue == nil {
appEnvironment?.navigationCoordinator.descriptionLinkQueueSheetVideo = nil
}
}
)) { video in
if let appEnvironment {
QueueActionSheet(video: video)
.appEnvironment(appEnvironment)
}
}
#if os(iOS)
.toolbar(.hidden, for: .navigationBar)
.playerStatusBarHidden(isInWideScreenLayout || !isPortraitPanelVisible)