incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject js commit: Media.onStatus called with {code:Number}
Date Tue, 11 Sep 2012 21:18:44 GMT
Updated Branches:
  refs/heads/master 145c3816e -> a5376f025


Media.onStatus called with {code:Number}


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

Branch: refs/heads/master
Commit: a5376f0258a9b73757908d1fd215656d718e6311
Parents: 145c381
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Tue Sep 11 14:17:20 2012 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Tue Sep 11 14:17:20 2012 -0700

----------------------------------------------------------------------
 lib/wp7/plugin/wp7/CordovaMediaonStatus.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/a5376f02/lib/wp7/plugin/wp7/CordovaMediaonStatus.js
----------------------------------------------------------------------
diff --git a/lib/wp7/plugin/wp7/CordovaMediaonStatus.js b/lib/wp7/plugin/wp7/CordovaMediaonStatus.js
index ac6388e..6107cce 100644
--- a/lib/wp7/plugin/wp7/CordovaMediaonStatus.js
+++ b/lib/wp7/plugin/wp7/CordovaMediaonStatus.js
@@ -4,7 +4,11 @@ var Media = require('cordova/plugin/Media');
 
 module.exports = function(args) {
     try {
+
         var res = JSON.parse(args);
+        if(res.msg == Media.MEDIA_ERROR) {
+            res.value = {'code':res.value};
+        }
         Media.onStatus(res.id, res.msg, res.value);
     }
     catch(e) {


Mime
View raw message