Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The current API (http://vimeo.com/api/oembed) no longer supports thumbnails for private video's.
If a video’s privacy is set to anything other than public, private or password protected, only the embed code, width, and height will be returned.
source: https://developer.vimeo.com/apis/oembed
This would require the new API (developer.vimeo.com/api). See documentation on https://developer.vimeo.com/api/start
So the new API with keys and a token is needed to get a video thumbnail for private video's (https://api.vimeo.com/videos/{video_id}).
Comment | File | Size | Author |
---|---|---|---|
#14 | 2862500-14.d9.video_embed_field-private_vimeo_thumbnails_missing.patch | 1.36 KB | jrb |
#5 | video_embed_field-private_vimeo_thumbnails_missing_2862500.patch | 711 bytes | nimoatwoodway |
#3 | vimeo-response.png | 54.73 KB | davps |
Comments
Comment #2
AndrewsizZ CreditAttribution: AndrewsizZ as a volunteer and at Bright Solutions GmbH for Bright Solutions GmbH commenteddid someone found any solution?
Comment #3
davps CreditAttribution: davps as a volunteer and at DrupalJedi commented@AndrewsizZ
Still supports and works.
Request:
https://vimeo.com/api/oembed.json?url=https://player.vimeo.com/video/vid...
Response:
Check function _video_embed_field_get_vimeo_data in D7 version.
Comment #4
Joachim NamysloI am not sure if this is the right place to comment on, but if thumbnail generation just works with public videos on vimeo it should be documented somewhere in the meantime.
something like
As long as this is the only workaround it should be at least documented in the read me file as well on the modules page or in documentation as well as drupal's help system.
This bug is still active for 8.x, too so I'll create a new one with the same content.
Comment #5
nimoatwoodwayIt's now possible to get meta data such as thumb url when vimeo video is private.
See API description (https://developer.vimeo.com/api/oembed/videos)
So if we set the Referer and the domain we are using is whitelisted in privacy settings this will start working again.
Find patch attached.
Comment #6
sakiland CreditAttribution: sakiland as a volunteer commentedThank you @nimoatwoodway
Patch #5 works for me.
This is not the best solution, better will be to implement new Vimeo's API, but it's fastest solution for this issue.
Comment #7
joelstein CreditAttribution: joelstein commentedAgreed; the patch in #5 works by adding the "Referer" header. But the thumbnail is small, and we could get higher resolution thumbnails by using Vimeo's API:
https://developer.vimeo.com/api/reference/videos#get_video_thumbnails
Though, that should probably happen in a separate issue.
Comment #8
joelstein CreditAttribution: joelstein commentedI created an issue to use the Vimeo API (rather than oEmbed) which would resolve this issue as well.
#3105171: Use Vimeo API to get thumbnails
Comment #9
Joachim Namyslo@joelstein
Sounds great to me. Thank you.
Comment #10
rajeev_drupal CreditAttribution: rajeev_drupal at TATA Consultancy Services for Pfizer, Inc. commented#5 worked for me. Not sure about usage if Vimeo API.
Comment #11
grasmash CreditAttribution: grasmash commentedNote that this is an issue for Drupal 8 as well. Non-public vimeo videos will not return a thumbnail_url unless the referrer is set. See Vimeo docs at https://developer.vimeo.com/api/oembed/videos#embedding-a-video-with-oem...
Comment #12
grasmash CreditAttribution: grasmash commentedNote that PHP docs specifically say that using $_SERVER['HTTP_REFERER'] is unreliable:
You need to get the base url from Drupal, not the server directly.
Comment #13
jrb** Ignore -- see patch below ***
This is also a problem in the D8/9 version of this module. Patch attached.
Comment #14
jrbUpdated D9 patch.
I didn't realize my code *already* had a patch applied for a different (but related) Vimeo issue: #2872795: Error generating video thumbnail