Skip to content

Commit 6995096

Browse files
Bug fix - 200 - enable seek gesture in paused mode (#272)
1 parent fb0612c commit 6995096

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/src/controllers/player_controller.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,9 @@ class PlayerController extends ChangeNotifier {
263263
/// Minimum Android [O] is required to use this function
264264
/// otherwise nothing happens.
265265
Future<void> seekTo(int progress) async {
266-
if (progress < 0) return;
267-
if (_playerState == PlayerState.playing) {
268-
await AudioWaveformsInterface.instance.seekTo(playerKey, progress);
269-
}
266+
if (progress < 0 || _playerState.isStopped) return;
267+
268+
await AudioWaveformsInterface.instance.seekTo(playerKey, progress);
270269
}
271270

272271
/// Release any resources taken by this controller. Disposing this

0 commit comments

Comments
 (0)