Do you have an idea why I get the error "Unable to create event listener from null":
var my; my.newVidObj = document.createElement('video'); my.newVidObj.src = "vid-source.webm"; my.newVidObj.load(); my.newVidObj.addEventListener("play", function() {
Also, is there a way to use video tag methods on jquery objects (e.g. creating a video tag via jquery)?
I edited the answer below to be correct, but it should be checked by experts. Here is the solution:
var vid = $("<video />", { id: "my-HTML5-video", src: "video.webm" }).bind("play", function(){ alert('test'); }).appendTo("body")[0].play();
source share