Audio playbackRate Property

❮ Audio Object

Example

Set the audio to play in slow motion:

document.getElementById("myAudio").playbackRate = 0.5;
Try it Yourself »

Description

The playbackRate property sets or returns the current playback speed of the audio.


Browser Support

Property
playbackRate 39 79 48 Not supported 26

Syntax

Return the playbackRate property:

audioObject.playbackRate

Set the playbackRate property:

audioObject.playbackRate = playbackspeed

Property Values

Value Description
playbackspeed Indicates the current playback speed of the audio.
Example values:
  • 1.0 is normal speed
  • 0.5 is half speed (slower)
  • 2.0 is double speed (faster)
  • -1.0 is backwards, normal speed
  • -0.5 is backwards, half speed

Technical Details

Return Value: A Number, representing the current playback speed
Default Value: 1.0

More Examples

Example

Set the audio to play fast:

document.getElementById("myaudio").playbackRate = 2;
Try it Yourself »

❮ Audio Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.