HTML Audio/Video DOM defaultPlaybackRate Attribute

Example

Set the video to default slow playback:

myVid=document.getElementById("video1");
myVid.defaultPlaybackRate=0.5;

Try it yourself

Definition and Usage

The defaultPlaybackRate attribute sets or returns the default playback speed for audio/video.

Setting this attribute will only change the default playback speed, not the current one. To change the current playback speed, please use the playbackRate attribute.

Browser Support

Only Google Chrome supports the defaultPlaybackRate attribute.

Syntax

Set defaultPlaybackRate attribute:

audio|video.defaultPlaybackRate=playbackspeed

Return defaultPlaybackRate attribute:

audio|video.defaultPlaybackRate

Attribute Value

Value Description
playbackspeed

Indicates the default playback speed for audio/video.

Example Value:

  • 1.0 Normal Speed
  • 0.5 Half Speed (slower)
  • 2.0 Double Speed (faster)
  • -1.0 Backward, normal speed
  • -0.5 Backward, half speed

Technical Details

Return Value Numeric value, the default playback speed
Default Value: 1.0