HTML Audio/Video DOM defaultPlaybackRate Property

❮ HTML Audio/Video DOM Reference

Example

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

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

function setPlaySpeed(x) {
  vid.defaultPlaybackRate = x;
  vid.load();
}

Meaning

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

Returns Number value default playback speed is 1.0.


Standard Syntax

Return the defaultPlaybackRate property:

audio|video.defaultPlaybackRate

Set the defaultPlaybackRate property:

audio|video.defaultPlaybackRate=playbackspeed



Browser Support




Status







Return Value

Type Description
playbackspeed Specifies that the default playback speed of the audio/video.
  • -1.0 backwards, normal speed
  • -0.5 backwards, half speed
  • 0.5 half speed
  • 1.0 normal speed
  • 2.0 double speed
❮ HTML Audio/Video DOM Reference