You are here

public function Vimeo::options in Video Filter 8

Embed options. (e.g. Autoplay, Width/Height).

Uses Drupal's Form API.

Overrides VideoFilterBase::options

File

src/Plugin/VideoFilter/Vimeo.php, line 77

Class

Vimeo
Provides Vimeo codec for Video Filter.

Namespace

Drupal\video_filter\Plugin\VideoFilter

Code

public function options() {
  $form = parent::options();
  $form['autopause'] = [
    '#title' => $this
      ->t('Enable pausing this video when another video is played.'),
    '#type' => 'checkbox',
  ];
  $form['autoplay'] = [
    '#title' => $this
      ->t('Autoplay'),
    '#type' => 'checkbox',
  ];
  $form['badge'] = [
    '#title' => $this
      ->t('Enable the badge on the video.'),
    '#type' => 'checkbox',
  ];
  $form['byline'] = [
    '#title' => $this
      ->t('Show the user’s byline on the video.'),
    '#type' => 'checkbox',
  ];
  $form['loop'] = [
    '#title' => $this
      ->t('Play the video again when it reaches the end.'),
    '#type' => 'checkbox',
  ];
  $form['portrait'] = [
    '#title' => $this
      ->t('Show the user’s portrait on the video.'),
    '#type' => 'checkbox',
  ];
  $form['title'] = [
    '#title' => $this
      ->t('Show the title on the video.'),
    '#type' => 'checkbox',
  ];
  $form['fullscreen'] = [
    '#title' => $this
      ->t('Allow the player to go into fullscreen.'),
    '#type' => 'checkbox',
  ];
  $form['color'] = [
    '#title' => $this
      ->t('Color (optional)'),
    '#type' => 'textfield',
    '#description' => $this
      ->t('Specify the color of the video controls. Defaults to 00adef. Make sure that you don’t include the #.'),
  ];
  return $form;
}