vimeo / vimeo-unity-sdk

Easily stream your Vimeo videos into Unity or record and publish out to Vimeo.
MIT License
211 stars 49 forks source link

Does not work in WebGL #121

Open josenunes85 opened 3 years ago

josenunes85 commented 3 years ago

Library does not work in WebGL deploys due to a problema with Access control allow origin header, which is missing from Vimeo response.

Install vimeo-unity-sdk, run an example or develop your own. You won't be able to play the video. It works in other platforms and Editor. I have changed the request a bit, to get preview images and this particular feature works, though.

I'm using Unity 2018.3.7f.

iheartblob commented 3 years ago

Hey @josenunes85 did you manage to get it to work in webGL?

Zamaroht commented 3 years ago

We recently upgraded to a pro account but are having this same issue.

iheartblob commented 3 years ago

We did the exact same. I haven't found any solutions online and when I contacted Vimeo for support they basically just redirected me back to github to file an issue despite it not being updated in over a year. My best guess is that the requests have changed in the vimeo api and they need updated but haven't had the time to check it out yet. I tried configuring the cors on aws but didn't help either but If anyone find out anything I'd love to know if there is some fix or even another solution for smoothly streaming video URL's in Unity webGL

josenunes85 commented 3 years ago

Same here. I'd love a solution. Right now, on WebGL I'm just building and opening video on a new tab whilst it is ok in other platforms - this is the way to make it work at least.

iheartblob commented 3 years ago

Same here. I'd love a solution. Right now, on WebGL I'm just building and opening video on a new tab whilst it is ok in other platforms - this is the way to make it work at least.

You're just opening the web link and leaving your game? I'm hoping to have the vimeo links embedded in our game

josenunes85 commented 3 years ago

Yes. For my game it doesn't matter much if the video is displayed inside or not. But of course, ideally, this should work as in other platforms. Still waiting ...

iheartblob notifications@github.com escreveu no dia sexta, 24/07/2020 à(s) 13:04:

Same here. I'd love a solution. Right now, on WebGL I'm just building and opening video on a new tab whilst it is ok in other platforms - this is the way to make it work at least.

You're just opening the web link and leaving your game? I'm hoping to have the vimeo links embedded in our game

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vimeo/vimeo-unity-sdk/issues/121#issuecomment-663505946, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHUKOQO7J32EBBCMIPP7ETR5F2EZANCNFSM4OWP3LDA .

ghost commented 3 years ago

I chased Vimeo support.

Part of my message to them:

This appears to be a problem on Vimeo's side in relation to the server's CORS policy. [I may be wrong but] it would be out of control of the Vimeo-Unity-SDK client.

There are plenty of unclosed issues in the Vimeo-Unity-SDK relating to the issue I am facing: https://github.com/vimeo/vimeo-unity-sdk/issues?q=CORS

And this is Vimeo's official response:

Taylor T. (Vimeo Support) Aug 4, 2020, 5:36 PM EDT

Hi, Understood. We're aware of this issue, however we cannot provide any ETA for a potential fix or any changes. Our apologies for any inconvenience this causes you! 

Sincerely, Taylor T. Specialist, Vimeo Developer API + Apps

BenjaminKeating1986 commented 3 years ago

Basically they will fix this for there enterprise customers and us small fish can just do one and that i am guessing is why we have not seen a fix :)

epicoro commented 3 years ago

If you are using AVPRO make sure you select adaptive resolution and for the vimeo token, do not generate it from "Get Token" button because you will get CORS issue. Instead go to https://developer.vimeo.com/ and create a new app, and then you can generate a API token and insert it into Unity. This will fix the CORS issue and you will be able to play the videos from Webgl. Make sure to setup AVPRO (hls.js or dash.js)