Changed context menus from press-and-hold to single-press for better UX:
- Quality profile selection
- Stream quality selection
- Captions selection
- Audio track selection
Updated ControlsOverlayButton to support tap actions via new onSelect parameter.
Replaced .contextMenu modifiers with .alert for instant menu access on tvOS.
Removed hint text and unnecessary 80px padding as single-press is self-evident.
The captions context menu on tvOS was always empty because it relied on
an .onAppear callback that was never triggered. The captionsPicker view
with .onAppear was only rendered on iOS/macOS, not tvOS.
Changes:
- Access captions directly from player.currentVideo?.captions instead of
using a state variable populated via .onAppear
- Fix label logic to show "Disabled" when captions are available but not
selected, and "Not available" only when video has no captions
- Remove unused state variables and helper functions
This commit addresses crashes caused by race conditions when accessing audio track arrays:
- MPVBackend.swift: Use safe index clamping to prevent array out of bounds crashes when selecting audio tracks
- PlayerModel.swift: Add selectedAudioTrack computed property for thread-safe audio track access
- ControlsOverlay.swift: Use safe accessor with "Original" fallback label
- PlaybackSettings.swift: Use safe accessor with "Original" fallback label
This fix resolves approximately 37% of crashes (23 out of 62 crash logs) that were caused by index out of range errors in MPVBackend.playStream at line 345.
- fix subtitle disabling not working
- make subtitle adding/removing async
- make subtitle menu non blocking
Signed-off-by: Toni Förster <toni.foerster@gmail.com>