
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 https://support.jwplayer.com/customer/portal/articles/1406725-youtube-video-embed.
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>
<html>
<head>
<script src="jwplayer-7.5.0/jwplayer-7.5.0/jwplayer.js"></script>
<script>jwplayer.key="dVRGLx66IjktdMQDkDUP2pDGdROGig9o1k4C9A==";</script>
</head>
<body>
<div id="myElement"></div>
<script type="text/javascript">
var playerInstance = jwplayer("myElement");
playerInstance.setup({
file: "//www.youtube.com/watch?v=bKttENbsoyk",
width: 640,
height: 360
});
</script>
</body>
</html>
The path to jwplayer.js is okay, I checked.
I would really appreciate any hints on what might be the problem.