aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/captions.js4
-rw-r--r--src/js/plyr.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/js/captions.js b/src/js/captions.js
index 36a1775b..2673d1d2 100644
--- a/src/js/captions.js
+++ b/src/js/captions.js
@@ -189,7 +189,7 @@ const captions = {
// Display captions container and button (for initialization)
show() {
// If there's no caption toggle, bail
- if (!this.elements.buttons.captions) {
+ if (!utils.is.htmlElement(this.elements.buttons.captions)) {
return;
}
@@ -198,7 +198,7 @@ const captions = {
// Otherwise fall back to the default config
if (!utils.is.boolean(active)) {
- ({ active } = this.captions);
+ ({ active } = this.config.captions);
} else {
this.captions.active = active;
}
diff --git a/src/js/plyr.js b/src/js/plyr.js
index d9450f95..1cff4231 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -566,7 +566,7 @@ class Plyr {
// Toggle captions
toggleCaptions(input) {
// If there's no full support, or there's no caption toggle
- if (!this.supported.ui || !this.elements.buttons.captions) {
+ if (!this.supported.ui || !utils.is.htmlElement(this.elements.buttons.captions)) {
return this;
}