X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Audio playbackRate Property

Audio Object Reference Audio Object

Example

Set the audio to play in slow motion:

document.getElementById("myAudio").playbackRate = 0.5;

Try it yourself »


Definition and Usage

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


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The playbackRate property is supported in all major browsers.

Note: The playbackRate property is not supported in Internet Explorer 9 and earlier versions.


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 Reference Audio Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook