vimeo / vimeo-unity-sdk

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

Cross domain Exception #118

Open thesys opened 4 years ago

thesys commented 4 years ago

I'm having troubles playing private videos on my WebGL deploy. I have a Vimeo Pro account and this works fine in other platforms. I get an error similar to this "Access to video at 'https://vimeo-prod-skyfire-std-us.storage.googleapis.com/XXXXX' from origin 'XXX_WHATEVER_ORIGIN' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource"

To reproduce I just have to play any private video from my account in a webgl deploy

Unity 2018.3.7f1

Tested in Chrome using windows 10

thylaxene commented 4 years ago

Yep get this as well for our Pro account!

chrispop commented 4 years ago

Hello, I have the same problem. Did you solve this?

iheartblob commented 4 years ago

Did you manage to solve this?

thesys commented 4 years ago

Did you manage to solve this?

Hello, I have the same problem. Did you solve this?

Unfortunately, nope. Nada

ghost commented 4 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

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)

If you are not using AVPRO then you will not be able to play the videos on Webgl because Unity Media player does not support adaptive resolution.

If you don't select adaptive resolution vimeo will not return .m3u8 (hls.js) or .mpd (dash.js) and you will get playback error.