Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

IE8 - Unable to get value of the property 'cssRules' (and 'tracks'): object is null or undefined


In IE8 I am getting the following errors which prevent JWplayer from playing at all:

SCRIPT5007: Unable to get value of the property 'cssRules': object is null or undefined
jwplayer.html5.js, line 9 character 34

SCRIPT5007: Unable to get value of the property 'tracks': object is null or undefined
jwplayer.js, line 34 character 144


I tried adding:
<meta content="IE=edge" http-equiv="X-UA-Compatible">

but that didn't do anything. JW works in IE9 and all other browsers. The path to the flash swf is also correct.

18 Community Answers

JW Player

User  
0 rated :

Correction, the player does not play in Safari (windows) either, just firefox and chrome.

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have a link?

JW Player

User  
0 rated :

I got it working in IE8, However still does not play in safari.

http://chicagobluesnetwork.com/Shows/Listen/rob-stone-the-c-notes-16

user: thisuser
pass: testing123

JW Player

User  
0 rated :

I don't see anything on that page that looks even remotely like JW Player 6 embedding code, and the username and password are rejected.

JW Player

User  
0 rated :

The login works fine for me, you can register if you want to try it. It is JWplayer, just look at the source code.

JW Player

User  
0 rated :

I should note in order to see the source, you have to login first.

Ethan Feldman

JW Player Support Agent  
0 rated :

I was able to log in with that username / password.

There is no need to load the player like this:

<script type="text/javascript" src="/Scripts/jwplayer.js"></script><script type="text/javascript" src="/Scripts/jwplayer.html5.js"></script>

Just change it to:

<script type="text/javascript" src="/Scripts/jwplayer.js"></script>

It will load the html5 player when needed automatically. Adding the 2nd line could also be causing issues.

JW Player

User  
0 rated :

I removed that line, still no playback in safari, It appears that the media loading just hangs in safari, where as the other browsers load the media fine.

Ethan Feldman

JW Player Support Agent  
0 rated :

I just tried to check your link in Safari and your testing username / password no longer work.

JW Player

User  
0 rated :

Yes I removed that login, however you can create an account with dummy information and it will still play

Ethan Feldman

JW Player Support Agent  
0 rated :

Can you put the log in back…?

JW Player

User  
0 rated :

How did you get this to work in IE8. I have same issue.

JW Player

User  
0 rated :

I am experiencing the same issue here, but only in IE7 with a player provided by Bits on the Run:

bc.. SCRIPT5007: Unable to get value of the property 'tracks': object is null or undefined


In the beautified script it goes wrong at (see --->):
bc.. d.item = function (h) {
var g = jwplayer.utils,
c = g.extend({}, a.defaults, h);
---> c.tracks = g.exists(h.tracks) ? h.tracks : [];
0 == c.sources.length && (c.sources = [new d.source(c)]);
for (var b = 0; b < c.sources.length; b++) {
var e = c.sources[b]["default"];
c.sources[b]["default"] = e ? "true" == e.toString() : !1;
c.sources[b] = new d.source(c.sources[b])
}
if (c.captions && !g.exists(h.tracks)) {
for (h = 0; h < c.captions.length; h++) c.tracks.push(c.captions[h]);
delete c.captions
}
for (b = 0; b < c.tracks.length; b++) c.tracks[b] = new d.track(c.tracks[b]);
return c
};



Variable h seems undefined, so the next line seems to solve my problem:
bc.. c.tracks = h && g.exists(h.tracks) ? h.tracks : [];

Ethan Feldman

JW Player Support Agent  
0 rated :

@Jason – Do you have a link?

@lmeurs – This will be fixed shortly when BOTR updates from 6.3 to 6.5.

JW Player

User  
0 rated :

@Steve - what did you do resolve for IE8

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have a link to where this is not working for you?

JW Player

User  
0 rated :

I managed to get this working in < IE 8. I followed Imeurs' solution, but some of the variable names were different in the jwplayer.js file.

So I changed on line 34 in jwplayer.js from:

bc.. c.tracks=e.exists(k.tracks)?k.tracks:[];


to this:

bc.. c.tracks=k && e.exists(k.tracks)?k.tracks:[];


It now seems to be working on IE and elsewhere.


Ethan Feldman

JW Player Support Agent  
0 rated :

Thanks for sharing David.

This question has received the maximum number of answers.