incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macdo...@apache.org
Subject android commit: CB-1196: No onSuccess callback after a complete play of the local mp3 file
Date Fri, 10 Aug 2012 14:54:25 GMT
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 <simon.macdonald@gmail.com>
Authored: Fri Aug 10 10:53:52 2012 -0400
Committer: macdonst <simon.macdonald@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;
     }


Mime
View raw message