Captions fix
This commit is contained in:
parent
60084a17f8
commit
374de800a4
2
dist/plyr.js
vendored
2
dist/plyr.js
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.js.map
vendored
2
dist/plyr.js.map
vendored
File diff suppressed because one or more lines are too long
@ -189,7 +189,7 @@ const captions = {
|
|||||||
// Display captions container and button (for initialization)
|
// Display captions container and button (for initialization)
|
||||||
show() {
|
show() {
|
||||||
// If there's no caption toggle, bail
|
// If there's no caption toggle, bail
|
||||||
if (!this.elements.buttons.captions) {
|
if (!utils.is.htmlElement(this.elements.buttons.captions)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ const captions = {
|
|||||||
|
|
||||||
// Otherwise fall back to the default config
|
// Otherwise fall back to the default config
|
||||||
if (!utils.is.boolean(active)) {
|
if (!utils.is.boolean(active)) {
|
||||||
({ active } = this.captions);
|
({ active } = this.config.captions);
|
||||||
} else {
|
} else {
|
||||||
this.captions.active = active;
|
this.captions.active = active;
|
||||||
}
|
}
|
||||||
|
@ -566,7 +566,7 @@ class Plyr {
|
|||||||
// Toggle captions
|
// Toggle captions
|
||||||
toggleCaptions(input) {
|
toggleCaptions(input) {
|
||||||
// If there's no full support, or there's no caption toggle
|
// 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;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user