<!DOCTYPE html>
<html lang="en-US">
<head>
<style>
video{
width:100%;
height:330px
}
</style>
</head>
<body>
<p>Try to increase the speed of the video by clicking on 'Fast Forward' button</p>
<video id="myVid" controls>
<source src="/hawk.mp4" type="video/mp4">
</video>
<button type="button" onclick="fastForward()">Fast Forward</button>
<script>
var x = document.getElementsByTagName("video")[0];
function myFunction() {
alert("The playing speed of the video was changed");
}
function fastForward(){
document.getElementById("myVid").playbackRate = 2;
}
x.addEventListener("ratechange", myFunction);
</script> </body>
</html>