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 2016/01/30 00:48:13 UTC

[11/13] cordova-plugin-media git commit: rate control working

rate control working

This will still intermittently fail test 19 but this is more to do with
the success criteria of that rest.  rate is applied and works.


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

Branch: refs/heads/master
Commit: 90f462302ef987ed7cc7b377da49425273c3a70c
Parents: 6835e6a
Author: Gaven Henry <gh...@gmail.com>
Authored: Thu Jan 21 16:49:14 2016 +0800
Committer: Gaven Henry <gh...@gmail.com>
Committed: Thu Jan 21 16:49:14 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/90f46230/src/ios/CDVSound.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVSound.m b/src/ios/CDVSound.m
index 0727efc..d5c7ff5 100644
--- a/src/ios/CDVSound.m
+++ b/src/ios/CDVSound.m
@@ -286,6 +286,11 @@
                 audioFile.player.enableRate = YES;
                 audioFile.player.rate = [rate floatValue];
             }
+            if (avPlayer.currentItem && avPlayer.currentItem.asset){
+                float customRate = [rate floatValue];
+                [avPlayer setRate:customRate];
+            }
+            
             [[self soundCache] setObject:audioFile forKey:mediaId];
         }
     }


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