Minor controls fixes

This commit is contained in:
Arkadiusz Fal 2022-06-08 00:05:16 +02:00
parent f631d4f6e3
commit a41d00d24c

View File

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