<!DOCTYPE html>
<html>
<body>
<video id="myVideo" width="320" height="176" controls onratechange="myFunction()">
<source src="mov_bbb.mp4" type="video/mp4">
<source src="mov_bbb.ogg" type="video/ogg">
Your browser does not support HTML5 video.
</video>
<p id="demo">Change the speed of the video</p>
<input type="range" min="0.1" max="3" step="0.1" value="1"oninput="changeRate(this)">
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "The video's speed is " + document.getElementById("myVideo").playbackRate;
}
function changeRate(obj) {
document.getElementById("myVideo").playbackRate = obj.value;
}
</script>
<p>This example demonstrates how to use the "onratechange" attribute on a VIDEO element.</p>
<p>Video courtesy of <a href="https://www.bigbuckbunny.org/" target="_blank">Big Buck Bunny</a>.</p>
</body>
</html>