Stay in loading state until load() completes on Android.
This commit is contained in:
parent
169715c720
commit
1ac687cedc
|
@ -217,7 +217,7 @@ public class AudioPlayer implements MethodCallHandler, Player.EventListener, Aud
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Player.STATE_BUFFERING:
|
case Player.STATE_BUFFERING:
|
||||||
if (processingState != ProcessingState.buffering) {
|
if (processingState != ProcessingState.buffering && processingState != ProcessingState.loading) {
|
||||||
transition(ProcessingState.buffering);
|
transition(ProcessingState.buffering);
|
||||||
startWatchingBuffer();
|
startWatchingBuffer();
|
||||||
}
|
}
|
||||||
|
@ -673,6 +673,9 @@ public class AudioPlayer implements MethodCallHandler, Player.EventListener, Aud
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
|
if (processingState == ProcessingState.loading) {
|
||||||
|
abortExistingConnection();
|
||||||
|
}
|
||||||
mediaSources.clear();
|
mediaSources.clear();
|
||||||
mediaSource = null;
|
mediaSource = null;
|
||||||
loopingChildren.clear();
|
loopingChildren.clear();
|
||||||
|
|
Loading…
Reference in New Issue