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;

Try it yourself

Example 2

Set the audio to fast play:

document.getElementById("myaudio").playbackRate = 2;

Try it yourself

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:

  • 1.0 is normal speed
  • 0.5 is half speed (slower)
  • 2.0 is double speed (faster)
  • -1.0 is backward, normal speed
  • -0.5 is backward, half speed

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