I cant make youtube videos play
this is my code
$(document).ready(function(){
jwplayer("myDiv").setup({
file: "https://www.youtube.com/watch?v=oDPtMh-mpDw",
image: "images/P1090566.JPG",
height: 360,
width: "100%",
aspectratio: "16:9",
controls:false
});
jwplayer().onReady(function(e) {
jwplayer("myDiv").play();
});
});
I have tried JW player 6 and 7
i have tried changeing the aspec ratio property to a fixed height
i have tried the youtube link without https:
every single time i get a long pause and then the following error appears in the console
Failed to load resource: net::ERR_FILE_NOT_FOUND - file://www.youtube.com/iframe_api
↧