HTMLMediaElement: playbackRate property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

The HTMLMediaElement.playbackRate property sets the rate at which the media is being played back. This is used to implement user controls for fast forward, slow motion, and so forth. The normal playback rate is multiplied by this value to obtain the current rate, so a value of 1.0 indicates normal speed.

A negative playbackRate value indicates that the media should be played backwards, but support for this is not yet widespread. (See browser compatibility for details.)

The audio is muted when the fast forward or slow motion is outside a useful range (for example, Gecko mutes the sound outside the range 0.25 to 4.0).

The pitch of the audio is corrected by default. You can disable pitch correction using the HTMLMediaElement.preservesPitch property.

Value

A double. 1.0 is "normal speed," values lower than 1.0 make the media play slower than normal, higher values make it play faster. (Default: 1.0)

Examples

js
const obj = document.createElement("video");
console.log(obj.playbackRate); // Expected Output: 1

Specifications

Specification
HTML
# dom-media-playbackrate-dev

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
playbackRate
Chrome – Full support
Chrome 3 (Release date: 2009-09-15)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Full support
Firefox 20 (Release date: 2013-04-02)
footnote Full support
Opera – Full support
Opera 12.1 (Release date: 2012-11-20)
footnote Full support
Safari – Full support
Safari 3.1 (Release date: 2008-03-18)
footnote Full support
Chrome Android – Full support
Chrome Android 18 (Release date: 2012-06-27)
footnote Full support
Firefox for Android – Full support
Firefox for Android 20 (Release date: 2013-04-02)
footnote Full support
Opera Android – Full support
Opera Android 12.1 (Release date: 2012-10-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 3 (Release date: 2009-06-17)
footnote Full support
Samsung Internet – Full support
Samsung Internet 1 (Release date: 2013-04-27)
footnote Full support
WebView Android – Full support
WebView Android 4.4 (Release date: 2013-12-09)
footnote Full support
WebView on iOS – Full support
WebView on iOS 3 (Release date: 2009-06-17)
footnote Full support
Negative playbackRate (backwards playback)
Experimental
Chrome – No support
Chrome
footnote
footnote Setting negative playbackRate throws an error.
footnote See bug 40719652
Edge – No support
Edge
footnote
footnote Setting negative playbackRate throws an error.
footnote See bug 40719652
Firefox – No support
Firefox
footnote
footnote Setting negative playbackRate throws an error.
footnote See bug 1308438
Opera – No support
Opera
footnote
footnote Setting negative playbackRate throws an error.
footnote See bug 40719652
Safari – Full support
Safari 3.1 (Release date: 2008-03-18)
footnote Full support
Chrome Android – No support
Chrome Android
footnote
footnote Setting negative playbackRate throws an error.
footnote See bug 40719652
Firefox for Android – No support
Firefox for Android
footnote
footnote Setting negative playbackRate throws an error.
footnote See bug 1308438
Opera Android – No support
Opera Android
footnote
footnote Setting negative playbackRate throws an error.
footnote See bug 40719652
Safari on iOS – Full support
Safari on iOS 3 (Release date: 2009-06-17)
footnote Full support
Samsung Internet – No support
Samsung Internet
footnote
footnote Setting negative playbackRate throws an error.
footnote See bug 40719652
WebView Android – No support
WebView Android
footnote
footnote Setting negative playbackRate throws an error.
footnote See bug 40719652
WebView on iOS – Full support
WebView on iOS 3 (Release date: 2009-06-17)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.

See also