Audio playbackRate attribute
Definition and usage
PlaybackRate
Set or return the current playback speed of the audio.
Example
Example 1
Set the audio to slow motion play:
document.getElementById("myAudio").playbackRate = 0.5;
Example 2
Set the audio to fast play:
document.getElementById("myaudio").playbackRate = 2;
Syntax
Return the playbackRate attribute:
audioObject.playbackRate
Set the playbackRate attribute:
audioObject.playbackRate = playbackspeed
Attribute Value
Value | Description |
---|---|
playbackspeed |
Indicates the current playback speed of the audio. Example Value:
|
Technical Details
Return Value: | A number representing the current playback speed. |
---|---|
Default Value: | 1.0 |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |