Playback modes

This commit is contained in:
Arkadiusz Fal
2022-07-11 00:24:56 +02:00
parent f0b8e7f655
commit ebe3ba9ed5
13 changed files with 150 additions and 105 deletions

View File

@@ -86,8 +86,6 @@ struct ChannelPlaylistView: View {
playButton
.labelStyle(.iconOnly)
shuffleButton
.labelStyle(.iconOnly)
}
#endif
VerticalCells(items: items)
@@ -119,7 +117,6 @@ struct ChannelPlaylistView: View {
}
playButton
shuffleButton
}
}
}
@@ -137,20 +134,13 @@ struct ChannelPlaylistView: View {
private var playButton: some View {
Button {
player.playbackMode = .queue
player.play(videos)
} label: {
Label("Play All", systemImage: "play")
}
}
private var shuffleButton: some View {
Button {
player.play(videos, shuffling: true)
} label: {
Label("Shuffle", systemImage: "shuffle")
}
}
private var videos: [Video] {
items.compactMap(\.video)
}