function video_embed_field_handle_vimeo_thumbnail in Video Embed Field 7.2
Gets the thumbnail url for vimeo videos.
Parameters
string $url: The video URL.
Return value
array The video thumbnail information.
1 string reference to 'video_embed_field_handle_vimeo_thumbnail'
File
- ./
video_embed_field.handlers.inc, line 539 - Provide some handlers for video embed field Other modules can implement the hook_video_embed_handler_info to provide more handlers.
Code
function video_embed_field_handle_vimeo_thumbnail($url) {
$vimeo_data = _video_embed_field_get_vimeo_data($url);
// Get ID of video from URL.
$id = _video_embed_field_get_vimeo_id($vimeo_data);
$info = array(
'id' => $id,
);
try {
$info['url'] = $vimeo_data['thumbnail_url'];
} catch (Exception $e) {
}
return $info;
}