IntersectionObserver Error when embedding a YouTube video in an iframe [closed]

扶醉桌前 提交于 2019-12-05 04:23:44

问题


I am building a Chrome Extension. I'm having difficulty embedding a YouTube video using an iframe. Up until recently, everything worked fine, but, as of lately, I am not able to play the video anymore. I am getting the following error:

Uncaught Error: Failed to construct 'IntersectionObserver': Unable to get root node in main frame to track.
at new IZ (https://www.youtube.com/yts/jsbin/player-en_GB-vflW62qlm/base.js:3707:122)
at new c2 (https://www.youtube.com/yts/jsbin/player-en_GB-vflW62qlm/base.js:3991:112)
at c2.create (https://www.youtube.com/yts/jsbin/player-en_GB-vflW62qlm/base.js:6988:333)
at Gi.<anonymous> (https://www.youtube.com/yts/jsbin/www-embed-player-vfl-i_LLs/www-embed-player.js:507:269)
at Gi.l.jb (https://www.youtube.com/yts/jsbin/www-embed-player-vfl-i_LLs/www-embed-player.js:507:308)
at Ki (https://www.youtube.com/yts/jsbin/www-embed-player-vfl-i_LLs/www-embed-player.js:505:143)
at Gi.l.oa (https://www.youtube.com/yts/jsbin/www-embed-player-vfl-i_LLs/www-embed-player.js:498:176)
at https://www.youtube.com/yts/jsbin/www-embed-player-vfl-i_LLs/www-embed-player.js:557:378

Chrome bug maybe? Can anything be done to tackle the issue? I checked the window object and IntersectionObserver exists, so I am quite curious as to why this might be happening.

来源:https://stackoverflow.com/questions/42496144/intersectionobserver-error-when-embedding-a-youtube-video-in-an-iframe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!