extension controlling Crynchyroll video

I’m creating a chrome extension where i can control the html5 video on a page.

It works fine for Youtube and Vimeo but i’m having trouble for Crunchyroll.

Crunchyroll apparently has their video inside of an iframe. So i cant seem to access it without running into cross-origin errors.

Would need to be able to do basic video controlling like play, pause, see and set current time etc.

Extensions do exist for Crunchyroll so it has to be possible somehow.
Cant seem to find a solution, most forums and stuff just get the html5 video the regular way.
But that does not work. Either everybody is wrong, Crunchy just changed or I’m missing something.

possible solutions:

  • can i inject a script into the iframe too, like my extension is injecting into the main tab content now?
  • are their custom controls that are available for Crunchyroll?

tried the regular way:

html5player = document.querySelector('video');

nothing found

tried connecting to the iframe:

var iframe = document.querySelector('iframe'),video;
if (iframe) {
  html5player = iframe.contentWindow.document.getElementsByTagName('video');
}

this will get you a cross-origin error