Fix error message for stop precondition
This commit is contained in:
parent
0e65a839a9
commit
5e0fc0fd76
|
@ -284,7 +284,7 @@ public class AudioPlayer implements MethodCallHandler {
|
|||
transition(PlaybackState.stopped);
|
||||
result.success(null);
|
||||
break;
|
||||
// TODO: Allow stopping from buffered state.
|
||||
// TODO: Allow stopping from buffered/connecting states.
|
||||
case playing:
|
||||
case paused:
|
||||
synchronized (monitor) {
|
||||
|
@ -305,7 +305,7 @@ public class AudioPlayer implements MethodCallHandler {
|
|||
}
|
||||
break;
|
||||
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 + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue