Skip to content

Commit

Permalink
Added class and fullscreen attributes for the Vimeo helper
Browse files Browse the repository at this point in the history
  • Loading branch information
themao committed Apr 11, 2016
1 parent efdf773 commit 61066a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 7 additions & 5 deletions Provider/VimeoProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ public function getHelperProperties(MediaInterface $media, $format, $options = a
$box = $this->getBoxHelperProperties($media, $format, $options);

$params = array(
'src' => http_build_query($player_parameters),
'id' => $player_parameters['js_swf_id'],
'frameborder' => isset($options['frameborder']) ? $options['frameborder'] : 0,
'width' => $box->getWidth(),
'height' => $box->getHeight(),
'src' => http_build_query($player_parameters),
'id' => $player_parameters['js_swf_id'],
'frameborder' => isset($options['frameborder']) ? $options['frameborder'] : 0,
'width' => $box->getWidth(),
'height' => $box->getHeight(),
'class' => isset($options['class']) ? $options['class'] : '',
'allow_fullscreen' => isset($options['allowfullscreen']) ? true : false,
);

return $params;
Expand Down
4 changes: 3 additions & 1 deletion Resources/views/Provider/view_vimeo.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ file that was distributed with this source code.
src="//player.vimeo.com/video/{{ media.providerreference }}?{{ options.src }}"
width="{{ options.width }}"
height="{{ options.height }}"
frameborder="{{ options.frameborder }}">
frameborder="{{ options.frameborder }}"
{% if options.class is not empty %}class="{{ options.class }}"{% endif %}
{% if options.allow_fullscreen %}allowfullscreen mozallowfullscreen webkitallowfullscreen{% endif %}>
</iframe>

0 comments on commit 61066a7

Please sign in to comment.