You are here

function video_embed_field_get_video_data in Video Embed Field 7.2

Gets a video data array for a given video url.

Parameters

string $url: A video URL of the data array you want returned.

Return value

array|false An array of video data, or FALSE on error.

1 call to video_embed_field_get_video_data()
video_embed_field_field_presave in ./video_embed_field.field.inc
Implements hook_field_presave().

File

./video_embed_field.module, line 516
Provides a simple field for easily embedding videos from youtube or vimeo

Code

function video_embed_field_get_video_data($url) {
  $handler = video_embed_get_handler($url);
  if ($handler && isset($handler['data_function']) && function_exists($handler['data_function'])) {
    $data = call_user_func($handler['data_function'], $url);
    $data['handler'] = $handler['name'];
    return $data;
  }
  return FALSE;
}