make config.captions.selectedIndex number

This commit is contained in:
Marios Tasos 2017-03-22 15:50:56 +02:00
parent c205c47509
commit a353194fe1

View File

@ -1400,8 +1400,8 @@
if (captionSources.length === 0) { if (captionSources.length === 0) {
plyr.captionExists = false; plyr.captionExists = false;
log('No caption track found'); log('No caption track found');
} else if ((config.captions.selectedIndex + 1) > captionSources.length) { } else if ((Number(config.captions.selectedIndex) + 1) > captionSources.length) {
plyr.captionExists = true; plyr.captionExists = false;
log('Caption index out of bound'); log('Caption index out of bound');
} else { } else {
captionSrc = captionSources[config.captions.selectedIndex]; captionSrc = captionSources[config.captions.selectedIndex];