aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/captions.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2018-02-13 00:01:19 +1100
committerSam Potts <sam@potts.es>2018-02-13 00:01:19 +1100
commit6a9be8d16b9fba408f92643471b00f10893032ce (patch)
tree935c6e6a605ec82dee1d174f0cfedd00fac573a4 /src/js/captions.js
parent58c2c52c95c9d9ac37243bf495d6a9796a4781af (diff)
downloadplyr-6a9be8d16b9fba408f92643471b00f10893032ce.tar.lz
plyr-6a9be8d16b9fba408f92643471b00f10893032ce.tar.xz
plyr-6a9be8d16b9fba408f92643471b00f10893032ce.zip
Fix for custom controls
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);