File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ The following constants are reported as the only parameter to the
122
122
123
123
- ` media.stop ` : Stop playing an audio file.
124
124
125
+ - ` media.setRate ` : Set the playback rate for the audio file.
126
+
125
127
### Additional ReadOnly Parameters
126
128
127
129
- __ position__ : The position within the audio playback, in seconds.
@@ -650,6 +652,34 @@ function recordAudio() {
650
652
}
651
653
```
652
654
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
+
653
683
## MediaError
654
684
655
685
A ` MediaError ` object is returned to the ` mediaError ` callback
You can’t perform that action at this time.
0 commit comments