Video defaultPlaybackRateProperty

Video 对象参考手册Video Object

Example

Set the video to default slow playback:

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

Try it Yourself »

Definition and Usage

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

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


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 property.


Syntax

Return the defaultPlaybackRate property:

videoObject.defaultPlaybackRate

Set the defaultPlaybackRate property:

videoObject.defaultPlaybackRate=number

Property Values

Value Description
playbackspeed

Indicates the default playback speed of 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 default fast playback:

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

Try it Yourself »


Video 对象参考手册Video Object Other Extensions