Copy poster when creating new media element for YouTube and Vimeo (needed for #1018)
This commit is contained in:
@ -119,8 +119,11 @@ const vimeo = {
|
||||
iframe.setAttribute('allowtransparency', '');
|
||||
iframe.setAttribute('allow', 'autoplay');
|
||||
|
||||
// Get poster, if already set
|
||||
const { poster } = player;
|
||||
|
||||
// Inject the package
|
||||
const wrapper = createElement('div', { class: player.config.classNames.embedContainer });
|
||||
const wrapper = createElement('div', { poster, class: player.config.classNames.embedContainer });
|
||||
wrapper.appendChild(iframe);
|
||||
player.media = replaceElement(wrapper, player.media);
|
||||
|
||||
|
Reference in New Issue
Block a user