0

There is a website that embeds youtube videos - Using the normal youtube iframe api. Now, according to the youtube iframe api:

The IFrame player API lets you embed a YouTube video player on your website and control the player using JavaScript. Using the API's JavaScript functions, you can queue videos for playback; play, pause, or stop those videos; adjust the player volume; or retrieve information about the video being played.

However, what I want is my Chrome extension to control this video on a third party website. Right now, this throws CORS errors. Is there a way to fix it?

Or is this “impossible” to do? Right now, we’ve tried everything.

Thanks

*Note: right now I can achieve the correct behavior on YouTube’s site. However, I cannot achieve this same behavior on a third party site with youtube video embedded as an iframe.

Carlos F
  • 773
  • 8
  • 23
  • I think it's not possible. check this link https://stackoverflow.com/questions/25098021/securityerror-blocked-a-frame-with-origin-from-accessing-a-cross-origin-frame – Arib Yousuf Nov 12 '20 at 09:00
  • I understand that this would ordinarily be a security error, but this is a chrome extension that the user has willingly installed in his chrome browser. The chrome extension works on youtube; just not on youtube embedded on another website. – Carlos F Nov 12 '20 at 09:53

0 Answers0