So, using a HTML 5 compliant video player, (like Video JS) how would one go about loading a video dynamically, without having to reload the entire page? Imagine, a list of links
Came up with a simple solution. Here's the script; throw this in the head:
function vidSwap(vidURL) {
var myVideo = document.getElementsByTagName('video')[0];
myVideo.src = vidURL;
myVideo.load();
myVideo.play();
}
And then the HREF will call the function:
<a href="#" onClick="javascript:vidSwap('myMovie.m4v'); return false;">Link</a>