diff options
author | Albin Larsson <mail@albinlarsson.com> | 2018-05-15 05:16:06 +0200 |
---|---|---|
committer | Albin Larsson <mail@albinlarsson.com> | 2018-05-15 16:21:36 +0200 |
commit | 16c3a7d9e5be8ed2ffbbcee1c786b88d1cecc4cd (patch) | |
tree | 2620f3e4572e08b69c18a8adab654d39f6582585 /src/js/plyr.js | |
parent | 90d5b48845661ce99a204354f93fbbbc7a19f100 (diff) | |
download | plyr-16c3a7d9e5be8ed2ffbbcee1c786b88d1cecc4cd.tar.lz plyr-16c3a7d9e5be8ed2ffbbcee1c786b88d1cecc4cd.tar.xz plyr-16c3a7d9e5be8ed2ffbbcee1c786b88d1cecc4cd.zip |
Rewrite ui.setPoster to check that images arent broken or youtube fallback images. Only show poster element when valid
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r-- | src/js/plyr.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index 6a3deade..dee90dd2 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -801,10 +801,7 @@ class Plyr { return; } - if (utils.is.string(input)) { - this.media.setAttribute('poster', input); - ui.setPoster.call(this); - } + ui.setPoster.call(this, input); } /** |