Add missing result.success calls on Android.

This commit is contained in:
Ryan Heise 2020-10-16 12:22:20 +11:00
parent cc2b10834b
commit 3b874d92f3
1 changed files with 5 additions and 1 deletions

View File

@ -618,7 +618,10 @@ public class AudioPlayer implements MethodCallHandler, Player.EventListener, Aud
}
public void play(Result result) {
if (player.getPlayWhenReady()) return;
if (player.getPlayWhenReady()) {
result.success(new HashMap<String, Object>());
return;
}
if (playResult != null) {
playResult.success(new HashMap<String, Object>());
}
@ -662,6 +665,7 @@ public class AudioPlayer implements MethodCallHandler, Player.EventListener, Aud
public void seek(final long position, final Result result, final Integer index) {
if (processingState == ProcessingState.none || processingState == ProcessingState.loading) {
result.success(new HashMap<String, Object>());
return;
}
abortSeek();