Skip to content

Commit 9d249bb

Browse files
edemainegkatsev
authored andcommitted
docs: Document playbackRates (#4602)
1 parent 7929677 commit 9d249bb

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/guides/options.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* [languages](#languages)
2727
* [nativeControlsForTouch](#nativecontrolsfortouch)
2828
* [notSupportedMessage](#notsupportedmessage)
29+
* [playbackRates](#playbackrates)
2930
* [plugins](#plugins)
3031
* [sourceOrder](#sourceorder)
3132
* [sources](#sources)
@@ -180,6 +181,24 @@ Explicitly set a default value for [the associated tech option](#nativecontrolsf
180181
181182
Allows overriding the default message that is displayed when Video.js cannot play back a media source.
182183

184+
### `playbackRates`
185+
186+
> Type: `Array`
187+
188+
An array of numbers strictly greater than 0, where 1 means regular speed
189+
(100%), 0.5 means half-speed (50%), 2 means double-speed (200%), etc.
190+
If specified, Video.js displays a control (of class `vjs-playback-rate`)
191+
allowing the user to choose playback speed from among the array of choices.
192+
The choices are presented in the specified order from bottom to top.
193+
194+
For example:
195+
196+
```js
197+
videojs('my-player', {
198+
playbackRates: [0.5, 1, 1.5, 2]
199+
});
200+
```
201+
183202
### `plugins`
184203

185204
> Type: `Object`

0 commit comments

Comments
 (0)