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

HTML Audio/Video DOM playbackRate Property

HTML Audio/Video DOM playbackRate Property

HTML audio/video Tag Reference HTML Audio/Video DOM Reference

Example

Set the video to play at slow speed:

myVid=document.getElementById("video1");

myVid.playbackRate=0.5;

Try it »


Definition and Usage

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


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the playbackRate attribute.

**Note:** Internet Explorer 9 and earlier versions do not support the playbackRate property.


Syntax

Set the playbackRate attribute:

audio|video

.playbackRate=

playbackspeed

Return the playbackRate attribute:

audio|video

.playbackRate

Attribute values

Value Description
playbackspeed Indicates the current playback speed of the audio/video.
 例值:     
  • 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, the current playback speed
    Default value: 1.0

    HTML audio/video Tag Reference HTML Audio/Video DOM Reference