Updated Branches:
  refs/heads/master a5376f025 -> a91a8f60b
Updated Tags:  refs/tags/2.1.0 650e5414e -> a91a8f60b


[Common] Fixing failing media test; should allow error objects with 0 error 
code. need to rework this api asap!


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/a91a8f60
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/a91a8f60
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/a91a8f60

Branch: refs/heads/master
Commit: a91a8f60b9f12bb74fa3a7f6c640308903ab73bf
Parents: a5376f0
Author: Fil Maj <maj....@gmail.com>
Authored: Tue Sep 11 16:15:37 2012 -0700
Committer: Fil Maj <maj....@gmail.com>
Committed: Tue Sep 11 16:15:37 2012 -0700

----------------------------------------------------------------------
 lib/common/plugin/MediaError.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/a91a8f60/lib/common/plugin/MediaError.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/MediaError.js b/lib/common/plugin/MediaError.js
index bdc4e92..f746a21 100644
--- a/lib/common/plugin/MediaError.js
+++ b/lib/common/plugin/MediaError.js
@@ -13,8 +13,8 @@ we should simply use a literal :
  */
 
 if(!MediaError) {
-    MediaError = function(code, msg) {
-        this.code = code || null;
+    var MediaError = function(code, msg) {
+        this.code = (typeof code != 'undefined') ? code : null;
         this.message = msg || ""; // message is NON-standard! do not use!
     };
 }
@@ -23,7 +23,7 @@ MediaError.MEDIA_ERR_NONE_ACTIVE    = 
MediaError.MEDIA_ERR_NONE_ACTIVE    || 0;
 MediaError.MEDIA_ERR_ABORTED        = MediaError.MEDIA_ERR_ABORTED        || 1;
 MediaError.MEDIA_ERR_NETWORK        = MediaError.MEDIA_ERR_NETWORK        || 2;
 MediaError.MEDIA_ERR_DECODE         = MediaError.MEDIA_ERR_DECODE         || 3;
-MediaError.MEDIA_ERR_NONE_SUPPORTED = MediaError.MEDIA_ERR_NONE_SUPPORTED || 
4; 
+MediaError.MEDIA_ERR_NONE_SUPPORTED = MediaError.MEDIA_ERR_NONE_SUPPORTED || 4;
 // TODO: MediaError.MEDIA_ERR_NONE_SUPPORTED is legacy, the W3 spec now 
defines it as below. 
 // as defined by 
http://dev.w3.org/html5/spec-author-view/video.html#error-codes
 MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 
MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED || 4;

Reply via email to