mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-27 03:07:26 +01:00
player: Add stop method.
This commit is contained in:
parent
92828849f9
commit
be1a41a90e
2 changed files with 10 additions and 0 deletions
|
|
@ -47,6 +47,11 @@ public class MusicusPlayerPlugin: FlutterPlugin, MethodCallHandler {
|
|||
} else if (call.method == "pause") {
|
||||
mediaPlayer?.pause()
|
||||
result.success(null)
|
||||
} else if (call.method == "stop") {
|
||||
uri = null
|
||||
mediaPlayer?.release()
|
||||
mediaPlayer = null
|
||||
result.success(null)
|
||||
} else {
|
||||
result.notImplemented()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue