Questions tagged «youtube-iframe-api»

19
无法在“ DOMWindow”上执行“ postMessage”:https://www.youtube.com!== http:// localhost:9000
这是我收到的错误消息: Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://localhost:9000'). 我还看到了其他类似的问题,其中目标的原点是http://www.youtube.com和接收者的原点是https://www.youtube.com,而我的目标https://www.youtube.com和目标的原点是http://localhost:9000。 我没问题。问题是什么? 我该如何解决?

4
未捕获的ReferenceError:未定义ytcfg(也未定义__ytRIL)
我使用YouTube IFrame Player API已有数月没有问题,并且最近在播放器加载时开始出现此异常: Uncaught ReferenceError: ytcfg is not defined 检查iframe,我看到对的成功调用yt.setConfig,但ytcfg.set稍后失败。API最近更改了吗?任何播放器参数都可能导致此问题? <script src="//s.ytimg.com/yts/jsbin/www-embed-player-vflnzmqns/www-embed-player.js" type="text/javascript" name="www-embed-player/www-embed-player"></script> <script src="//s.ytimg.com/yts/jsbin/player-en_US-vflr--npw/base.js" name="player/base"></script> <script> yt.setConfig({ ... }); writeEmbed(); </script> <script> ytcsi.info('st', 35); ytcfg.set({ "TIMING_ACTION": "", "CSI_VIEWPORT": true, "TIMING_INFO": { "c": "WEB", "yt_li": 1, "cver": "1.20161112", "yt_lt": "cold" }, "CSI_SERVICE_NAME": "youtube" }); ;</script> 此问题有几种变体: https://issuetracker.google.com/issues/35178202 “未定义ytcfg” …

12
YouTube:如何显示静音的嵌入视频
我正在尝试嵌入声音静音的视频,但无法弄清楚它是如何工作的。 目前,我正在使用此功能,但无法正常工作: <iframe src="https://www.youtube.com/embed/uNRGWVJ10gQ?rel=0&autoplay=1" width="560" height="315" frameborder="0" allowfullscreen></iframe> 你们谁都知道我该怎么做?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.