Vevo.php in Video Filter 8
File
src/Plugin/VideoFilter/Vevo.php
View source
<?php
namespace Drupal\video_filter\Plugin\VideoFilter;
use Drupal\video_filter\VideoFilterBase;
class Vevo extends VideoFilterBase {
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',
],
];
}
public function options() {
$form = parent::options();
$form['autoplay'] = [
'#title' => $this
->t('Autoplay'),
'#type' => 'checkbox',
];
return $form;
}
}
Classes
Name |
Description |
Vevo |
Provides Vevo codec for Video Filter. |