Audio defaultPlaybackRateProperty
Example
Set the audio to play at a low speed by default:
document.getElementById("myAudio").defaultPlaybackRate = 0.5;
Try it Yourself »
Definition and Usage
The defaultPlaybackRate property sets or returns the default playback speed of the audio.
Setting this property only changes the default playback speed, not the current one. To change the current playback speed, use theplaybackRateproperty.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the defaultPlaybackRate property, except Safari.
Note:Internet Explorer 8 and earlier IE versions do not support the defaultPlaybackRate property.
Syntax
Return the defaultPlaybackRate property:
audioObject.defaultPlaybackRate
Set the defaultPlaybackRate property:
audioObject.defaultPlaybackRate=number
Property Values
| Value | Description |
|---|---|
| playbackspeed |
Indicates the default playback speed of the audio/video. Example values:
|
Technical Details
| Return value: | A number value, the default playback speed |
|---|---|
| Default value: | 1.0 |
More Examples
Example
Set the audio to fast playback by default:
document.getElementById("myAudio").defaultPlaybackRate =
2;
Try it Yourself »
Audio Object
Other Extensions