onReady not being called
问题 var player = null; function LoadYouTubeIframeAPI() { var scriptElement = document.createElement("script"); scriptElement.src = "http://www.youtube.com/iframe_api"; var firstScriptElement = document.getElementsByTagName("script")[0]; firstScriptElement.parentNode.insertBefore(scriptElement, firstScriptElement); } function onYouTubeIframeAPIReady() { var playerParams = { playerVars: { "enablejsapi": 1, "origin": document.domain, "rel": 0 }, events: { "onReady": onPlayerReady, "onError":