mirror of
https://github.com/yattee/yattee.git
synced 2026-05-13 10:55:03 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user