aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2017-11-20 21:23:49 +1100
committerSam Potts <me@sampotts.me>2017-11-20 21:23:49 +1100
commitda1e987444bce4925020770f906ef915644ebd83 (patch)
treea6ed67ae12e57dacd501299b52679c05a6faa3ae /src/js
parent2d4a166218913308f069c43bcb184070bd449c9c (diff)
downloadplyr-da1e987444bce4925020770f906ef915644ebd83.tar.lz
plyr-da1e987444bce4925020770f906ef915644ebd83.tar.xz
plyr-da1e987444bce4925020770f906ef915644ebd83.zip
WIP on docs example
Diffstat (limited to 'src/js')
-rw-r--r--src/js/ui.js2
-rw-r--r--src/js/utils.js4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/js/ui.js b/src/js/ui.js
index 14b8d1cb..bc7443b5 100644
--- a/src/js/ui.js
+++ b/src/js/ui.js
@@ -144,7 +144,7 @@ const ui = {
utils.toggleClass(this.elements.container, this.config.classNames.stopped, this.paused);
this.toggleControls(!this.playing);
- }, 10);
+ }, 100);
},
// Check if media is loading
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';