Hi I am very new to javascript. I have a .webm and .mp4 video source, but how can I add another source in javascript, I have only managed to put in 1 (webm), what is the code i need to add another one in?
Thank You in advance.
Hi, The reason why I need to put in JS is because divx plugin is replacing the html5 video elements, like on this thread Prevent divx web plugin fron replacing html5 video element?
Here is my code
<script type="text/javascript">
function changevid() {
document.getElementById('vid').innerHTML = '<source src="http://avalonplay.com/video/loginvideo.webm" type="video/webm" />';
document.getElementById('vid').load();
}
</script>
<body onload="changevid()">
<video id="vid" width="800" height="450" loop="loop" preload="auto" autoplay style="width: 100%; height: auto; margin:0; right: 0;">
</video>
</body>