You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2012/08/10 16:54:25 UTC

android commit: CB-1196: No onSuccess callback after a complete play of the local mp3 file

Updated Branches:
  refs/heads/master fdcf9c532 -> 6cb8d11b2


CB-1196: No onSuccess callback after a complete play of the local mp3 file


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/6cb8d11b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/6cb8d11b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/6cb8d11b

Branch: refs/heads/master
Commit: 6cb8d11b22da94c3af7c8d22fc1c18517269c38f
Parents: fdcf9c5
Author: macdonst <si...@gmail.com>
Authored: Fri Aug 10 10:53:52 2012 -0400
Committer: macdonst <si...@gmail.com>
Committed: Fri Aug 10 10:53:52 2012 -0400

----------------------------------------------------------------------
 framework/src/org/apache/cordova/AudioPlayer.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/6cb8d11b/framework/src/org/apache/cordova/AudioPlayer.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/AudioPlayer.java b/framework/src/org/apache/cordova/AudioPlayer.java
index 04d11d4..3c3c962 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;
     }