public function Youtube::iframe in Video Filter 8
HTML5 video (iframe).
Overrides VideoFilterBase::iframe
File
- src/
Plugin/ VideoFilter/ Youtube.php, line 63
Class
- Youtube
- Provides Youtube codec for Video Filter.
Namespace
Drupal\video_filter\Plugin\VideoFilterCode
public function iframe($video) {
$attributes = $this
->attributes($video);
return [
'src' => '//www.youtube.com/embed/' . $video['codec']['matches'][1] . '?' . implode('&', $attributes),
'properties' => [
'allowfullscreen' => 'true',
],
];
}