Poster image fix (fixes #1763)

This commit is contained in:
Sam Potts
2020-04-19 20:06:58 +10:00
parent 9c7e429b48
commit 145f2ae24f
6 changed files with 12 additions and 20 deletions

View File

@ -114,10 +114,10 @@ const vimeo = {
// Inject the package
const { poster } = player;
if (premium) {
iframe.setAttribute('poster', poster);
iframe.setAttribute('data-poster', poster);
player.media = replaceElement(iframe, player.media);
} else {
const wrapper = createElement('div', { class: player.config.classNames.embedContainer, poster });
const wrapper = createElement('div', { class: player.config.classNames.embedContainer, 'data-poster': poster });
wrapper.appendChild(iframe);
player.media = replaceElement(wrapper, player.media);
}