cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/2] git commit: CB-7531 Fixes play() failure after release() call
Date Wed, 17 Sep 2014 21:48:51 GMT
Repository: cordova-plugin-media
Updated Branches:
  refs/heads/master 3b7c923dc -> 192daad65


CB-7531 Fixes play() failure after release() call


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/commit/4ba6b139
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/4ba6b139
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/4ba6b139

Branch: refs/heads/master
Commit: 4ba6b139eb846b91ebd022409cc6b87acb913463
Parents: 22068ff
Author: Vladimir Kotikov <v-vlkoti@microsoft.com>
Authored: Fri Sep 12 15:10:59 2014 +0400
Committer: Vladimir Kotikov <v-vlkoti@microsoft.com>
Committed: Fri Sep 12 15:12:04 2014 +0400

----------------------------------------------------------------------
 src/windows8/MediaProxy.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/4ba6b139/src/windows8/MediaProxy.js
----------------------------------------------------------------------
diff --git a/src/windows8/MediaProxy.js b/src/windows8/MediaProxy.js
index e7b6595..3b003cf 100644
--- a/src/windows8/MediaProxy.js
+++ b/src/windows8/MediaProxy.js
@@ -62,9 +62,16 @@ module.exports = {
         var id = args[0];
         //var src = args[1];
         //var options = args[2];
+
+        var thisM = Media.get(id);
+        // if Media was released, then node will be null and we need to create it again
+        if (!thisM.node) {
+            module.exports.create(win, lose, args);
+        }
+
         Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_RUNNING);
 
-        (Media.get(id)).node.play();
+        thisM.node.play();
     },
 
     // Stops the playing audio


Mime
View raw message