用javascript控制 youtube动画,直接打开html会失败

必须上传到服务器之后才可以运行。
好像是flash的安全限制
http://stackoverflow.com/questions/2083128/youtube-api-not-firing-onyoutubeplayerready

You need to be on a web server with your test script, as stated in the documentation:
Note: To test any of these calls, you must have your file running on a webserver, as the Flash player
restricts calls between local files and the internet.

posted @ 2012-06-28 17:40  johnsonshu  阅读(140)  评论(0编辑  收藏  举报