The Audio playbackRate property is used for setting or returning the current playback speed of the audio.
- Return the playbackRate property:
- Set the playbackRate property:
audioObject.playbackRate = playbackspeed
- number :It is used to specify the default playback speed of the video.
The available options are:
- 1.0 is normal speed.
- 0.5 is half speed.
- 2.0 is double speed.
- -1.0 is backwards, normal speed.
- -0.5 is backwards, half speed.
Return: The Audio playbackRate property returns a number which represents the current playback speed.
Below program illustrates the Audio playbackRate Property:
Example: Setting the video to double speed by default.
- Before clicking “Set Speed” button:
- After clicking “Return Speed” button:
Supported Browsers: The browsers supported by DOM Audio playbackRate Property are listed below:
- Google Chrome
- Internet Explorer
- Apple Safari