Skip to content

Commit

Permalink
Improved tvOS playlist experience (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
defagos authored May 1, 2024
1 parent f6112d1 commit b9d3b33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Demo/Sources/Showcase/Playlist/PlaylistView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,14 @@ struct PlaylistView: View {
PlaybackView(player: model.player, layout: $layout)
.monoscopic(model.isMonoscopic)
.supportsPictureInPicture()
#if os(iOS)
if layout != .maximized {
Toolbar(player: model.player, model: model)
List($model.medias, id: \.self, editActions: .all, selection: $model.currentMedia) { $media in
MediaCell(media: media)
}
}
#endif
}
.animation(.defaultLinear, value: layout)
.onAppear {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Player/Extensions/AVPlayerItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extension AVPlayerItem {
playerItems(from: items.prefix(length).map(\.content), reload: reload)
}

static func playerItems(from contents: [AssetContent], reload: Bool = false) -> [AVPlayerItem] {
private static func playerItems(from contents: [AssetContent], reload: Bool = false) -> [AVPlayerItem] {
contents.map { $0.playerItem(reload: reload) }
}

Expand Down

0 comments on commit b9d3b33

Please sign in to comment.