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

Player won't load


I'm not quite clear where I could have gone wrong on the code. This is what I put right before the end head tag:<script type="text/javascript" src="jwplayer.js"></script>
<script>jwplayer.key="(and I put my key here for analytics)"</script>

Then within the body I put this:

<div class="content">

<div id="1player">Loading the player...</div>
<script>
jwplayer("1player").setup({
playlist: [{
file: "benefits.mp4",
image: "retro.jpg",
title: "Repeal the Deal"
},{
file: "retro.mp4",
image: "retro.jpg",
title: "VOTF Trailer"
},{
file: "gallo.mp4",
image: "gallo.jpg",
title: "Terra Antica"
},{

file: "40 Shades.mp4",
image: "40 Shades.jpg",
title: "40 Shades of Blue"
}],
width: "950",
height: "425",
primary: "html5",
listbar: {
position: "right",
size: "200",



}
});


I loaded the player into the directory. Not sure what I did wrong

12 Community Answers

Randy

JW Player Support Agent  
0 rated :

Hello,

Thank you for contacting support. Could you send over a sample link to your page: support@jwplayer.com

Kindly,

Randy

MisterNeutron

User  
0 rated :

Make sure that all three of the JW Player files are sitting in the same directory as your index.html - jwplayer.js, jwplayer.html5.js, and jwplayer.flash.swf.

Also, remove the trailing comma after size: "200" - it's the last attribute, so no comma is needed. You don't need primary: "html5" at all, since that's the default. And don't put quote marks around integer values like 950, 425, and 200. The player will generally tolerate that, but it's bad coding practice. Only strings get quote marks - integers and booleans do not.

roccboy3

User  
0 rated :

Check to all the above: all three players, removed trailing comma, took out primary, and removed quotes around integer values. Still no luck. I thought the comma would do it, I won't lie.

MisterNeutron

User  
0 rated :

In that case, a link to your site is needed - there must be something else going on here.

roccboy3

User  
0 rated :

Yes, that's what I think. Just can't put my finger on it. It's: http://vrocchio.net

MisterNeutron

User  
0 rated :

The ID for a <div> can't start with a number. Rename your player div with an ID like "player_1".

MisterNeutron

User  
0 rated :

You've also got a lot of basic HTML validation errors in there, like unclosed <p> tags, closing <div> tags that aren't actually open, and so on.

Step one, get rid of XHMTL Transitional, which is now completely obsolete - recode to HTML5. Then run your page code through a validator, like http://validator.w3.org/

roccboy3

User  
0 rated :

As an experiment though, I put in code for just the player and one clip--no list. It runs fine. Doesn't that mean there's something wrong with my list? I have checked and rechecked to make sure that each file name is correct, and still it does not fly.

jherrieven

User  
0 rated :

Check again the suggestion from MisterNeutron regarding the naming of your DIV.

Quite simply, it can't start with a number.

James Herrieven

roccboy3

User  
0 rated :

EUREKA! James and Mister Neutron, that was it. Player id starting with a number threw the whole thing off.

Thanks for all your help.

MisterNeutron

User  
0 rated :

Glad it was an easy fix. Starting a div ID with a number does some weird things when it comes to inline CSS - the symptoms can be very tough to recognize and track down.

You should still pursue moving to HTML5 and getting rid of deprecated stuff in your code.

roccboy3

User  
0 rated :

Right you are! If ever I learned a lesson in recycling old code, it was this time out. Hard to think of something I made in Dreamweaver being so outdated, but clearly it is!

This question has received the maximum number of answers.