Skip to content

Commit

Permalink
Map next and previous button controls to fast forward and rewind.
Browse files Browse the repository at this point in the history
  • Loading branch information
amugofjava committed Jun 27, 2024
1 parent 0497c58 commit 06174de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/services/audio/default_audio_player_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,12 @@ class _DefaultAudioPlayerHandler extends BaseAudioHandler with SeekHandler {
await _player.seek(Duration(milliseconds: forwardPosition + fastForwardMillis));
}

@override
Future<void> skipToNext() => fastForward();

@override
Future<void> skipToPrevious() => rewind();

@override
Future<void> seek(Duration position) async {
return _player.seek(position);
Expand Down

0 comments on commit 06174de

Please sign in to comment.