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);
|
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 + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue