aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarios Tasos <marios.tasos@gmail.com>2017-03-22 13:38:08 +0200
committerMarios Tasos <marios.tasos@gmail.com>2017-03-22 13:38:08 +0200
commitc205c47509bced7ddeaca213f8ea7bae5224d5a1 (patch)
treed4433296471142028bcfc4b3b490c227dd1d866a
parent9c867edfbc4ee8da3a42b71d37bf9e407707433a (diff)
downloadplyr-c205c47509bced7ddeaca213f8ea7bae5224d5a1.tar.lz
plyr-c205c47509bced7ddeaca213f8ea7bae5224d5a1.tar.xz
plyr-c205c47509bced7ddeaca213f8ea7bae5224d5a1.zip
set captionExists to true if selectedIndex is bigger than capt source
-rw-r--r--src/js/plyr.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 25ea6ab9..a9a9d90c 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -1401,7 +1401,7 @@
plyr.captionExists = false;
log('No caption track found');
} else if ((config.captions.selectedIndex + 1) > captionSources.length) {
- plyr.captionExists = false;
+ plyr.captionExists = true;
log('Caption index out of bound');
} else {
captionSrc = captionSources[config.captions.selectedIndex];