-1
hello i am creating a system webtv/playlist have the following html code :
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<video id="player-video" controls controlsList="nodownload" class="player-video" ></video>
</body>
</html>
and a script like that:
<script type="text/javascript">
//iniciando o script
(function () {
var playerVideo = document.getElementById("player-video");
var current = 0;
var videos = [];
videos.push("video_1.mp4");
videos.push("video_2.mp4");
videos.push("video_3.mp4");
videos.push("video_4.mp4");
videos.push("video_5.mp4");
function nextVideo() {
playerVideo.src = videos[current];
current++;
playerVideo.play();
if (current >= videos.length) {
current = 0;
}
}
playerVideo.addEventListener("ended", nextVideo);
nextVideo();
})();
</script>
so far nothing else,more what I really want and that depending on the time it plays a specific video example:
when it is 12:00 he plays the video_1.mp4
when it’s 1:00 he plays the video_2.mp4
is that clear? ,?