Rewrite ui.setPoster to check that images arent broken or youtube fallback images. Only show poster element when valid

This commit is contained in:
Albin Larsson
2018-05-15 05:16:06 +02:00
parent 90d5b48845
commit 16c3a7d9e5
6 changed files with 42 additions and 21 deletions

View File

@@ -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);
}
/**