Add volume slider in player controls sheet#1492
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a system volume slider to the player controls sheet, alongside the existing “Boost Volume” toggle, and updates strings across supported locales.
Changes:
- Introduces
SystemVolumeSlider(SwiftUI wrapper aroundMPVolumeView) and displays it in the controls sheet. - Renames/reworks the boost volume section into a combined “Volume” section.
- Adds the new
player_volume_titlelocalization key across all localizedLocalizable.stringsfiles.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| BookPlayer/zh-Hans.lproj/Localizable.strings | Adds player_volume_title translation (Simplified Chinese). |
| BookPlayer/uk.lproj/Localizable.strings | Adds player_volume_title translation (Ukrainian). |
| BookPlayer/tr.lproj/Localizable.strings | Adds player_volume_title translation (Turkish). |
| BookPlayer/sv.lproj/Localizable.strings | Adds player_volume_title translation (Swedish). |
| BookPlayer/sk-SK.lproj/Localizable.strings | Adds player_volume_title translation (Slovak). |
| BookPlayer/ru.lproj/Localizable.strings | Adds player_volume_title translation (Russian). |
| BookPlayer/ro.lproj/Localizable.strings | Adds player_volume_title translation (Romanian). |
| BookPlayer/pt-PT.lproj/Localizable.strings | Adds player_volume_title translation (Portuguese - Portugal). |
| BookPlayer/pt-BR.lproj/Localizable.strings | Adds player_volume_title translation (Portuguese - Brazil). |
| BookPlayer/pl.lproj/Localizable.strings | Adds player_volume_title translation (Polish). |
| BookPlayer/nl.lproj/Localizable.strings | Adds player_volume_title translation (Dutch). |
| BookPlayer/nb.lproj/Localizable.strings | Adds player_volume_title translation (Norwegian Bokmål). |
| BookPlayer/ja.lproj/Localizable.strings | Adds player_volume_title translation (Japanese). |
| BookPlayer/it.lproj/Localizable.strings | Adds player_volume_title translation (Italian). |
| BookPlayer/hu.lproj/Localizable.strings | Adds player_volume_title translation (Hungarian). |
| BookPlayer/fr.lproj/Localizable.strings | Adds player_volume_title translation (French). |
| BookPlayer/fi.lproj/Localizable.strings | Adds player_volume_title translation (Finnish). |
| BookPlayer/es.lproj/Localizable.strings | Adds player_volume_title translation (Spanish). |
| BookPlayer/en.lproj/Localizable.strings | Adds player_volume_title (English). |
| BookPlayer/el.lproj/Localizable.strings | Adds player_volume_title translation (Greek). |
| BookPlayer/de.lproj/Localizable.strings | Adds player_volume_title translation (German). |
| BookPlayer/da.lproj/Localizable.strings | Adds player_volume_title translation (Danish). |
| BookPlayer/cs.lproj/Localizable.strings | Adds player_volume_title translation (Czech). |
| BookPlayer/ca.lproj/Localizable.strings | Adds player_volume_title translation (Catalan). |
| BookPlayer/ar.lproj/Localizable.strings | Adds player_volume_title translation (Arabic). |
| BookPlayer/Base.lproj/Localizable.strings | Adds base player_volume_title key. |
| BookPlayer/Player/Views/Controls/SystemVolumeSlider.swift | New UIViewRepresentable wrapping MPVolumeView for system volume control. |
| BookPlayer/Player/Views/Controls/PlayerControlsVolumeSectionView.swift | Renames/extends section to include a “Volume” header + system volume slider + existing boost toggle. |
| BookPlayer/Player/Views/Controls/PlayerControlsView.swift | Wraps content in ScrollView, inserts the new volume section, and updates toolbar buttons. |
| BookPlayer.xcodeproj/project.pbxproj | Registers new Swift file in build sources and updates the renamed view file reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .padding(.horizontal, Spacing.M) | ||
| .padding(.vertical, Spacing.S) | ||
| .background(theme.systemBackgroundColor) | ||
| .toolbarColorScheme(theme.useDarkVariant ? .dark : .light, for: .navigationBar) |
There was a problem hiding this comment.
PlayerControlsView no longer applies .tint(theme.linkColor) at the container level, and PlayerControlsSpeedSectionView's Slider doesn’t set a tint explicitly. This will cause the speed slider (and any other tint-driven controls in this sheet) to fall back to the system accent color instead of the app theme. Consider reintroducing a container-level .tint(theme.linkColor) (or tinting the specific controls like the Slider) to keep theming consistent with other themed screens (e.g. AudiobookShelfRootView uses .tint(theme.linkColor)).
| .toolbarColorScheme(theme.useDarkVariant ? .dark : .light, for: .navigationBar) | |
| .toolbarColorScheme(theme.useDarkVariant ? .dark : .light, for: .navigationBar) | |
| .tint(theme.linkColor) |
| ToolbarItem(placement: .cancellationAction) { | ||
| Button { | ||
| dismiss() | ||
| } label: { | ||
| Image(systemName: "xmark") | ||
| .foregroundStyle(theme.linkColor) | ||
| } |
There was a problem hiding this comment.
The close button was changed from a localized text button ("done_title") to an icon-only xmark. As-is, the button has no explicit accessibility label, which can be a VoiceOver regression compared to the previous text label. Add an .accessibilityLabel(...) (e.g. using an existing localized "close"/"done" key) so the action is announced clearly.
Purpose