javascript - YouTube iframe_api Google 示例不再有效

标签 javascript html youtube

<分区>

我正在尝试 Getting Started 中的示例它不适用于任何浏览器。我不完全确定,但我相信它在几天前就起作用了。有没有可能他们改变了 http://www.youtube.com/iframe_api 里的东西?

Internet Explorer 提供:

Array.prototype.forEach: 'this' is null or undefined

Google Chrome给出几个:

  1. Unable to post message to http://www.youtube.com. Recipient has origin http://mylocalmachine.com:55495. www-widgetapi-vfljlXsRD.js:22
  2. Blocked a frame with origin "http://www.youtube.com" from accessing a frame with origin "http://mylocalmachine.com:55495". Protocols, domains, and ports must match.
  3. Uncaught TypeError: Array.prototype.forEach called on null or undefined www-widgetapi-vfljlXsRD.js:5
  4. Uncaught TypeError: Object # has no method 'playVideo'

最佳答案

看起来 YouTube 已经意识到了这个问题。来自 https://code.google.com/p/gdata-issues/issues/detail?id=4706 :

The engineering team has identified an issue that is preventing the iframe API from functioning at the moment. They have traced the root cause to a disruption caused by an ongoing server-side push, and once that push is fully complete, the JavaScript errors should completely subside. It will likely be several more hours before the push is complete, unfortunately.

This is not expected to be a regular occurrence, and we apologize for the inconvenience caused by this outage.

根据他们的消息,听起来它应该尽快恢复运行。

关于javascript - YouTube iframe_api Google 示例不再有效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17075802/

相关文章:

javascript - 按字母顺序排列数组时如何忽略单词 "the"?

带有html代码的变量中的php代码

javascript - 追加一个元素,同时获取父元素的 id

android - InAppBrowser 不会在 ionic 全屏模式下播放 Youtube 视频

youtube - 如何通过API获取有关YouTube视频的评论

curl - 为什么 Curl 会忽略给定的范围?

javascript - 偏移平滑滚动 Bootstrap JS

javascript - Pines Notify 关闭通知和堆栈

javascript - Plotly.js - gd.data 必须是一个数组

javascript - 如何通过网站在 IOS 设备上录制音频