Skip to main content Link Menu Expand (external link) Document Search Copy Copied
seekToPlayer method - FlutterSoundPlayer class - player library - Dart API
menu
seekToPlayer

seekToPlayer method

Future<void> seekToPlayer(
  1. Duration duration
)

To seek to a new location.

The player must already be playing or paused. If not, an exception is thrown.

Example:

await myPlayer.seekToPlayer(Duration(milliseconds: milliSecs));

Implementation

Future<void> seekToPlayer(Duration duration) async {
  await _lock.synchronized(() async {
    await _seekToPlayer(duration);
  });
}
flutter_sound 9.24.0