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

JW Player - youtube embed 6.9

Since the release of 6.9 we keep getting this error when calling setup the second time around:

There was a problem setting up the player: Object {message: undefined, version: "6.9.4867", type: "jwplayerError"}

and then

Object {message: "Cannot read property 'replace' of undefined", version: "6.9.4867", type: "jwplayerError"}

and then

Uncaught TypeError: Cannot read property 'clientWidth' of null -- thrown in jwplayer.html5.js :30
Stack trace for this says its coming from:

We are using jquery 2.1.1.

The setup object looks like this:
autostart: false
events: {...},
fallbackDiv: div#jw_player,
height: 455,
image: "",
key: "XXX",
plugins: {...},
primary: "html5",
sources: [
default: false
file: ""
stretching: "fill"
width: 828
wmode: "transparent"

As a reference this ticket seems to address a similar issue:

Tried to resolve by reverting to 6.8. No success, let me elaborate, perhaps this is the better solution:
1) tried to host on S3 / CloudFront, here:
With all all relevant files in the same folder: jwplayer.html5.js and jwplayer.flash.swf

5 Community Answers


0 rated :

To add insult to injury it seems JW Support truncates your question without notice. So, yeah thanks.


1) Hosting on S3 / CloudFront
Added the jwplayer.key = "XXX" after the library loads
No explicit error comes back, flash takes over the div but with nothing in it, on right click it says "Movie not loaded".

2) Using JW server CDN version: //
Same. No explicit error, video not loading.

If you know of a way to do self-hosting for 6.8 that works please help. It shameful that a payed service will send breaking updates down the wire.

We've been using a watermarked version of the player for the past 2 weeks hoping it would get fixed (it was the only one we could get working), but it seems many people are having issues with youtube and jw player 6.9.

Also quite shameful, the same issue pops-up in the "Publish Wizard". Do this:
2) put in any yt video id. Let's try this: zUDqI9PJpc8; Click the search result: "How much information"
3) Click publish video
4) Enjoy the glorious "Cannot read property 'replace' of undefined"

Any help is greatly appreciated.
Thank you.

Ethan Feldman

JW Player Support Agent  
0 rated :

There is definitely a known and reported issue with using YouTube with 6.9 + html5 mode and re setting up the player. I have already reported and logged the issue.

A work around for this is to use Flash as primary.

Another work around would be to use 6.8.

Since you say that using 6.8 doesn’t seem to solve the issue, can you provide a link?


0 rated :

Thank you Ethan!

We are using flash as primary for now.
I will try to setup a 6.8 environment for you to look at.

Ethan Feldman

JW Player Support Agent  
0 rated :

Np! Let me know about the 6.8 link.


0 rated :

This is a huge issue for us as well. We had made a hack that allowed us to play youtube using html5, and were excited to remove that hack.

We were surprised and very disappointed that the 6.9 jwplayer html5 "support" of youtube is very buggy.

Is there a timeline on fixing this?

This question has received the maximum number of answers.