HTML Audio/Video DOM playbackRate Property
Example
var vid = document.getElementById("myVideo");
function getPlaySpeed() {
alert(vid.playbackRate);
}
function setPlaySpeed() {
vid.playbackRate = 0.5;
}
Meaning
The playbackrateackRate property sets or returns the speed of the audio/video playback.
Return numeric value, the current playback speed.
And the default playbackrateackRate value is 1.0.
Standard Syntax
Return the PlaybackRate property:
audio|video.playbackRate
Set the PlaybackRate property:
audio|video.playbackRate=playbackspeed
Advertisement
Property Value
| Type | Description |
|---|---|
| playbackspeed | Specifies the current playback speed of the audio/video.
|