You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/08/18 16:00:08 UTC

[GitHub] janpio closed pull request #142: Document setRate method (iOS only)

janpio closed pull request #142: Document setRate method (iOS only)
URL: https://github.com/apache/cordova-plugin-media/pull/142
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/README.md b/README.md
index b5330c38..48785a2c 100644
--- a/README.md
+++ b/README.md
@@ -122,6 +122,8 @@ The following constants are reported as the only parameter to the
 
 - `media.stop`: Stop playing an audio file.
 
+- `media.setRate`: Set the playback rate for the audio file.
+
 ### Additional ReadOnly Parameters
 
 - __position__: The position within the audio playback, in seconds.
@@ -650,6 +652,34 @@ function recordAudio() {
 }
 ```
 
+## media.setRate
+
+Stops recording an audio file.
+
+    media.setRate(rate);
+
+### Supported Platforms
+
+- iOS
+
+### Parameters
+
+- __rate__: The rate to set for playback.
+
+### Quick Example
+
+```js
+// Audio player
+//
+var my_media = new Media(src, onSuccess, onError);
+    my_media.play();
+
+// Set playback rate to 2.0x after 10 seconds
+setTimeout(function() {
+    my_media.setRate(2.0);
+}, 5000);
+```
+
 ## MediaError
 
 A `MediaError` object is returned to the `mediaError` callback


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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