diff options
author | Sam Potts <me@sampotts.me> | 2017-11-05 18:57:22 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2017-11-05 18:57:22 +1100 |
commit | 374de800a4d092a5636466aa4cec4f1c5eb3a0c6 (patch) | |
tree | c74e8b0f012c327910048854b947de6d379de1b0 /src | |
parent | 60084a17f8de59fac9452d79dda13b124a12f2b2 (diff) | |
download | plyr-374de800a4d092a5636466aa4cec4f1c5eb3a0c6.tar.lz plyr-374de800a4d092a5636466aa4cec4f1c5eb3a0c6.tar.xz plyr-374de800a4d092a5636466aa4cec4f1c5eb3a0c6.zip |
Captions fix
Diffstat (limited to 'src')
-rw-r--r-- | src/js/captions.js | 4 | ||||
-rw-r--r-- | src/js/plyr.js | 2 |
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; } |