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

Intermittent Issues WIth JWPlayer


HI everyone. This isn't so much a question as it is a solution to a frustrating problem. I'm putting it here in case anyone else runs into this.

We had a recent problem after upgrading to JWPlayer 6.12 (from JWPlayer5) in that our videos would intermittently render. After debugging, I found that it has to do with the DIV ID value. It cannot start with a numeric value.

In order to display multiple videos per page, we had a random string generator for the DIV IDs. This value returned a mix of alphanumeric characters. We noticed that the ones that always rendered started with an alpha character, but those that didn't render started with a numeric value.

Once we prefixed our random string with an alpha character, everything worked like a charm.

I hope this helps out someone else out there.

-Bryan

4 Community Answers

Andrew

JW Player Support Agent  
1 rated :

Thanks! This is a great thing to bring up. I’m actually going to be editing some of our docs with the issue and its workaround. My understanding is that this affects HTML5 mode and is related to CSS.

Again, great catch.

MisterNeutron

User  
0 rated :

Yes, this is not really a JW Player problem. Even though HTML5 allows ID's that start with digits (HTML 4 did not), they create a problem when using CSS selectors, where they violate the standard:

http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier

So, a leading digit would have to be escaped. Very few scripting routines (like jQuery) are written to be able to handle ID's that start with digits.

Andrew

JW Player Support Agent  
0 rated :

Thanks for the extra article. I’ll definitely add this for some additional color on the support site.

longtailvideo

User  
0 rated :

This was amazingly timely. I was just encountering sporadic issues today with the html5 player loading on a page with multiple players. Like you, I was using a pseudo-random generator that was sometimes generating an ID that started with a number. Adding an alpha character to the beginning fixed it.

This question has received the maximum number of answers.