vimeo-unity-sdk icon indicating copy to clipboard operation
vimeo-unity-sdk copied to clipboard

Cross domain Exception

Open thesys opened this issue 4 years ago • 6 comments

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

thesys avatar May 07 '20 15:05 thesys

Yep get this as well for our Pro account!

thylaxene avatar May 13 '20 05:05 thylaxene

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

chrispop avatar Jul 14 '20 16:07 chrispop

Did you manage to solve this?

iheartblob avatar Jul 24 '20 12:07 iheartblob

Did you manage to solve this?

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

Unfortunately, nope. Nada

thesys avatar Jul 24 '20 12:07 thesys

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

ghost avatar Aug 05 '20 09:08 ghost

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.

epicoro avatar Mar 20 '21 20:03 epicoro