Skip to content

Commit

Permalink
(iOS) document setRate method (#142)
Browse files Browse the repository at this point in the history
Document setRate method (iOS only)
  • Loading branch information
dellagustin authored and janpio committed Aug 18, 2018
1 parent 43d57ca commit 5f18902
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5f18902

Please sign in to comment.