Right now, I have three different videos playing automatically whenever I refresh my browser. But every time I test my site in Google Chrome, I notice that a black background flashes on screen for one second before a video loads. This doesn't happen in the other browsers.
I coded my videos looping in JS, and here is how it looks. Is there a way to prevent the screen from flashing black every time I play a video?
var videoPlayer = document.getElementById('video');
videoPlayer.loop = true;
var videos = [
], videos = videos[Math.floor(Math.random() * videos.length)];
videoPlayer.src = "../wp-content/videos/" + videos + ".mp4";
videoPlayer.addEventListener('ended', playVideo, false);