cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [2/9] cordova-plugin-media git commit: Add iOS platform check in Media.prototype.setRate
Date Fri, 10 Jul 2015 19:20:07 GMT
Add iOS platform check in Media.prototype.setRate


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

Branch: refs/heads/master
Commit: d9240dce05703982f9a49c0bbcbfbf7af46c6778
Parents: c41a40d
Author: Alex Oshchepkov <alex.oschepkov@gmail.com>
Authored: Wed Jan 7 01:32:31 2015 +0500
Committer: Alex Oshchepkov <alex.oschepkov@gmail.com>
Committed: Wed Jan 7 01:32:31 2015 +0500

----------------------------------------------------------------------
 www/Media.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/d9240dce/www/Media.js
----------------------------------------------------------------------
diff --git a/www/Media.js b/www/Media.js
index 3fb4db7..16a513f 100644
--- a/www/Media.js
+++ b/www/Media.js
@@ -149,7 +149,11 @@ Media.prototype.release = function() {
  * Adjust the volume.
  */
 Media.prototype.setVolume = function(volume) {
-    exec(null, null, "Media", "setVolume", [this.id, volume]);
+    if (device.platform == 'iOS'){
+        exec(null, null, "Media", "setVolume", [this.id, volume]);
+    } else {
+        console.warn('media.setRate method is currently not supported for', device.platform,
'platform.')
+    }
 };
 
 /**


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message