fix: hide poster when not using custom controls

This commit is contained in:
Sam Potts 2020-11-14 12:50:49 +11:00
parent da16c55427
commit cd3962ca32
2 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,7 @@ const media = {
// Poster image container
this.elements.poster = createElement('div', {
class: this.config.classNames.poster,
hidden: '',
});
this.elements.wrapper.appendChild(this.elements.poster);

View File

@ -172,6 +172,9 @@ const ui = {
// Set property synchronously to respect the call order
this.media.setAttribute('data-poster', poster);
// Show the poster
this.elements.poster.removeAttribute('hidden');
// Wait until ui is ready
return (
ready