public function Vevo::iframe in Video Filter 8
HTML5 video (iframe).
Overrides VideoFilterBase::iframe
File
- src/
Plugin/ VideoFilter/ Vevo.php, line 26
Class
- Vevo
- Provides Vevo codec for Video Filter.
Namespace
Drupal\video_filter\Plugin\VideoFilterCode
public function iframe($video) {
$attributes = [
'video' => 'video=' . $video['codec']['matches'][2],
'autoplay' => !empty($video['autoplay']) ? 'autoplay=1' : 'autoplay=0',
];
return [
'src' => 'http://cache.vevo.com/assets/html/embed.html?' . implode('&', $attributes),
'properties' => [
'allowfullscreen' => 'true',
],
];
}