I'm trying to make something that will quickly load a second video to make it appear is if the two videos were concatenated into one (because depending on key inputs, one video could lead to two choices depending on if the user hits the correct key)
Right now the basic function I'm using is:
function play(first, second){
var video = document.getElementById("media")
video.setAttribute("src", first)
video.load()
video.play()
setTimeout(function(){
video.setAttribute("src", second)
video.load()
video.play()
}, 2000)
}
Right now it's got about a second of lag so that it doesn't appear as if the two videos are one. Any ideas on how to fix this?