You are here

function oembed_media_parse in oEmbed 7.0

Same name and namespace in other branches
  1. 8 oembed.media.inc \oembed_media_parse()
  2. 7 oembed.media.inc \oembed_media_parse()

Implements hook_media_parse().

@todo: this might be deprecated now that we have media_internet, but the hook is still being called in a couple places in media.

File

./oembed.media.inc, line 9

Code

function oembed_media_parse($url, $options = array()) {
  $scheme = 'oembed://';
  $matches = array();
  if ($provider = oembed_get_provider($url, $matches)) {
    return file_stream_wrapper_uri_normalize($scheme . drupal_encode_path($url));
  }

  // @TODO: Validate for malformed oembed urls.
}