protected function Vimeo::attributes in Video Filter 8
Video embed tag attributes.
2 calls to Vimeo::attributes()
- Vimeo::flash in src/
Plugin/ VideoFilter/ Vimeo.php - Flash video (flv)
- Vimeo::iframe in src/
Plugin/ VideoFilter/ Vimeo.php - HTML5 video (iframe).
File
- src/
Plugin/ VideoFilter/ Vimeo.php, line 27
Class
- Vimeo
- Provides Vimeo codec for Video Filter.
Namespace
Drupal\video_filter\Plugin\VideoFilterCode
protected function attributes($video) {
$attributes = [
'autopause' => isset($video['autopause']) ? 'autopause=' . (int) $video['autopause'] : 'autopause=1',
'autoplay' => isset($video['autoplay']) ? 'autoplay=' . (int) $video['autoplay'] : 'autoplay=0',
'badge' => isset($video['badge']) ? 'badge=' . (int) $video['badge'] : 'badge=1',
'byline' => isset($video['byline']) ? 'byline=' . (int) $video['byline'] : 'byline=1',
'loop' => isset($video['loop']) ? 'loop=' . (int) $video['loop'] : 'loop=0',
'portrait' => isset($video['portrait']) ? 'portrait=' . (int) $video['portrait'] : 'portrait=1',
'title' => isset($video['title']) ? 'autopause=' . (int) $video['title'] : 'autopause=1',
'fullscreen' => isset($video['fullscreen']) ? 'fullscreen=' . (int) $video['fullscreen'] : 'fullscreen=1',
];
if (!empty($video['color'])) {
$attributes['color'] = (string) $video['color'];
}
return $attributes;
}