Update state before method channel calls complete.

This commit is contained in:
Ryan Heise 2020-04-18 14:28:06 +10:00
parent b10583e8d6
commit 5e9a707e08
3 changed files with 88 additions and 23 deletions

View file

@ -115,9 +115,9 @@ public class AudioPlayer implements MethodCallHandler, Player.EventListener {
if (prepareResult != null) {
duration = player.getDuration();
justConnected = true;
transition(PlaybackState.stopped);
prepareResult.success(duration);
prepareResult = null;
transition(PlaybackState.stopped);
}
if (seekProcessed) {
completeSeek();