Download Youtube thumbnail CORS work around?

I am currently getting CORS blocked from youtube when I want to get the thumbnail
Is there any way to get past this in our playcanvas editor?

Hey @Joshua_Blow, the CORS issue is to do with YouTube itself, and not the PlayCanvas editor. Refer to this article to see how you can work around CORS - https://medium.com/netscape/hacking-it-out-when-cors-wont-let-you-be-great-35f6206cc646

Check this article to see how you can get the thumbnail from a video - https://www.google.com/amp/s/devdojo.com/amp/tnylea/how-to-get-youtube-thumbnail-images

The corsheroku way I run into a limit issue. I will have to give the other way a shot maybe, just have to port it to javascript

So on the network tab its at 206 which seems to be partial content


Just an addition @Joshua_Blow, YouTube does have an official API for this - https://developers.google.com/youtube/v3/quickstart/js. As long as you have a valid key, this should work for your case.

1 Like

have tried it with a no CORS proxy, but thats only workign the editor and not in a launched build …
CORS - work around

1 Like