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

Error Setting up player: Invalid license Key ( JW Player 6)


I am trying to embed a video where the content is stored in a database. Everything works fine when I try to play video using HTML5 however if I need to use flash I get the following error "Error Setting up player: Invalid license Key". Here are some screen shots. I verified that I get the same error message in Chrome when I set the primary option to "Flash". I have tried this both ways with using my jwplayer.key and leaving it out.

Not working in FireFox with Flash
http://test.ammkwed.com/images/ff_flash_video.png

Working in Chrome with HTML5
http://test.ammkwed.com/images/chrome_html5.png

On a side note in order to make this work I had to add the fake.mp4 to the url and use some client side code to map it back to the correct controller.

Example code
bc.. jwplayer('mediaspace').setup({
file: "http://iphidden/getAttachment/fake.mp4?attachId=myId",
width: 720,
height: 420,
controls: true
});



26 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have a link?

JW Player

User  
0 rated :

So I was about to set up the demo site since I am on a dev box behind a firewall and it started working. We are currently just evaluating the tool before we buy the license. They one issue I do have is that if I don't include the "fake.file_extension" the player doesn't work however that was easy enough to code around. I wondering if this has something with me going from version 5 to version 6 and something cached somewhere.

Ethan Feldman

JW Player Support Agent  
0 rated :

Ok, glad you got it working.

I am not sure what you mean by “fake.file_extension” , though.

JW Player

User  
1 rated :

Since the content I am trying to access is in a database stored as a BLOB ( not ideal I know). I need to make a call to a controller with the id of the attachment to fetch. So in file parameter if I put the URL as "http://iphidden/attach/getAttachment?attachId=myId" I get the following error, "Error loading player: No playable sources found" This happens both with the flash and html5 implementation. I test using the standard video tag with that URL as the src and it works. So the workaround for this issue is I have to append a name.file_extension. So if I am playing an mp4 file I need to make the URL http://iphidden/attach/getAttachment/fake.mp4?attachId=myId but if I need to play an mp3 I make the url http://iphidden/attach/getAttachment/fake.mp3?attachId=myId. Since this is a Grails project in my URL mappings I added the following line.
"/attachController/getAttachment/*.*" (controller:"AttachController", action: "getAttachment")

I don't really have a good way to create a grails app that is hosted somewhere and I am not sure how to do the redirect thing in PHP. I would be happy to make you a sample grails app with the db scripts zip it up and email it to you.

Ethan Feldman

JW Player Support Agent  
0 rated :

Ok, got it. I have not worked with BLOB before though, so it might be hard to debug this easily…

JW Player

User  
0 rated :

I am having this issue with the newest download.

Ethan Feldman

JW Player Support Agent  
0 rated :

Where are you having an issue?

JW Player

User  
0 rated :

Ethan,
I was going to create a ticket for this issue at http://developer.longtailvideo.com/trac/report/3?asc=1&page=1 but didn't see a way to create a ticket. I will spend some time this weekend getting this together in php. I will post the HTML page so you can use that to debug. Basically it will a call to a php page that outputs a video or audio file based on the id. I can provided the php code once I get it working. I should have something up by Monday.

Ethan Feldman

JW Player Support Agent  
0 rated :

HI Aaron,

These are our tickets :) We create them. If you can put something up though, that would be helpful, thanks.

Best,
-Ethan

JW Player

User  
0 rated :

I have something up!

My test page is http://test.ammkwed.com/view.php (use chrome because the video is H.264 and the won't work in FireFox)

Here is the code for the HTML page and PHP page. Feel free to call the getAttachment stuff on my server from your debug/test environment. Let me know if you need anything else

bc.. <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" />
<meta name="GENERATOR" content="PHPEclipse 1.2.0" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jwplayer.js"></script>
<script type='text/javascript'>jwplayer.key="QD9+0zA3lBuUqY+H1VPxsxMbBYmxXR88oIcc/w==";</script>
<title>title</title>
</head>
<body>
<div>Inline Video Works (Chrome bc its H.264)</div>
<video src="http://test.ammkwed.com/getAttachment.php?attachid=2" width="720" height="420" controls="controls"></video>

<div>JWPLAYER with attachment link</div>
<div id='jwplayer'></div>

<div>JWPLAYER with direct link to video(downloaded from db)</div>
<div id='jwplayer1'></div>
<script>
$(document).ready(function(){
jwplayer("jwplayer").setup({
file: "http://test.ammkwed.com/getAttachment.php?attachid=2",
width: 720,
height: 420,
controls: true,
'controlbar': 'bottom'
}
);
jwplayer("jwplayer1").setup({
file:"Wildlife.mp4",
width: 720,
height: 420,
controls: true,
'controlbar': 'bottom'
}
);

});
</script>
</body>
</html>




