Video defaultPlaybackRate attribute
Definition and usage
defaultPlaybackRate
attribute settings or return the default playback speed of the video.
Setting this attribute will only change the default playback speed, not the current playback speed. To change the current playback speed, please use playbackRate attribute.
Instance
Example 1
Set the video to play in slow motion by default:
document.getElementById("myVideo").defaultPlaybackRate = 0.5;
Example 2
Set the video to play faster by default:
document.getElementById("myVideo").defaultPlaybackRate = 5;
Syntax
Return the defaultPlaybackRate attribute:
videoObject.defaultPlaybackRate
Set the defaultPlaybackRate attribute:
videoObject.defaultPlaybackRate = number
Attribute value
Value | Description |
---|---|
number |
Represents the default playback speed of the video. Example values:
Note:Value 0.0 is invalid and throws a NOT_SUPPORTED_ERR exception. |
Technical details
Return value: | Number, representing the default playback speed. |
---|---|
Default value: | 1.0 |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Supported | 9.0 | Supported | Not supported | Supported |