player: Add seekTo method

This commit is contained in:
Elias Projahn 2020-04-21 19:47:11 +02:00
parent eb7b45c39e
commit 066e46a3e7
2 changed files with 9 additions and 0 deletions

View file

@ -44,6 +44,11 @@ class MusicusPlayer {
return await _channel.invokeMethod('getPosition');
}
/// Seek to a new position, which should be provided in milliseconds.
Future<void> seekTo(int positionMs) async {
await _channel.invokeMethod('seekTo', {'positionMs': positionMs});
}
/// Pause playback.
Future<void> pause() async {
await _channel.invokeMethod('pause');