SamirHodzic / ngx-embed-video

Get embed code for embedding youtube/vimeo/dailymotion/* video in websites from URL or ID in Angular 6+.
MIT License
56 stars 41 forks source link

Vimeo CORS policy blocking embed_image request. #34

Open pyrextor opened 5 years ago

pyrextor commented 5 years ago

I get this error when trying to use embed_image to get any Vimeo thumbnail: Access to XMLHttpRequest at 'https://vimeo.com/api/v2/video/76979871.json' from origin 'http://localhost:4040' has been blocked by CORS policy: Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response.

With just this code:

this.embedService.embed_image(video, { image: 'thumbnail_medium' }).then(res => { console.log(res); });

'video' is a variable containing the video url.

This is just one of the videos I tried: https://vimeo.com/10549781