mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
Fix for Issue #208: Media.release() accidentally makes a call to the Media error callback
This commit is contained in:
parent
4a38f160fb
commit
9083e921d9
@ -86,7 +86,10 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On
|
|||||||
|
|
||||||
// Stop any play or record
|
// Stop any play or record
|
||||||
if (this.mPlayer != null) {
|
if (this.mPlayer != null) {
|
||||||
this.stopPlaying();
|
if ((this.state == MEDIA_RUNNING) || (this.state == MEDIA_PAUSED)) {
|
||||||
|
this.mPlayer.stop();
|
||||||
|
this.setState(MEDIA_STOPPED);
|
||||||
|
}
|
||||||
this.mPlayer.release();
|
this.mPlayer.release();
|
||||||
this.mPlayer = null;
|
this.mPlayer = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user