
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:
d.html5.youtube.u.resize
$
We are using jquery 2.1.1.
The setup object looks like this:
{
autostart: false
events: {...},
fallbackDiv: div#jw_player,
height: 455,
image: "http://i1.ytimg.com/vi/im1d3yYtzSc/hqdefault.jpg",
key: "XXX",
plugins: {...},
primary: "html5",
sources: [
{
default: false
file: "https://www.youtube.com/watch?v=im1d3yYtzSc"
}
],
stretching: "fill"
width: 828
wmode: "transparent"
}
As a reference this ticket seems to address a similar issue:
http://support.jwplayer.com/customer/portal/questions/8085212-error-cannot-read-property-replace-of-undefined
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:
http://d3fjzrlf6myrcc.cloudfront.net/embed/libs/jwplayer/6.8/jwplayer.js
With all all relevant files in the same folder: jwplayer.html5.js and jwplayer.flash.swf