aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/captions.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2017-11-23 20:50:07 +1100
committerSam Potts <sam@potts.es>2017-11-23 20:50:07 +1100
commit61325bbad17e80c436385aa0bb41e7a2b89075d8 (patch)
tree61e74d81c0564e8099745186689072498acdfda0 /src/js/captions.js
parent921cefd212f65290349aa1d9d533c95cb1f6fcce (diff)
downloadplyr-61325bbad17e80c436385aa0bb41e7a2b89075d8.tar.lz
plyr-61325bbad17e80c436385aa0bb41e7a2b89075d8.tar.xz
plyr-61325bbad17e80c436385aa0bb41e7a2b89075d8.zip
Vimeo captions fix
Diffstat (limited to 'src/js/captions.js')
-rw-r--r--src/js/captions.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/captions.js b/src/js/captions.js
index 61ed80bf..512099d3 100644
--- a/src/js/captions.js
+++ b/src/js/captions.js
@@ -32,7 +32,7 @@ const captions = {
}
// Only Vimeo and HTML5 video supported at this point
- if (!this.isVideo || this.isYouTube || (this.isVideo && !support.textTracks)) {
+ if (!this.isVideo || this.isYouTube || (this.isHTML5 && !support.textTracks)) {
// Clear menu and hide
if (this.config.controls.includes('settings') && this.config.settings.includes('captions')) {
controls.setCaptionsMenu.call(this);
@@ -71,7 +71,7 @@ const captions = {
// Set the captions language
setLanguage() {
// Setup HTML5 track rendering
- if (this.isVideo) {
+ if (this.isHTML5 && this.isVideo) {
captions.getTracks.call(this).forEach(track => {
// Remove previous bindings
utils.on(track, 'cuechange', event => captions.setCue.call(this, event));