diff options
author | Albin Larsson <mail@albinlarsson.com> | 2017-09-27 00:24:54 +0200 |
---|---|---|
committer | Albin Larsson <mail@albinlarsson.com> | 2017-09-27 00:24:54 +0200 |
commit | c84f666b55ffa63799746096be5d17e6eb425196 (patch) | |
tree | c2221862465a7db17ecd24d85706acbfd2cc9a8a | |
parent | 2bba1f30e28f402ef96b5f5181dd75788b0e25c9 (diff) | |
download | plyr-c84f666b55ffa63799746096be5d17e6eb425196.tar.lz plyr-c84f666b55ffa63799746096be5d17e6eb425196.tar.xz plyr-c84f666b55ffa63799746096be5d17e6eb425196.zip |
Fix 'TypeError: Cannot read property 'kind' of null' in captions feature detection if video lacks captions
-rw-r--r-- | src/js/plyr.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index db17ad00..ebf0d444 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -2448,7 +2448,7 @@ }); // Check if suported kind - var supported = utils.inArray(['captions', 'subtitles'], player.captions.currentTrack.kind); + var supported = utils.inArray(['captions', 'subtitles'], player.captions.currentTrack && player.captions.currentTrack.kind); if (utils.is.track(player.captions.currentTrack) && supported) { utils.on(player.captions.currentTrack, 'cuechange', setActiveCue); |