<! doctype html> <html> <head> <meta charset="utf-8"> <title>H5 Video disables fast forward </title> </head> <body> <div> < Video ID ="my-video" controls preload="meta" height="70%" width="100%" data-setup="{}">
                <source src="5.mp4" type="video/mp4">
            </video>
        </div>
        <script type="text/javascript">
            var video = document.getElementById("my-video"Var last = 0 // When the current playback position has been changed video.ontimeupdate =function () {
                var current = video.currentTime
                if(current - last > 2) {
                    video.currentTime = last
                } else {
                    last = current
                }
            };
        </script>
    </body>
</html>
Copy the code