You are here

public function YouKu::iframe in Video Filter 8

HTML5 video (iframe).

Overrides VideoFilterBase::iframe

File

src/Plugin/VideoFilter/YouKu.php, line 27

Class

YouKu
Provides YouKu codec for Video Filter.

Namespace

Drupal\video_filter\Plugin\VideoFilter

Code

public function iframe($video) {
  $attributes = [
    'autoplay' => !empty($video['autoplay']) ? 'autoplay=1' : 'autoplay=0',
  ];
  return [
    'src' => 'http://player.youku.com/embed/' . $video['codec']['matches'][1] . '?' . implode('&', $attributes),
  ];
}