I have this function in js that takes the name of the video that the user chose
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) {
vars[key] = value;
});
return vars;
}
var video = getUrlVars()["v"];
alert(video);
I would like to know how I can use the value obtained in the video variable in the src below:
<video width="502" height="360" id="Video1">
<source src="COMO COLOCAR O VALOR DA VARIAVEL AQUI" type=video/webm>
</video>