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/31 18:50:45 UTC
[1/2] android commit: Fixing failing 'should return MediaError for
bad filename' Media test case
Updated Branches:
refs/heads/master 1ba3ecbef -> 12e5b39c0
Fixing failing 'should return MediaError for bad filename' Media test case
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/12e5b39c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/12e5b39c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/12e5b39c
Branch: refs/heads/master
Commit: 12e5b39c055c330d1d4156e8b8b9f1b3a8970752
Parents: 4d5e452
Author: Simon MacDonald <si...@gmail.com>
Authored: Fri Aug 31 12:50:23 2012 -0400
Committer: Simon MacDonald <si...@gmail.com>
Committed: Fri Aug 31 12:50:23 2012 -0400
----------------------------------------------------------------------
framework/src/org/apache/cordova/AudioPlayer.java | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/12e5b39c/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 3716012..e8ea1d3 100644
--- a/framework/src/org/apache/cordova/AudioPlayer.java
+++ b/framework/src/org/apache/cordova/AudioPlayer.java
@@ -468,7 +468,7 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On
try {
this.loadAudioFile(file);
} catch (Exception e) {
- e.printStackTrace();
+ this.handler.sendJavascript("cordova.require('cordova/plugin/Media').onStatus('" + this.id + "', "+MEDIA_ERROR+", { \"code\":"+MEDIA_ERR_ABORTED+"});");
}
return false;
case MEDIA_LOADING:
@@ -493,7 +493,6 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On
try {
this.loadAudioFile(file);
} catch (Exception e) {
- e.printStackTrace();
this.handler.sendJavascript("cordova.require('cordova/plugin/Media').onStatus('" + this.id + "', " + MEDIA_ERROR + ", { \"code\":" + MEDIA_ERR_ABORTED + "});");
}
//if we had to prepare= the file, we won't be in the correct state for playback