cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [09/13] cordova-plugin-media git commit: rate fix
Date Fri, 29 Jan 2016 23:48:11 GMT
rate 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/e7f9f048
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/e7f9f048
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/e7f9f048

Branch: refs/heads/master
Commit: e7f9f0482eb9304fe58599b6307d06c363dcff36
Parents: 4dcdb82
Author: Gaven Henry <ghenry22@gmail.com>
Authored: Thu Jan 21 15:32:48 2016 +0800
Committer: Gaven Henry <ghenry22@gmail.com>
Committed: Thu Jan 21 15:32:48 2016 +0800

----------------------------------------------------------------------
 src/ios/CDVSound.m | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/e7f9f048/src/ios/CDVSound.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVSound.m b/src/ios/CDVSound.m
index 0727efc..1e0af0a 100644
--- a/src/ios/CDVSound.m
+++ b/src/ios/CDVSound.m
@@ -341,12 +341,14 @@
                     CMTime time = avPlayer.currentItem.asset.duration;
                     position = CMTimeGetSeconds(time);
 
+                    audioFile.player.enableRate = YES;
+
                     if (audioFile.rate != nil){
-                        float customRate = [audioFile.rate floatValue];
+                        audioFile.player.rate = [audioFile.rate floatValue];
                         NSLog(@"Playing stream with AVPlayer & custom rate");
-                        [avPlayer setRate:customRate];
+                        [avPlayer setRate:audioFile.player.rate];
                     } else {
-                        NSLog(@"Playing stream with AVPlayer & custom rate");
+                        NSLog(@"Playing stream with AVPlayer");
                         [avPlayer play];
                     }
 


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


Mime
View raw message