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

JWPlayer 6.12.4950 not showing video


Hi,

I noticed today that both the video and poster image do not appear anymore on my site. I'm using the cloud player, invoked like this:

<script src="http://jwpsrv.com/library/[my-key].js"></script>

Up until today (or perhaps it's been busted for a few days and I haven't noticed), everything was fine. I thoroughly tested my code on a variety of browsers, and to my knowledge, I have made no coding changes to the pages which invoke the player. I've seen the behavior in Chrome, Firefox, Safari and IE.

What I see is the background color of the container which holds the video player, and I see the JWPlayer control bar. The control bar appears to be fully functional, and I'm able to start/pause/etc the video. When I start the video, the progress bar moves appropriately, and the audio starts playing, but I see no video.

Is it possible there was a recent change to JWPlayer that could account for this? There is some urgency here, as this code is in a production environment.

Thanks,
Ben Mueller

18 Community Answers

bmueller

User  
-2 rated :

Okay, I found the problem. This has got to be a bug introduced by a recent update to JWPlayer. Full code is below, but the summary is that if you put the JWPlayer container inside of another div, and then set a padding on the the JWPlayer container itself, the video disappears. If you remove the padding, then the video appears. My code has used this padding for months and has worked just fine, so this has to be a bug with a recent version of JWPlayer. Please advise.

Here's the code:

<!DOCTYPE html>
<html>
<head>
<title>JWPlayer Padding Bug</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="http://jwpsrv.com/library/FKv+dHp2EeSEkRLddj37mA.js"></script>
<style>
.video-container { width: 400px; }
#videowrapper { padding: 1px; }
</style>
</head>

<body>
<h1>JWPlayer Padding Bug</h1>
<div class="video-container">
<div id="videowrapper"></div>
</div>

<script type="text/javascript">
jQuery(document).ready( function (jQuery) {

videoplayer = jwplayer('videowrapper').setup({
width: '100%',
aspectratio:'16:9',
autostart: 'false',
file: 'sampler-dev/lib/video/purvis_01_intro.mp4'
});
});
</script>
</body>
</html>

MisterNeutron

User  
-1 rated :

I can't duplicate that problem - if I put padding on the JW Player container (typically "myElement" in the demos), there's no problem. Can you give us a link to your site?

Just curious - why are you using jQuery? And does it make any difference if you get rid of that?

jherrieven

User  
0 rated :

I've highlighted this issue in this thread:

http://support.jwplayer.com/customer/portal/questions/11523147-video-not-playing-only-audio

Adding "padding" or a "border" to the JW Player container and setting up in a responsive mode (not explicitly setting the height) causes JW to render in audio player mode.

James Herrieven

MisterNeutron

User  
0 rated :

I should add, however, that applying styling of any sort to the JW container itself is a prescription for trouble - it's very easy to end up with weird CSS conflicts. It's far safer to restrict ALL styling to a wrapping div.

MisterNeutron

User  
0 rated :

Ah, I hadn't tried it combined with responsive mode....

bmueller

User  
0 rated :

Thanks for the replies.

So this has to be a bug that was introduced just within the last day or two, right? I guess this is the risk of using the cloud player.

And yes, jherrieven, this does appear to be the same issue. Anybody know if there's a fix on the way? I'm actually not sure I can put the CSS on the container and still get the desired layout effect--though clearly I'll try.

MisterNeutron, do you happen to know if these forum posts can be edited? I didn't get much sleep last night, so I accidentally posted my code sample with my JWPlayer key. Not smart...

bmueller

User  
0 rated :

Also, one more question: what is the most recent version of JWPlayer prior to 6.12.4950? Is there anyplace I can download that prior version? If so, I could try using that version of the code rather than the cloud version.

MisterNeutron

User  
0 rated :

You can't edit your posts. But your key is visible on your website, as are most user's keys, unless they take some action to obscure them. It's not the most secure license system I've seen.

If you need 6.11: http://misterneutron.com/JW6.11.zip

jherrieven

User  
0 rated :

@Ben - You can point to any general cloud version using the following formatted url:

//ssl.p.jwpcdn.com/6/12/jwplayer.js

This will be the latest sub-version for that particular point release. You'll need to add your key manually.

Hopefully, someone from JW will see your comment and edit the post on their end for you, removing your key reference, however as MisterNeutron states, anyone who visits your site would be able to get access to your key if they so wished.

I'm not sure about an official fix as generally any response from the JW support team has got seriously patchy since Ethan has disappeared!

However, here are some workarounds:

> Use JW6.11 - "//ssl.p.jwpcdn.com/6/11/jwplayer.js"
> Make sure there is no "border" or "padding" on the player container prior to setup:

<style>
.jwplayer { border: 0 !important; padding:0!important;}
</style>

You could then add your styling back in after the player has set up via the JavaScript "onReady" event
> Don't use a responsive setup - meaning you have to explicitly state both width and height parameters
> Switch to Flash mode - using "primary":"flash"

Hopefully one of those will provide a reasonable short-term solution.

James Herrieven

bmueller

User  
0 rated :

Thanks for the responses, guys. Yes, you're right that anybody could see my license key if they navigate to my site, but still...

Disabling the responsive feature is not an option for me. My whole site is responsive. And Flash? The devil itself. (-;

Best option is to re-work the CSS on my end, it seems.

It sure would be nice to get an official response from JWPlayer about this issue...

MisterNeutron

User  
0 rated :

Ethan and Andrew are both aware of this, and they're on the case, trying to pin down exactly which change caused this.

I can easily imagine this one wreaking havoc on any number of sites. Even my own simple demo pages put a little 1px border on #myElement, just for appearance - I had to do a quick patch on the responsive demo page to get around it.

bmueller

User  
0 rated :

Okay, cool.

I've got a test solution in place that seems to work. I went from this:

<div id="videowrapper"></div>

...to this:

<div id="videoshell">
<div id="videowrapper"></div>
</div>

...and I just moved all the CSS to the #videoshell container, and my early testing appears to show that it's working.

jherrieven

User  
0 rated :

@MisterNeutron, you could also include the following as part of your workaround if the border is important to you!

jwplayer().onReady(function(){jwplayer().container.style.border="1px solid #fff";})

;o)

MisterNeutron

User  
0 rated :

Thanks, James. For my little demo page, I just got rid of the border - I'm probably the only person in the world who would even notice that it was missing. But people putting together "real"pages might very much appreciate a relatively simply workaround.

In other news, Ethan has found the specific commit that introduced the bug, and has filed a bug report for it. No word on when a fix might show up.

Cooper Reid

JW Player Support Agent  
0 rated :

Thanks for providing the workaround, Mr Neutron. This will have to be used for the time being.
Cooper

MisterNeutron

User  
0 rated :

It's James Herrieven who supplied the best workaround.

This is the kind of bug that shouldn't have to wait for the next regular release. Its effects are serious, and will clobber any number of websites. This deserves a quick patch, within days, or even hours.

Cooper Reid

JW Player Support Agent  
0 rated :

Agreed, and thanks again JH and Mr. N.
Cooper

MisterNeutron

User  
0 rated :

This has now been patched. If you don't have 6.12.4956, download the zip file again, and update. I believe the jwpserv and jwpcdn versions have also been updated and fixed.

This question has received the maximum number of answers.