Skip to content

Commit 5f18902

Browse files
dellagustinjanpio
authored andcommitted
(iOS) document setRate method (#142)
Document setRate method (iOS only)
1 parent 43d57ca commit 5f18902

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ The following constants are reported as the only parameter to the
122122

123123
- `media.stop`: Stop playing an audio file.
124124

125+
- `media.setRate`: Set the playback rate for the audio file.
126+
125127
### Additional ReadOnly Parameters
126128

127129
- __position__: The position within the audio playback, in seconds.
@@ -650,6 +652,34 @@ function recordAudio() {
650652
}
651653
```
652654

655+
## media.setRate
656+
657+
Stops recording an audio file.
658+
659+
media.setRate(rate);
660+
661+
### Supported Platforms
662+
663+
- iOS
664+
665+
### Parameters
666+
667+
- __rate__: The rate to set for playback.
668+
669+
### Quick Example
670+
671+
```js
672+
// Audio player
673+
//
674+
var my_media = new Media(src, onSuccess, onError);
675+
my_media.play();
676+
677+
// Set playback rate to 2.0x after 10 seconds
678+
setTimeout(function() {
679+
my_media.setRate(2.0);
680+
}, 5000);
681+
```
682+
653683
## MediaError
654684

655685
A `MediaError` object is returned to the `mediaError` callback

0 commit comments

Comments
 (0)