Show video title and channel in tvOS sidebar Now Playing

This commit is contained in:
Arkadiusz Fal
2026-04-15 20:27:30 +02:00
parent d4f8cade90
commit 6a45ed7d0f
2 changed files with 57 additions and 46 deletions

View File

@@ -640,7 +640,8 @@ struct UnifiedTabView: View {
@TabContentBuilder<SidebarItem>
private var mainTabs: some TabContent<SidebarItem> {
// Now Playing (only shown when video is playing and player collapsed)
if shouldShowNowPlaying {
if shouldShowNowPlaying,
let currentVideo = appEnvironment?.playerService.state.currentVideo {
Tab(value: SidebarItem.nowPlaying) {
Color.clear
.onAppear {
@@ -649,7 +650,7 @@ struct UnifiedTabView: View {
selection = .home
}
} label: {
Label(SidebarItem.nowPlaying.title, systemImage: SidebarItem.nowPlaying.systemImage)
Label("\(currentVideo.title)\n\(currentVideo.author.name)", systemImage: SidebarItem.nowPlaying.systemImage)
}
}