Youtube IFrame API Untrusted Origin

iframe, javascript, youtube

Solution

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

Problem

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

Original source

Related problems