incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [10/19] js commit: Implemented mediaStatus changes
Date Fri, 17 Aug 2012 18:54:50 GMT
Implemented mediaStatus changes


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

Branch: refs/heads/master
Commit: d5db3da92bf79ed250ebd1a55001a6f9c0cc9314
Parents: 570068c
Author: mpberk <matthew.p.berk@intel.com>
Authored: Thu Aug 16 09:50:44 2012 -0700
Committer: mpberk <matthew.p.berk@intel.com>
Committed: Thu Aug 16 09:50:44 2012 -0700

----------------------------------------------------------------------
 lib/win8metro/plugin/win8metro/MediaProxy.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/d5db3da9/lib/win8metro/plugin/win8metro/MediaProxy.js
----------------------------------------------------------------------
diff --git a/lib/win8metro/plugin/win8metro/MediaProxy.js b/lib/win8metro/plugin/win8metro/MediaProxy.js
index 392b8b7..2c0ffa7 100644
--- a/lib/win8metro/plugin/win8metro/MediaProxy.js
+++ b/lib/win8metro/plugin/win8metro/MediaProxy.js
@@ -8,6 +8,7 @@ module.exports = {
         var id = args[0];
         var src = args[1];
         var thisM = Media.get(id);
+        Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_STARTING);
 
         Media.prototype.node = null;
 
@@ -34,6 +35,8 @@ module.exports = {
         var id = args[0];
         //var src = args[1];
         //var options = args[2];
+        Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_RUNNING);
+
         (Media.get(id)).node.play();
     },
 
@@ -65,8 +68,10 @@ module.exports = {
     // Pauses the playing audio
     pausePlayingAudio:function(win, lose, args) {
         var id = args[0];
+        var thisM = Media.get(id);
         try {
-            (Media.get(id)).node.pause();
+            thisM.node.pause();
+            Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_PAUSED;
         } catch (err) {
             lose("Failed to pause: "+err);
         }


Mime
View raw message