I embedded a Vimeo iframe in a WYSIWYG field, and I have MyTube filter the field. But the Vimeo thumbnail does not appear, and I receive the following error message:
Warning: file(/srv/bindings/765658a838594dcd85a00c2348c30206/tmp/87048482.xml): failed to open stream: No such file or directory in _mytube_download_thumb() (line 647 of /srv/bindings/765658a838594dcd85a00c2348c30206/code/sites/all/modules/contrib/mytube/mytube.module).
The Vimeo code I am embedding:
<iframe allowfullscreen="" frameborder="0" height="281" mozallowfullscreen="" src="https://player.vimeo.com/video/108018156" webkitallowfullscreen="" width="500"></iframe>
Comment | File | Size | Author |
---|---|---|---|
#1 | vimeo_thumbnails_not-2505305-1.patch | 1.43 KB | jfrederick |
Comments
Comment #1
jfrederick CreditAttribution: jfrederick at Advomatic commentedHere is a patch.
MyTube downloads a video-specific XML file from Vimeo, which it parses to find the thumbnail URL. It constructs the URL to the XML file in _mytube_download_thumb() on line 645, but the URL returns a 404.
Vimeo has a newer API, which has a simpler URL structure for downloading the appropriate XML file.
I swapped in the new API URL, and adjusted the regex accordingly to correctly find the thumbnail in the slightly different API response.
Old URL:
New URL:
https://vimeo.com/api/v2/video/108018156.xml
Comment #2
milodescThis patch seems to be working well!
Comment #3
hey_germanoThe patch in #1 works for me, too.
Comment #5
mfbThanks for the patch!