Advertisement
Home Open Editor ❯

HTML Audio/Video DOM playbackRate Property

Example

var vid = document.getElementById("myVideo");

function getPlaySpeed() {
  alert(vid.playbackRate);
}

function setPlaySpeed() {
  vid.playbackRate = 0.5;
}

Try this code ❯

Meaning

The playbackrateackRate property sets or returns the speed of the audio/video playback.

Return numeric value, the current playback speed.

And the default playbackrateackRate value is 1.0.


Standard Syntax

Return the PlaybackRate property:

audio|video.playbackRate

Set the PlaybackRate property:

audio|video.playbackRate=playbackspeed


Advertisement

Property Value

Type Description
playbackspeed Specifies the current playback speed of the audio/video.
  • -1.0 is backwards, normal speed.
  • -0.5 is backwards, half speed.
  • 1.0 is normal speed.
  • 0.5 is half speed (slower).
  • 2.0 is double speed (faster).
Home Open Editor ❯
Advertisement