2013-11-27 72 views
0

我做錯了什麼? YouTube播放器替換了#播放器元素,但不會調用onYouTubePlayerReadyonYouTubePlayerReady未被swfobject加載後調用

window.onYouTubePlayerReady = function() { 
    alert('success!'); 
    console.log('yt player loaded!', arguments); 
} 

window.onload = function() { 
    swfobject.embedSWF('http://www.youtube.com/v/S57AWoY6zDQ?version=3&enablejsapi=1', 
    'player', 800, 600, '8', null, null, 
    { allowScriptAccess: true }, { id: 'myYTplayer' }); 
}; 

現場代碼:http://jsfiddle.net/patricklorio/GyMN5/

回答

0

​​應該{ allowScriptAccess: 'always' }

相關問題