var videos = [
'http://mysite.com/video/32412.mp4',
'http://mysite.com/video/32412.mp4',
'http://mysite.com/video/32412.mp4',
'http://mysite.com/video/32412.mp4'
];
var nextBtn = document.getElementById("next-btn");
var videoPlayer = document.getElementById("video-player");
var currentVideo = 0;
nextBtn.addEventListener("click", function() {
currentVideo++;
if (currentVideo === videos.length) currentVideo = 0;
videoPlayer.src = videos[currentVideo];
videoPlayer.play();
});