mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 18:35:05 +00:00
Add channel avatar to tvOS player controls
Matches the iOS controls by showing the channel avatar next to the video title and channel name, reusing ChannelAvatarView and the Yattee Server fallback.
This commit is contained in:
@@ -117,7 +117,17 @@ struct TVPlayerControlsView: View {
|
||||
// MARK: - Top Bar
|
||||
|
||||
private var topBar: some View {
|
||||
HStack(alignment: .top) {
|
||||
HStack(alignment: .center, spacing: 20) {
|
||||
// Channel avatar
|
||||
if let video = playerState?.currentVideo {
|
||||
ChannelAvatarView(
|
||||
author: video.author,
|
||||
size: 110,
|
||||
yatteeServerURL: yatteeServerURL,
|
||||
source: video.id.source
|
||||
)
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
// Video title
|
||||
Text(playerState?.currentVideo?.title ?? "")
|
||||
@@ -145,6 +155,10 @@ struct TVPlayerControlsView: View {
|
||||
}
|
||||
}
|
||||
|
||||
private var yatteeServerURL: URL? {
|
||||
appEnvironment?.instancesManager.yatteeServerInstances.first { $0.isEnabled }?.url
|
||||
}
|
||||
|
||||
// MARK: - Action Buttons
|
||||
|
||||
private var actionButtons: some View {
|
||||
|
||||
Reference in New Issue
Block a user