杰米收到了这个答案。谢谢你,杰米:
https://code.google.com/p/gdata-issues/issues/detail?id=4887
我更改了名为 loadPlayer 的函数。以前,该函数如下所示:
// The "main method" of this sample. Called when someone clicks "Run".
function loadPlayer() {
// Lets Flash from another domain call JavaScript
var params = { allowScriptAccess: "always", wmode: "transparent" };
// The element id of the Flash embed
var atts = { id: "ytPlayer" };
// All of the magic handled by SWFObject (http://code.google.com/p/swfobject/)
swfobject.embedSWF("http://www.youtube.com/apiplayer?" +
"&enablejsapi=1&playerapiid=player1",
}
正如论坛底部的评论所述,版本号必须作为 url 中的参数传递。因此,更改此行:
swfobject.embedSWF("http://www.youtube.com/apiplayer?" +
到:
swfobject.embedSWF("http://www.youtube.com/apiplayer?version=3" +
解决了这个问题。