HTML5 poster fixes for multiple downloads

This commit is contained in:
Sam Potts 2020-01-21 22:28:48 +00:00
parent 89136bc2e6
commit 71d6f59d56
3 changed files with 12 additions and 4 deletions

View File

@ -89,6 +89,10 @@ const html5 = {
if (preload !== 'none' || readyState) {
// Restore time
player.once('loadedmetadata', () => {
if (player.currentTime === 0) {
return;
}
player.currentTime = currentTime;
// Resume playing

View File

@ -39,11 +39,13 @@ const media = {
wrap(this.media, this.elements.wrapper);
// Faux poster container
this.elements.poster = createElement('div', {
class: this.config.classNames.poster,
});
if (this.isEmbed) {
this.elements.poster = createElement('div', {
class: this.config.classNames.poster,
});
this.elements.wrapper.appendChild(this.elements.poster);
this.elements.wrapper.appendChild(this.elements.poster);
}
}
if (this.isHTML5) {

View File

@ -198,7 +198,9 @@ const ui = {
// Reset backgroundSize as well (since it can be set to "cover" for padded thumbnails for youtube)
backgroundSize: '',
});
ui.togglePoster.call(this, true);
return poster;
})
);