<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>
<!-- Mirrored from www.w3schools.com/tags/tryit.asp?filename=tryhtml5_att_onratechange by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:11:04 GMT -->
</html>