Change HTML5 video’s quality from JavaScript
html, html5-video, javascript
Solution
Manual selection of quality is just a matter of:
- Saving the `currentTime` in a variable
- setting the video `src` to the URL of a different video (with the same content at a different quality)
- Setting the `currentTime` to the value in the variable
- Playing the video
Problem
In YouTube, we can change the quality of the video from a dropdown like 360p, 144p, 240p, etc. Can we do the same with HTML5 video element from JavaScript?