fix: hide poster when not using custom controls
This commit is contained in:
parent
da16c55427
commit
cd3962ca32
@ -41,6 +41,7 @@ const media = {
|
|||||||
// Poster image container
|
// Poster image container
|
||||||
this.elements.poster = createElement('div', {
|
this.elements.poster = createElement('div', {
|
||||||
class: this.config.classNames.poster,
|
class: this.config.classNames.poster,
|
||||||
|
hidden: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
this.elements.wrapper.appendChild(this.elements.poster);
|
this.elements.wrapper.appendChild(this.elements.poster);
|
||||||
|
@ -172,6 +172,9 @@ const ui = {
|
|||||||
// Set property synchronously to respect the call order
|
// Set property synchronously to respect the call order
|
||||||
this.media.setAttribute('data-poster', poster);
|
this.media.setAttribute('data-poster', poster);
|
||||||
|
|
||||||
|
// Show the poster
|
||||||
|
this.elements.poster.removeAttribute('hidden');
|
||||||
|
|
||||||
// Wait until ui is ready
|
// Wait until ui is ready
|
||||||
return (
|
return (
|
||||||
ready
|
ready
|
||||||
|
Loading…
x
Reference in New Issue
Block a user