Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Video defaultPlaybackRate Property

Video defaultPlaybackRate property

Video Object Reference The Video object

Example

Set the video to play at a low speed by default:

document.getElementById("myVideo").defaultPlaybackRate = 0.5;

Try it »


Definition and Usage

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

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


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Currently, all browsers except Safari support the defaultPlaybackRate property.

Note: Internet Explorer 8 and earlier IE versions do not support the defaultPlaybackRate attribute.


Syntax

Return the defaultPlaybackRate attribute:

videoObject

.defaultPlaybackRate

Set the defaultPlaybackRate attribute:

videoObject

.defaultPlaybackRate=

number

Attribute values

Value Description
playbackspeed

Indicates the default playback speed of the audio/video.

Example values:

  • 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: A numeric value, representing the default playback speed
    Default value: 1.0

    More examples

    Example

    Set the video to play fast by default:

    document.getElementById("myVideo").defaultPlaybackRate = 5;

    Try it »


    Video Object Reference The Video object