From 5f189024b48c525f8560e8420c3fc0e745729d5b Mon Sep 17 00:00:00 2001 From: Guilherme Dellagustin Date: Sat, 18 Aug 2018 18:00:06 +0200 Subject: [PATCH] (iOS) document setRate method (#142) Document setRate method (iOS only) --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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