I want to play a section of a video repeatedly 5 times from the second "16" to the second "20".
This is my code in JavaScript
<html>
<head>
<script>
function playVideo(str) {
document.getElementById("myVideo").src = str;
document.getElementById("myVideo").currentTime=16;
document.getElementById("myVideo").endTime=20;
document.getElementById("myVideo").start();
document.getElementById("myVideo").repeat=5;
}
</script>
</head>
<body>
<video id="myVideo" width="1000" height="800" controls autoplay loop>
Your browser does not support the video tag.
</video>
<a onclick="playVideo('video/journey27.mp4')" > Play </a>
</body>
</html>
the "document.getElementById("myVideo").currentTime=16;" works but the "endTime" and "repeat" don't work.
How to play a section of a video repeatedly 5 times from a specific time to a specific time using Javascript?