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

YouTube embed not working

I'm trying to embed a youtube video using self-hosted jwplayer (hosted in my own pc).
I'm following this tutorial
The player loads, but there's no preview image, when you try to play it, it never stops loading and when you stop it the following error appears: "Y is null". Firefox and Chrome same result.
Here's the code:

<!DOCTYPE html>
​<script src="jwplayer-7.5.0/jwplayer-7.5.0/jwplayer.js"></script>
<div id="myElement"></div>
<script type="text/javascript">
var playerInstance = jwplayer("myElement");
file: "//",
width: 640,
height: 360

The path to jwplayer.js is okay, I checked.
I would really appreciate any hints on what might be the problem.

1 Community Answers


JW Player Support Agent  
0 rated :

Hi there,

YouTube has made some changes on their end that now requires at least the YouTube URLs to be secure (i.e. I would recommend trying to specify the URL using the https protocol.

Also, currently poster images from YouTube are not coming through their API. Our Engineers are currently looking into why this is the case, but as a workaround, you can specify your own poster image by including a path to an image in the image configuration option in your setup.

Please let me know if you need any more help or have any other questions.

Thank you!

This question has received the maximum number of answers.