You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2015/07/10 21:20:08 UTC
[3/9] cordova-plugin-media git commit: Add iOS platform check in
Media.prototype.setRate fix
Add iOS platform check in Media.prototype.setRate fix
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/36e54197
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/36e54197
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/36e54197
Branch: refs/heads/master
Commit: 36e541971f1ee3ae6105d5616b2e85e56a6676ae
Parents: d9240dc
Author: Alex Oshchepkov <al...@gmail.com>
Authored: Fri Jan 16 05:05:03 2015 +0500
Committer: Alex Oshchepkov <al...@gmail.com>
Committed: Fri Jan 16 05:05:03 2015 +0500
----------------------------------------------------------------------
www/Media.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/36e54197/www/Media.js
----------------------------------------------------------------------
diff --git a/www/Media.js b/www/Media.js
index 16a513f..2ba5952 100644
--- a/www/Media.js
+++ b/www/Media.js
@@ -149,18 +149,18 @@ Media.prototype.release = function() {
* Adjust the volume.
*/
Media.prototype.setVolume = function(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.')
- }
+ exec(null, null, "Media", "setVolume", [this.id, volume]);
};
/**
* Adjust the playback rate.
*/
Media.prototype.setRate = function(rate) {
- exec(null, null, "Media", "setRate", [this.id, rate]);
+ if (cordova.platformId === 'ios'){
+ exec(null, null, "Media", "setRate", [this.id, rate]);
+ } else {
+ console.warn('media.setRate method is currently not supported for', cordova.platformId, 'platform.')
+ }
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org