diff options
author | Sam Potts <me@sampotts.me> | 2017-10-25 23:59:59 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2017-10-25 23:59:59 +1100 |
commit | 1a3868a6c6092456c83f265ce6449a5ad2025fa1 (patch) | |
tree | 0305a2c74410f9438a12673d978c85c8ec6514aa /src | |
parent | 378aa159b8d91b2d9950575141a6ee67e7db350c (diff) | |
parent | 6876a9163d71d409253433a59baee9934fb59231 (diff) | |
download | plyr-1a3868a6c6092456c83f265ce6449a5ad2025fa1.tar.lz plyr-1a3868a6c6092456c83f265ce6449a5ad2025fa1.tar.xz plyr-1a3868a6c6092456c83f265ce6449a5ad2025fa1.zip |
Merge branch 'develop' of https://github.com/Selz/plyr into develop
Diffstat (limited to 'src')
-rw-r--r-- | src/js/plyr.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index 663df980..f1b3c83e 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -373,10 +373,10 @@ return input !== null && input instanceof Event; }, cue: function(input) { - return input !== null && (input instanceof window.TextTrackCue || input instanceof window.VTTCue); + this.instanceOf(input, window.TextTrackCue) || this.instanceOf(input, window.VTTCue); }, track: function(input) { - return input !== null && (input instanceof window.TextTrack || typeof input.kind === 'string'); + return input !== null && (this.instanceOf(input, window.TextTrack) || typeof input.kind === 'string'); }, undefined: function(input) { return input !== null && typeof input === 'undefined'; @@ -389,6 +389,9 @@ (this.object(input) && Object.keys(input).length === 0) ); }, + instanceOf: function(input, constructor) { + return Boolean(input && constructor && input instanceof constructor); + }, }, // Credits: http://paypal.github.io/accessible-html5-video-player/ @@ -4100,12 +4103,12 @@ case 38: // Arrow up - player.increaseVolume(); + player.increaseVolume(0.1); break; case 40: // Arrow down - player.decreaseVolume(); + player.decreaseVolume(0.1); break; case 77: |