Code on the PHP Side

bc.. <?php

include_once('database.php');

$db = new mysql_database_class();

$rs = $db->db_query("Select * From attachment where id='" . $_GET['attachid'] . "'");

$row = $rs->fetch_assoc();

header("Content-type: " . $row['content_type']);

header("Content-length: " . strlen($row['attachment']));

header("Content-Disposition: attachment; filename=" . $row['filename']);

echo $row['attachment'];

?>





Ethan Feldman

JW Player Support Agent  
0 rated :

Ah, you are mixing and matching v5 variables with the v6 player.

You should look over this url – http://www.longtailvideo.com/support/jw-player/28834/migrating-from-jw5-to-jw6

JW Player

User  
0 rated :

I don't believe that has effects the issue I removed the 'controlbar': 'bottom' stuff I accidentally left that in. I changed the js code to the following. I also noticed the bottom video (which works in FF and Chrome) doesn't play in IE9 but I think I have seen other post about that issue.

bc.. $(document).ready(function(){
jwplayer("jwplayer").setup({
file: "http://test.ammkwed.com/getAttachment.php?attachid=2",
width: 720,
height: 420,
controls: true

}
);
jwplayer("jwplayer1").setup({
file:"Wildlife.mp4",
width: 720,
height: 420,
controls: true
}
);

});

Ethan Feldman

JW Player Support Agent  
0 rated :

Where is this code running?

JW Player

User  
0 rated :

My test page is http://test.ammkwed.com/view.php (use chrome because the video is H.264 and the won't work in FireFox)

Ethan Feldman

JW Player Support Agent  
0 rated :

This works fine, there is no invalid key error for me, in Chrome.

JW Player

User  
0 rated :

I'm having the same issue. Is there a delay between purchasing the Key and it becoming active?

I prototyped using the Free version, and everything was working fine. Once we purchased the license and put in the paid version, it stopped working and the "Invalid License Key" message comes up.

Can you review this issue and let us know what the problem is? Thanks.

JW Player

User  
0 rated :

I too am having issues with the license key.

I am getting the same error.

Ethan Feldman

JW Player Support Agent  
0 rated :

Guys, do you have links to the issues you are having? You need to make sure to use the right key for the right version of the player you are using, as well as the right edition of the player.

JW Player

User  
0 rated :

I am running into this issue as well, once I put in the key, I get:

"Error setting up player: Invalid license key"

This is the first time I'm using this so there isn't any version issues.

Now I just purchased, so I'm wondering if there is a delay on becoming active as well. I will in the morning if everything is good to go.

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have a link?

JW Player

User  
0 rated :

I'm working in a test environment. We have a live site out there on a different server. I can put a URL to it, but I would have to know when because since my test environment is behind a firewall, I cannot view the site while on the network. If you can give me a time you will be looking at it, I can set that URL for you to view.

I copied the key directly from the wizard and double checked with my account. I can post the code if you want to see it that way, let me know, thanks.

Ethan Feldman

JW Player Support Agent  
0 rated :

Please put up a test page if possible….

JW Player

User  
0 rated :

Hi. Using Aaron's test page ( http://test.ammkwed.com/view.php ):
- JwPlayer 6
- Using only HTML5 mode
- Using config:file with a full URL for the mp4 file

... I can reproduce the same issue I'm having here: The second player on the test page doesn't work and I receive the message "No playable sources found". (tested on Chrome and IE10).

The only difference is that I'm using .m3u8 file (from Wowza):
http://localtest.me:1935/vod/mp4:sample.mp4/playlist.m3u8 (I can download the .m3u8 file direct from the browser)

There is no way I can make html5 mode work with a full URL.

Ethan Feldman

JW Player Support Agent  
0 rated :

Under:

file: “http://test.ammkwed.com/getAttachment.php?attachid=2”,

Add:

type: “mp4”,

JW Player

User  
0 rated :

Hi Ethan.

I added the type:mp4 and tried with Aaron's mp4 link (http://test.ammkwed.com/getAttachment.php?attachid=2) and my .m3u8 file as well...

...but still got the same error.

bc.. jwplayer("container").setup({
height: 270,
width: 480,
modes: [
{
type: 'html5',
config: { file: 'http://test.ammkwed.com/getAttachment.php?attachid=2', type: 'mp4' }
}
]
});


Ethan Feldman

JW Player Support Agent  
0 rated :

Modes is a V5 only option…

http://www.longtailvideo.com/support/jw-player/28834/migrating-from-jw5-to-jw6

This question has received the maximum number of answers.