A cross platform Audiobookshelf client for Android and iOS
Dart
Stop swapping skip controls per OEM
Barnabas9f789eccb57c
diff --git a/lib/services/audio_player_service.dart b/lib/services/audio_player_service.dartindex e3c9e513..6ea53d51 100644--- a/lib/services/audio_player_service.dart+++ b/lib/services/audio_player_service.dart@@ -148,12 +148,7 @@ class AudioPlayerHandler extends BaseAudioHandler with SeekHandler {);// 3 controls: rewind | play | forward.- // ColorOS (OnePlus/Oppo/Realme) reverses control order, so pre-reverse.- final m = ApiService.deviceManufacturer.toLowerCase();- final isColorOS = m == 'oneplus' || m == 'oppo' || m == 'realme';- final controls = isColorOS- ? [fastForwardControl, playPause, rewindControl]- : [rewindControl, playPause, fastForwardControl];+ final controls = [rewindControl, playPause, fastForwardControl];final compactIndices = const [0, 1, 2];return PlaybackState(@@ -491,34 +486,6 @@ class AudioPlayerHandler extends BaseAudioHandler with SeekHandler {}}- @override- Future<void> skipToNext() async {- // ColorOS (OnePlus/Oppo/Realme) reverses transport controls in Android Auto,- // so swap the action to compensate (same idea as the notification control swap).- final m = ApiService.deviceManufacturer.toLowerCase();- final isColorOS = m == 'oneplus' || m == 'oppo' || m == 'realme';- if (isColorOS) {- debugPrint('[Handler] skipToNext() - ColorOS swap → seeking back');- await rewind();- } else {- debugPrint('[Handler] skipToNext() - seeking forward');- await fastForward();- }- }-- @override- Future<void> skipToPrevious() async {- final m = ApiService.deviceManufacturer.toLowerCase();- final isColorOS = m == 'oneplus' || m == 'oppo' || m == 'realme';- if (isColorOS) {- debugPrint('[Handler] skipToPrevious() - ColorOS swap → seeking forward');- await fastForward();- } else {- debugPrint('[Handler] skipToPrevious() - seeking back');- await rewind();- }- }-@overrideFuture<void> setSpeed(double speed) => _player.setSpeed(speed);