Minor controls fixes

This commit is contained in:
Arkadiusz Fal 2022-06-08 00:05:16 +02:00
parent 0ecc271e70
commit 7cd6928e8c

View File

@ -192,24 +192,25 @@ struct PlayerControls: View {
}
var buttonsBar: some View {
HStack(spacing: 20) {
HStack {
#if !os(tvOS)
#if os(iOS)
hidePlayerButton
#endif
fullscreenButton
#if os(iOS)
pipButton
#endif
rateButton
closeVideoButton
button("Music Mode", systemImage: "music.note", active: player.musicMode, action: player.toggleMusicMode)
.disabled(player.activeBackend == .appleAVPlayer)
Spacer()
rateButton
musicModeButton
closeVideoButton
#endif
}
}
@ -272,6 +273,11 @@ struct PlayerControls: View {
}
}
private var musicModeButton: some View {
button("Music Mode", systemImage: "music.note", active: player.musicMode, action: player.toggleMusicMode)
.disabled(player.activeBackend == .appleAVPlayer)
}
var ratePicker: some View {
Picker("Rate", selection: rateBinding) {
ForEach(PlayerModel.availableRates, id: \.self) { rate in