Fix error message for stop precondition

This commit is contained in:
Ryan Heise 2019-12-29 23:01:00 +11:00
parent 0e65a839a9
commit 5e0fc0fd76
1 changed files with 2 additions and 2 deletions

View File

@ -284,7 +284,7 @@ public class AudioPlayer implements MethodCallHandler {
transition(PlaybackState.stopped); transition(PlaybackState.stopped);
result.success(null); result.success(null);
break; break;
// TODO: Allow stopping from buffered state. // TODO: Allow stopping from buffered/connecting states.
case playing: case playing:
case paused: case paused:
synchronized (monitor) { synchronized (monitor) {
@ -305,7 +305,7 @@ public class AudioPlayer implements MethodCallHandler {
} }
break; break;
default: default:
throw new IllegalStateException("Can call stop only from playing, paused and buffering states (" + state + ")"); throw new IllegalStateException("Can call stop only from playing/paused/stopped/completed states (" + state + ")");
} }
} }