【发布时间】:2018-11-24 05:34:13
【问题描述】:
在“DOMWindow”上执行“postMessage”失败:提供的目标源(“https://www.youtube.com”)与接收窗口的源(“https://my-site.ru”)不匹配。
Nginx 在服务器上。当然还有https!
但是我收到了这个错误...只有在 Google Chrome 视频没有启动时,Firefox 显示正常(和 Edge)!
【问题讨论】:
标签: youtube
在“DOMWindow”上执行“postMessage”失败:提供的目标源(“https://www.youtube.com”)与接收窗口的源(“https://my-site.ru”)不匹配。
Nginx 在服务器上。当然还有https!
但是我收到了这个错误...只有在 Google Chrome 视频没有启动时,Firefox 显示正常(和 Edge)!
【问题讨论】:
标签: youtube
哇,奇怪的错误,“可见性=隐藏”是一个原因。 确保在启动播放器之前显示播放容器(与其父容器一样)。
【讨论】:
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('<URL>') does not match the recipient window's origin ('<URL>').
我们在 visibility = hidden 时遇到了同样的问题,我们能够通过使用 CSS opacity 0 实现几乎相同的技巧。
【讨论】: