function emvideo_vimeo_thumbnail in Embedded Media Field 6.3
Same name and namespace in other branches
- 6 contrib/emvideo/providers/vimeo.inc \emvideo_vimeo_thumbnail()
hook emvideo_PROVIDER_thumbnail returns the external url for a thumbnail of a specific video TODO: make the args: ($embed, $field, $item), with $field/$item provided if we need it, but otherwise simplifying things
Parameters
$field: the field of the requesting node @param $item the actual content of the field from the requesting node @return a URL pointing to the thumbnail
File
- contrib/
emvideo/ providers/ vimeo.inc, line 222 - Provide support for the Vimeo provider to the emfield.module.
Code
function emvideo_vimeo_thumbnail($field, $item, $formatter, $node, $width, $height) {
$xml = emfield_request_xml('vimeo', 'http://vimeo.com/api/oembed.xml?url=http%3A//vimeo.com/' . $item['value'], array(), TRUE, FALSE, $item['value']);
return $xml['OEMBED']['THUMBNAIL_URL'][0];
}