Skip to content

Commit

Permalink
Feat: iframe video poster (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasNorin authored Oct 19, 2023
1 parent e681a3c commit 217a1b2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions source/php/Component/Iframe/Iframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,21 @@ public function init()
}

if (isset($src)) {
$this->data['attributeList']['src'] = $this->buildEmbedUrl($src);
$url = $this->buildEmbedUrl($src);
$this->data['attributeList']['src'] = $url;

if (empty($poster)) {
$this->data['poster'] = apply_filters('ComponentLibrary/Iframe/Poster', $url);
}
}

if (isset($labels)) {
$this->data['labels'] = json_encode($labels);
}

if($poster) {
if(!empty($poster)) {
$this->data['attributeList']['poster'] = $poster;
$this->data['poster'] = $poster;
}

$this->data['attributeList']['title'] = $title;
Expand Down

0 comments on commit 217a1b2

Please sign in to comment.