- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to change the playing speed of videos in HTML5?
Use the playbackRate property sets the current playback speed of the audio/video. With that, the defaultPlaybackRate property sets the default playback speed of the audio/video.
Change the playing speed of videos
You can try to run the following code to change the playing speed of videos −
/* play video thrice as fast */ document.querySelector('video').defaultPlaybackRate = 3.0; document.querySelector('video').play();
Play video twice as fast
The following is to play the video twice as fast −
/* play video twice as fast */ document.querySelector('video').playbackRate = 2;
Advertisements