Closed rchrdkn closed 1 year ago
Not sure ReactPlayer is willing to change oEmbed API, they can host Playerx oEmbed themselves too on a free tier. Or if it's possible to add a oEmbedUrl API property or something. https://github.com/playerxo/oembed#purge-cached-resource
I think this is also a problem if you ever fetch a private video: noembed will cache the {"error":"404 Not Found","url":"https://vimeo.com/647024531"}
so you won't be able to retrieve the info even if you turn it public later. So... +1
It’s worth noting that ReactPlayer lets you pass your own thumbnail URL, fetched from wherever you like, as the light
prop.
<ReactPlayer
url={myVimeoUrl}
light={myFetchedImageUrl}
/>
We're using ReactPlayer for a project which uses noembed.com to fetch video thumbnails for embeds. Vimeo have recently updated the urls for their video thumbnails within their oembed api and the previous urls no longer work.
I can see that you're using fastly for caching responses, and from the below snippet responses are being cached for 100 days.
https://github.com/leedo/noembed/blob/5a05fa5ee8cdc33760e87d3e931123389fe6619b/lib/Noembed/App.pm#L135
This is causing us to get the old thumbnail urls back from the noembed embed request, the
Age
header is currently ~25 days so won't be refreshed for over 2 months - examples belowNew Vimeo: https://vimeo.com/api/oembed.json?url=https://vimeo.com/352941231
Noembed: https://noembed.com/embed?url=https://vimeo.com/352941231
Is it possible to purge the cache for Vimeo embeds?
Thanks