HTML5 poster fixes for multiple downloads
This commit is contained in:
parent
89136bc2e6
commit
71d6f59d56
@ -89,6 +89,10 @@ const html5 = {
|
|||||||
if (preload !== 'none' || readyState) {
|
if (preload !== 'none' || readyState) {
|
||||||
// Restore time
|
// Restore time
|
||||||
player.once('loadedmetadata', () => {
|
player.once('loadedmetadata', () => {
|
||||||
|
if (player.currentTime === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
player.currentTime = currentTime;
|
player.currentTime = currentTime;
|
||||||
|
|
||||||
// Resume playing
|
// Resume playing
|
||||||
|
@ -39,12 +39,14 @@ const media = {
|
|||||||
wrap(this.media, this.elements.wrapper);
|
wrap(this.media, this.elements.wrapper);
|
||||||
|
|
||||||
// Faux poster container
|
// Faux poster container
|
||||||
|
if (this.isEmbed) {
|
||||||
this.elements.poster = createElement('div', {
|
this.elements.poster = createElement('div', {
|
||||||
class: this.config.classNames.poster,
|
class: this.config.classNames.poster,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.elements.wrapper.appendChild(this.elements.poster);
|
this.elements.wrapper.appendChild(this.elements.poster);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isHTML5) {
|
if (this.isHTML5) {
|
||||||
html5.extend.call(this);
|
html5.extend.call(this);
|
||||||
|
@ -198,7 +198,9 @@ const ui = {
|
|||||||
// Reset backgroundSize as well (since it can be set to "cover" for padded thumbnails for youtube)
|
// Reset backgroundSize as well (since it can be set to "cover" for padded thumbnails for youtube)
|
||||||
backgroundSize: '',
|
backgroundSize: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
ui.togglePoster.call(this, true);
|
ui.togglePoster.call(this, true);
|
||||||
|
|
||||||
return poster;
|
return poster;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user