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:13 UTC
[8/9] cordova-plugin-media git commit: rate is enabled,
otherwise media has to be stopped and started to change rate. Fixed
error getting command args
rate is enabled, otherwise media has to be stopped and started to change rate. Fixed error getting command args
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/66d0f27f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/66d0f27f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/66d0f27f
Branch: refs/heads/master
Commit: 66d0f27f741baa1be7a192354994cddc0d28d17a
Parents: 072656d
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Jul 10 12:18:44 2015 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Fri Jul 10 12:18:44 2015 -0700
----------------------------------------------------------------------
src/ios/CDVSound.m | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/66d0f27f/src/ios/CDVSound.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVSound.m b/src/ios/CDVSound.m
index af63a48..a23111f 100644
--- a/src/ios/CDVSound.m
+++ b/src/ios/CDVSound.m
@@ -256,8 +256,8 @@
NSString* callbackId = command.callbackId;
#pragma unused(callbackId)
- NSString* mediaId = [command.arguments objectAtIndex:0];
- NSNumber* rate = [command.arguments objectAtIndex:1 withDefault:[NSNumber numberWithFloat:1.0]];
+ NSString* mediaId = [command argumentAtIndex:0];
+ NSNumber* rate = [command argumentAtIndex:1 withDefault:[NSNumber numberWithFloat:1.0]];
if ([self soundCache] != nil) {
CDVAudioFile* audioFile = [[self soundCache] objectForKey:mediaId];
@@ -326,8 +326,8 @@
audioFile.player.volume = [audioFile.volume floatValue];
}
+ audioFile.player.enableRate = YES;
if (audioFile.rate != nil) {
- audioFile.player.enableRate = YES
audioFile.player.rate = [audioFile.rate floatValue];
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org