public function MediaInternetVimeoHandler::getOEmbed in Media: Vimeo 7
Same name and namespace in other branches
- 7.2 includes/MediaInternetVimeoHandler.inc \MediaInternetVimeoHandler::getOEmbed()
Returns information about the media.
See http://www.oembed.com/ and https://vimeo.com/api/docs/oembed
Return value
If oEmbed information is available, an array containing 'title', 'type', 'url', and other information as specified by the oEmbed standard. Otherwise, NULL.
1 call to MediaInternetVimeoHandler::getOEmbed()
File
- includes/
MediaInternetVimeoHandler.inc, line 79
Class
- MediaInternetVimeoHandler
- Implementation of MediaInternetBaseHandler.
Code
public function getOEmbed() {
$uri = $this
->parse($this->embedCode);
$external_url = drupal_realpath($uri);
$oembed_url = url('http://vimeo.com/api/oembed.json', array(
'query' => array(
'url' => $external_url,
),
));
$response = drupal_http_request($oembed_url);
if (!isset($response->error)) {
return drupal_json_decode($response->data);
}
}