aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/ui.js')
-rw-r--r--src/js/ui.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/js/ui.js b/src/js/ui.js
index f5868788..c8b19677 100644
--- a/src/js/ui.js
+++ b/src/js/ui.js
@@ -172,6 +172,9 @@ const ui = {
// Set property synchronously to respect the call order
this.media.setAttribute('data-poster', poster);
+ // Show the poster
+ this.elements.poster.removeAttribute('hidden');
+
// Wait until ui is ready
return (
ready
@@ -270,7 +273,7 @@ const ui = {
// Loop through values (as they are the keys when the object is spread 🤔)
Object.values({ ...this.media.style })
// We're only fussed about Plyr specific properties
- .filter((key) => !is.empty(key) && key.startsWith('--plyr'))
+ .filter((key) => !is.empty(key) && is.string(key) && key.startsWith('--plyr'))
.forEach((key) => {
// Set on the container
this.elements.container.style.setProperty(key, this.media.style.getPropertyValue(key));