From 6cb8d11b22da94c3af7c8d22fc1c18517269c38f Mon Sep 17 00:00:00 2001 From: macdonst Date: Fri, 10 Aug 2012 10:53:52 -0400 Subject: [PATCH] CB-1196: No onSuccess callback after a complete play of the local mp3 file --- framework/src/org/apache/cordova/AudioPlayer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/src/org/apache/cordova/AudioPlayer.java b/framework/src/org/apache/cordova/AudioPlayer.java index 04d11d45..3c3c9626 100644 --- a/framework/src/org/apache/cordova/AudioPlayer.java +++ b/framework/src/org/apache/cordova/AudioPlayer.java @@ -49,11 +49,11 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On // AudioPlayer states public enum STATE { MEDIA_NONE, - MEDIA_LOADING, MEDIA_STARTING, MEDIA_RUNNING, MEDIA_PAUSED, - MEDIA_STOPPED + MEDIA_STOPPED, + MEDIA_LOADING }; private static final String LOG_TAG = "AudioPlayer"; @@ -397,7 +397,7 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On */ private void setState(STATE state) { if (this.state != state) { - this.handler.sendJavascript("cordova.require('cordova/plugin/Media').onStatus('" + this.id + "', " + MEDIA_STATE + ", " + this.state.ordinal() + ");"); + this.handler.sendJavascript("cordova.require('cordova/plugin/Media').onStatus('" + this.id + "', " + MEDIA_STATE + ", " + state.ordinal() + ");"); } this.state = state; }