Youtube API 错误 - 无法在“DOMWindow"上执行“postMessage": [英] Youtube API error - Failed to execute 'postMessage' on 'DOMWindow':
问题描述
未能在 'DOMWindow' 上执行 'postMessage':提供的目标来源 ('https://www.youtube.com') 与收件人窗口的来源不匹配 ('https://my-site.ru').
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('https://my-site.ru').
Nginx 在服务器上.当然还有https!
Nginx is on the sever. And of course there is a https!
但是我遇到了这个错误...只有在 Google Chrome 视频没有启动时,Firefox 显示一切正常(和 Edge)!
But I got this error... and only in Google Chrome video didn`t start, Firefox shows all right (and Edge)!
推荐答案
哇,奇怪的错误,visibility = hidden"是一个原因.确保在启动播放器之前显示播放容器(与其父容器一样).
Wow, strange error, "visibility = hidden" is a reason. Be sure that the playback container (like its parents) is displayed before starting the player.
这篇关于Youtube API 错误 - 无法在“DOMWindow"上执行“postMessage":的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!