seekToPlayer
seekToPlayer method
- Duration duration
To seek to a new location.
The player must already be playing or paused. If not, an exception is thrown.
Parameters
- duration: is the position that you want to seek into your player
Return
Return a Future which is completed when the function is done.
Example
await myPlayer.seekToPlayer(Duration(milliseconds: milliSecs));
Implementation
Future<void> seekToPlayer(Duration duration) async {
await _lock.synchronized(() async {
await _seekToPlayer(duration);
});
}