diff options
author | Sam Potts <sam@potts.es> | 2020-02-14 16:53:23 +0000 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2020-02-14 16:53:23 +0000 |
commit | bfc541b88066b805bc6813c0a584c3c88e220a40 (patch) | |
tree | 2029a6e2fe6971454d47468413678ffe986aad26 /src/js/ui.js | |
parent | 2e2c5ad72a00e9f85b11e29e0ead9f7c9db8ea5c (diff) | |
download | plyr-bfc541b88066b805bc6813c0a584c3c88e220a40.tar.lz plyr-bfc541b88066b805bc6813c0a584c3c88e220a40.tar.xz plyr-bfc541b88066b805bc6813c0a584c3c88e220a40.zip |
Ensure poster image is not downloaded again for HTML5 videos
Diffstat (limited to 'src/js/ui.js')
-rw-r--r-- | src/js/ui.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/ui.js b/src/js/ui.js index b443766b..32db6ae7 100644 --- a/src/js/ui.js +++ b/src/js/ui.js @@ -172,6 +172,11 @@ const ui = { // Set property synchronously to respect the call order this.media.setAttribute('poster', poster); + // HTML5 uses native poster attribute + if (this.isHTML5) { + return Promise.resolve(poster); + } + // Wait until ui is ready return ( ready |