aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/captions.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/captions.js')
-rw-r--r--src/js/captions.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/js/captions.js b/src/js/captions.js
index b1f448de..6ab8c69e 100644
--- a/src/js/captions.js
+++ b/src/js/captions.js
@@ -39,7 +39,7 @@ const captions = {
// Only Vimeo and HTML5 video supported at this point
if (!this.isVideo || this.isYouTube || (this.isHTML5 && !support.textTracks)) {
// Clear menu and hide
- if (this.config.controls.includes('settings') && this.config.settings.includes('captions')) {
+ if (utils.is.array(this.config.controls) && this.config.controls.includes('settings') && this.config.settings.includes('captions')) {
controls.setCaptionsMenu.call(this);
}
@@ -68,7 +68,7 @@ const captions = {
captions.show.call(this);
// Set available languages in list
- if (this.config.controls.includes('settings') && this.config.settings.includes('captions')) {
+ if (utils.is.array(this.config.controls) && this.config.controls.includes('settings') && this.config.settings.includes('captions')) {
controls.setCaptionsMenu.call(this);
}
},
@@ -124,7 +124,7 @@ const captions = {
setCue(input) {
// Get the track from the event if needed
const track = utils.is.event(input) ? input.target : input;
- const {activeCues} = track;
+ const { activeCues } = track;
const active = activeCues.length && activeCues[0];
const currentTrack = captions.getCurrentTrack.call(this);