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.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/js/ui.js b/src/js/ui.js
index 6246a71f..062331dc 100644
--- a/src/js/ui.js
+++ b/src/js/ui.js
@@ -144,7 +144,9 @@ const ui = {
utils.toggleClass(this.elements.container, this.config.classNames.stopped, this.paused);
// Set aria state
- Array.from(this.elements.buttons.play).forEach(button => utils.toggleState(button, this.playing));
+ if (utils.is.array(this.elements.buttons.play)) {
+ Array.from(this.elements.buttons.play).forEach(button => utils.toggleState(button, this.playing));
+ }
// Toggle controls
this.toggleControls(!this.playing);
@@ -153,7 +155,7 @@ const ui = {
// Check if media is loading
checkLoading(event) {
- this.loading = event.type === 'waiting';
+ this.loading = ['stalled', 'waiting'].includes(event.type);
// Clear timer
clearTimeout(this.timers.loading);