mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-27 03:07:26 +01:00
player: Add seekTo method
This commit is contained in:
parent
eb7b45c39e
commit
066e46a3e7
2 changed files with 9 additions and 0 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue