Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
这些函数需要在全局范围内定义。
http://jsbin.com/umituf/3
编辑澄清:
youtube api 脚本在全局范围内查找这些特定函数。 api 脚本无权访问在 document.ready 回调中创建的范围。
The functions need to be defined in the global scope.
http://jsbin.com/umituf/3
Edit for clarification:
The youtube api script looks for those particular functions on the global scope. The api script does not have access to the scope that is created within the document.ready callback.
youtube api js 代码,您附加到页面,使用全局上下文。你可以把你的代码放入
但最后你必须写这个(*)字符串。
此后 onYouTubeIframeAPIReady 函数将能够从全局上下文中
youtube api js-code, that you attach to page, use global context. You can put your code into
But in the end you must write this (*) string.
After this onYouTubeIframeAPIReady function will be able from global context