function _video_apiclient_youtube_get_thumbnail_url in Video 6
Same name and namespace in other branches
- 5 types/video_youtube/video_youtube.module \_video_apiclient_youtube_get_thumbnail_url()
- 6.2 types/video_youtube/video_youtube.module \_video_apiclient_youtube_get_thumbnail_url()
returns the external url for a thumbnail of a specific video
Parameters
$id: the youtube id of the specific video @return a URL pointing to the thumbnail
1 call to _video_apiclient_youtube_get_thumbnail_url()
- video_youtube_v_auto_thumbnail in types/
video_youtube/ video_youtube.module - Implementation of hook_v_auto_thumbnail
File
- types/
video_youtube/ video_youtube.module, line 204 - Enable Youtube support for video module.
Code
function _video_apiclient_youtube_get_thumbnail_url($id) {
$response = _video_apiclient_youtube_request('youtube.videos.get_details', array(
'video_id' => $id,
));
if (isset($response['THUMBNAIL_URL'][0]) && $response['THUMBNAIL_URL'][0] != '') {
return $response['THUMBNAIL_URL'][0];
}
return false;
}