Add iframe Video on UI

Hi everyone, i’m trying to configure a 2D canvas with a iframe video

I tried the examples, but I only got success in 3d objects, when i try the iframe video on the UI the element get gray, and nothing happens, and this only happens when I set the the “world” layer on it, like said in this post:

this is the demo that i’m using for to try this:

Another workaround for this issue would be to render 3D to UI:
Example: PlayCanvas 3D HTML5 Game Engine

If it’s going to be in UI (2D), you may as well actually use an iframe and add it to the DOM instead in front of the PlayCanvas canvas.


Thanks for the answers!

But is there no way to use the iframe video on the canvas?

I tested with DOM (if i’m not wrong, DOM is CSS + HTML, right?) and works fine too! but pop up a new screen, and is hard to implement inside the Canvas, but I think it will work for now

It’s mostly likely doable (we don’t have an example kicking around) but it’s not going to be much better than adding the iframe on top of the canvas.

1 Like