Improve state management

This commit is contained in:
Ryan Heise 2020-01-01 19:39:49 +11:00
parent b10d13d413
commit d2b3fca67f
2 changed files with 16 additions and 10 deletions

View file

@ -293,9 +293,10 @@ public class AudioPlayer implements MethodCallHandler, Player.EventListener {
case stopped:
result.success(null);
break;
// TODO: Allow stopping from buffered/connecting states.
// TODO: Allow stopping from connecting states.
case completed:
case playing:
case buffering:
case paused:
player.setPlayWhenReady(false);
player.seekTo(0L);