setInterval(function() {
if (table.style.display === 'none') {
table.style.display = 'table';
video.style.display = 'none';
video.pause();
video.currentTime = 0;
} else {
table.style.display = 'none';
video.style.display = 'block';
video.play();
}
},video.duration)
videoSources= [src1, src2, src3]
current = 0
video.src = videoSources[current]
setInterval(function() {
video.src = videoSources[current]
current = (current + 1) % videoSources.length
if (table.style.display === 'none') {
table.style.display = 'table';
video.style.display = 'none';
video.pause();
video.currentTime = 0;
} else {
table.style.display = 'none';
video.style.display = 'block';
video.play();
}
}, video.duration)