Question

I am getting script errors only with IE8/IE7 with videoJS 4.1x and 4.2x.

line 3357 (in current 4.2.1):

this.tech.one('mousemove', function(e){
    e.stopPropagation();
    e.preventDefault();
});

The animations work anyway, but this error makes it hard to see any other errors we are getting when something else is messed up.

Was it helpful?

Solution

Not a proper solution, but in the meanwhile you can prevent these errors from appearing by creating a dummy tech object when it is undefined.

var player = videojs(
    // ...
);

if (!player.tech) {
    player.tech = {
        one: function () {},
        ready: function () {}
    };
}

To clarify: in my case, errors related to this.tech appeared in browsers which don't have Flash installed while it is the only possibility for them (IE8 and below). So I assume tech is basically empty because nothing is available.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top