Youtube IFrame API Untrusted Origin

人盡茶涼 提交于 2019-12-20 09:19:29

问题


I'm using the IFrame API as the title suggests. I have been following the guide in the API Reference. It works for me however I have found a few warnings that occur and would like to solve them. They are:

Untrusted origin: https://www.youtube.com

and

Untrusted origin: chrome-extension://boadgeojelhgndaghljhdicfkmllpafd

both of which originate from www-embed-player.js:331

Through my research I have found that the second one happens because it constantly polls for the chromecast extension (kinda weird but its google). If I disable the chromecast extension that warning becomes errors such as:

GET chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js net::ERR_FAILED

from www-embed-player.js:163

I have tried adding the enablejsapi and origin parameters mentioned with no change in luck.

I have also tried adding the IFrame directly as mentioned in Loading a Video Player which didn't remove the untrusted origin errors, and also broke my javascript functionality.

Thank you


回答1:


The error has been acknowledged by Google:

https://code.google.com/p/google-cast-sdk/issues/detail?id=309

This is per design; in order to know if a user has the Chromecast extension installed (and which one), cast_sender.js requests the script from all potentially installed extensions.

This question has also been answered here: https://stackoverflow.com/a/26095117/1007392

Best, Sam



来源:https://stackoverflow.com/questions/28774205/youtube-iframe-api-untrusted-origin

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