mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Working!
This commit is contained in:
@@ -237,12 +237,14 @@ var Youtube = {
|
||||
},
|
||||
|
||||
loadPlayer: function() {
|
||||
console.log(ytplayer);
|
||||
console.log("load the player");
|
||||
if($(document.getElementsByTagName('script')[0]).attr("src") == "https://www.youtube.com/iframe_api"){
|
||||
Youtube.onYouTubeIframeAPIReady();
|
||||
}else{
|
||||
tag = document.createElement('script');
|
||||
tag.src = "https://www.youtube.com/iframe_api";
|
||||
firstScriptTag = document.getElementsByTagName('script')[0];
|
||||
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user