You are here

function hook_preprocess_video_embed_iframe__youtube in Video Embed Field 8

Same name and namespace in other branches
  1. 8.2 video_embed_field.api.php \hook_preprocess_video_embed_iframe__youtube()

Preprocess iframes in the format of preprocess_video_embed_iframe__PROVIDER.

Allows you to preprocess video embed iframes but only for specific providers. This allows you to, for instance control things specific to each provider. For example, if you wanted to enable a specific youtube feature by altering the query string, you could do so as demonstrated.

File

./video_embed_field.api.php, line 35
Hooks provided by video_embed_field.

Code

function hook_preprocess_video_embed_iframe__youtube(&$variables) {

  // Remove the YouTube logo from youtube embeds.
  $variables['query']['modestbranding'] = '1';
}