Fix 'TypeError: Cannot read property 'kind' of null' in captions feature detection if video lacks captions
This commit is contained in:
parent
2bba1f30e2
commit
c84f666b55
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user