How can I load a video from url (outside playcanvas)?

I 've already load and display a video from an asset url that it’s inside playcanvas, but how can I load and display a video or image that it’s outside playcanvas?

Let’s say that y url will be from youtube or amazon url.
I guess I can do it with pure JS but I don’t know if there another way to do this in playcanvas due to it has an option to load assets from url.

I think there are a few posts around here related to playing videos. Try searching the forum. Here is one, for example:

1 Like

Hi @Axel_Saucedo,

If we are talking of the Video Textures tutorial, it’s pretty easy, just change line 32 with your remote url:

    // set video source
    //video.src = this.video.getFileUrl();
    video.src = 'https://my.remote/video/url.mp4';

Just make sure your server has CORS enabled.

https://playcanvas.com/editor/scene/440131

3 Likes