Vimeo Video player integration

Hello everyone!!

I know we can play video using video tag. but this time my requirement is play video securely and I think vimeo provide some good functionalities like domain restriction and password locking.So that’s reason, I want to use vimeo.

Embedding vimeo on site creates a Iframe which will integrate their player on our website. A video tag is also their in that Iframe. I even tried getting the element and It shows permission error.

So, I am asking is their anyway I can use that video tag to play video inside playcanvas in 3d space and apart from this is their any possible way to play vimeo video inside 3d space.

thanks!!

This is outside my scope but I would suspect that you somehow need to get hold of the video buffer based on the m4a file from Vimeo and pipe that data into a texture.

There’s an open source project called youtube-dl that can download videos from Vimeo which may give some clues on how to do this.

Edit: See Leonidas reply below. Didn’t realise Vimeo has an API for this.

Hi @Shubham_D,

If you search around you may find a number of ways to get a direct link to the streamed video. But sooner or later Vimeo will most likely block your ip when doing so.

The official way is to use their API which is available in PRO (paid) accounts. Then you can use the following sample to render the video on a 3D model:

https://developer.playcanvas.com/en/tutorials/video-textures/

1 Like

I’m using vimeo paid account only.

Right now, I’m using Iframe only. To place it accurately i’m using 3d objects and then converting those objects position to the 2D screen space points and then create a div of required height and width. In that div I am opening Iframe at width 100% and height 100%.

One more question Is their any limitation on how much videos I can run on same page and then render them on different meshes??

If they are different videos, it be related to the number of videos that the browser/phone can handle and also the amount of memory each video texture takes. Unfortunately I don’t have hard numbers so it would need profiling with the browser devtools.