You are here

public function Html5::renderEmbedCode in Video Embed HTML5 8

File

src/Plugin/video_embed_field/Provider/Html5.php, line 83

Class

Html5
A Html5 provider plugin.

Namespace

Drupal\video_embed_html5\Plugin\video_embed_field\Provider

Code

public function renderEmbedCode($width, $height, $autoplay) {

  // @todo: test with colorbox formatter.
  return [
    '#theme' => 'video_embed_html5',
    '#src' => $this->videoUrl,
    '#type' => 'video/' . $this->videoType,
    '#autoplay' => $autoplay,
    '#provider' => 'local_html5',
  ];
}