I don't know what I do wrong but basically. CORS is more than rocket science to me. I tried to make it work with PostMessage but it worked only for Chrome so I gave up on it too. Microsoft Edge did not respond to the eval of the code and Firefox dropped a notice
Only in german the error message of firefox.
Anfrage für Vollbildmodus wurde abgelehnt, weil Element.mozRequestFullScreen() nicht aus einem kurz laufenden Benutzer-generierten Ereignis-Handler aufgerufen wurde.
What I want to do:
Send the "SetFullscreen(1);" Function to an iframe to make it work. The iframe is hosted on a https sub-domain of my site
http://www.spiele-umsonst.de/zombie-derby-2-t6058.html The Full-Screen Button above the game
should execute the same way it would onthe iframe. Simple as that..
https://gameshtml5.spiele-umsonst.de/unitywebgl/zombiederby2/ The iframe has a unity-fullscreen function which can be called SetFullscreen(1);. But I want to call this function on my own button on the parent page.
My faboulous header that I thought would work for the https site:
Access-Control-Allow-Methods PUT, GET, POST, DELETE, OPTIONS
Access-Control-Allow-Origin *.spiele-umsonst.de
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers origin, x-requested-with, content-type
zombie-derby-2-t6058.html:589 Uncaught DOMException: Blocked a frame with origin "http://www.spiele-umsonst.de" from accessing a cross-origin frame. at fullscreen (http://www.spiele-umsonst.de/zombie-derby-2-t6058.html:589:48) at HTMLDivElement.onclick (http://www.spiele-umsonst.de/zombie-derby-2-t6058.html:418:199)