i have 5 different videos and i want them to add more then one source to them so that they can play in more browsers but im not sure on how to make it so you can do that. here is what my javascript looks like it is pretty repetitive
function addVideo1() {
var changeStuff = document.getElementById("myVideo");
changeStuff.src = "video/demoreel.mp4";
}
function addVideo2() {
var changeStuff = document.getElementById("myVideo");
changeStuff.src = "video/video1.mp4";
}
function addVideo3() {
var changeStuff = document.getElementById("myVideo");
changeStuff.src = "video/video2.mp4";
}
function addVideo4() {
var changeStuff = document.getElementById("myVideo");
changeStuff.src = "video/video3.mp4";
}
function addVideo5() {
var changeStuff = document.getElementById("myVideo");
changeStuff.src = "video/video4.mp4";
}