I'm trying to fire the "loadedmetadata", an event from which I re-create a video tag (because I need the dimensions of the original loaded video).
I've already seen this answer from which I coded this example :
if (!$("mySelector").addEventListener) {
$("#mySelector").addEventListener("loadedmetadata", function(e){
alert("Fired with addEventListener!");
}, false);
}
else {
$("#mySelector").attachEvent("onloadedmetadata", function(e){
alert("Fired with attachEvent!");
});
}
With IE8, I have a beautiful "Object doesn't support this property or method". What am I doing wrong here?
Thanks in advance.