Function Hook_media_rendering_oembed->get_video_thumbnail

Definitions

sources/hooks/systems/media_rendering/oembed.php

  • If we can handle this URL, get the thumbnail URL.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$src_url URLPATH No No required parameter N/A N/A Video URL

Returns

  • The thumbnail URL (null: no match)
  • Type: ?string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * If we can handle this URL, get the thumbnail URL.
 *
 * @param  URLPATH $src_url Video URL
 * @return ?string The thumbnail URL (null: no match)
 */

public function get_video_thumbnail(string $src_url) : ?string