diff options
author | Sam Potts <sam@selz.com> | 2017-09-27 10:03:25 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-27 10:03:25 +1000 |
commit | ad105877ed4223349484986091e6df547933fceb (patch) | |
tree | c2221862465a7db17ecd24d85706acbfd2cc9a8a | |
parent | 2bba1f30e28f402ef96b5f5181dd75788b0e25c9 (diff) | |
parent | c84f666b55ffa63799746096be5d17e6eb425196 (diff) | |
download | plyr-ad105877ed4223349484986091e6df547933fceb.tar.lz plyr-ad105877ed4223349484986091e6df547933fceb.tar.xz plyr-ad105877ed4223349484986091e6df547933fceb.zip |
Merge pull request #667 from friday/fix/caption-feature-detection
Fix 'TypeError: Cannot read property 'kind' of null' in captions feat…
-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); |