Greetings everyone,
Issue:
iframe isn’t receiving messages from parent. This works fine from Launch/Debug but not when published.
Location:
The scene “0 - Published Showcase”, which is what was published. Works from Editor, but not when published at https://playcanvas.com/project/873970/overview/webxrpress-library
Background:
This is for my Open Source Metaverse project. One of the essentials is rendering a live console. I’m doing this with a template entity called “Billboard” that renders html assets in 3D space. There were several hurdles to do this; i.e. html2canvas was too slow, so I went with much faster Microsoft’s html-to-image, but rendering in the main thread was still causing controllers to freeze/hiccup, so I’m using an iframe to an external asset (basically a blank HTML page that includes jQuery to pipe in the HTML asset from playcanvas). I needed to do this multi-threaded and yet with access to a DOM for rendering. WebWorkers is too immature for this (no DOM) but since most modern browsers, including Oculus Quest’s native browser supports iframes in a separate thread; I get multi-threaded benefits with HTML DOM rendering recipes! But this only works in editor but not in published works.
Any ideas? This is opposite problem I was having prior; as I know there are security issues I’ve already overcome with XFrame in Editor mode (hence the external asset) but things were working in published before (or so I thought). iframe messaging is needed to pull this off; but I guess one work around could be a local websocket-to-websocket between iframes? If that is indeed the issue. But for the life of me, I can’t tell.
Turning this over to the experts that might be able to throw a hint to shed some light on this one. Any ideas greatly appreciated!