jwplayerjwplayer6

JWPlayer (new version) throws an error and doesn't play on the site


I am using latest version of JWPlayer and it shows a blank space when open the page with the video. The weird part is that when I refresh it twice/thrice, it works fine.

But it almost never works the first time the page opens.

This the error it shows in the console :-

Error handling "jwplayerReady" event listener [0]: SyntaxError: Failed to execute
'insertRule' on 'CSSStyleSheet': Failed to parse the rule  '#5831ef82aa5f92337bd88fe0c8d54bec_display_button  { background-image:
 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAA0CAYAAACHO2h8AAAA7ElEQ…
8thSpN0xvbts0lxeZb/ACrDeOgYYyVOWeinyp6gnWdW0Vft69cndg2ea8AAAAASUVORK5CYII=), 
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAA0CAYAAACQGfi1AAAAZUlEQ…
v6Y0rIAygi5D8UjUUjA/aAyZwwOPIP2mMKRd9bdM79KAVee0AqrmZ58iQAAAAASUVORK5CYII=), 
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAA0CAYAAACHO2h8AAAA8klEQ…
ZFjXwb55x8WtyKGtGRUpZCcLR7dzJ+B0iSy03DisYEQo0nc8B4p9SUlywAAAAASUVORK5CYII=); 
background-position: left,center,right; background-repeat: no-repeat; padding: 0 18px 0 18px;
 height: 52px; margin-top: -26px; }'. function (b){l.playerReady(b);a.css.unblock(d.id)} 

Any idea why this is happening?

Thanks.


Solution

  • In my case, it happens when my container div ID starts with a numerical character.

    jwplayer("2someID").setup({
            file: fileURL,
            image: imgURL
        });     
    

    see my example in this jsFiddle
    try changing the div container id with a non-numeric character.

    Check this link for more information