diff options
author | Sam Potts <me@sampotts.me> | 2017-11-20 21:23:49 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2017-11-20 21:23:49 +1100 |
commit | da1e987444bce4925020770f906ef915644ebd83 (patch) | |
tree | a6ed67ae12e57dacd501299b52679c05a6faa3ae /src/js/utils.js | |
parent | 2d4a166218913308f069c43bcb184070bd449c9c (diff) | |
download | plyr-da1e987444bce4925020770f906ef915644ebd83.tar.lz plyr-da1e987444bce4925020770f906ef915644ebd83.tar.xz plyr-da1e987444bce4925020770f906ef915644ebd83.zip |
WIP on docs example
Diffstat (limited to 'src/js/utils.js')
-rw-r--r-- | src/js/utils.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/js/utils.js b/src/js/utils.js index aeb5ecd2..36fdaa6e 100644 --- a/src/js/utils.js +++ b/src/js/utils.js @@ -41,7 +41,9 @@ const utils = { return this.instanceof(input, window.TextTrackCue) || this.instanceof(input, window.VTTCue); }, track(input) { - return this.instanceof(input, window.TextTrack) || this.string(input.kind); + return ( + this.instanceof(input, window.TextTrack) || (!this.nullOrUndefined(input) && this.string(input.kind)) + ); }, nullOrUndefined(input) { return input === null || typeof input === 'undefined'; |