diff options
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/defaults.js | 2 | ||||
-rw-r--r-- | src/js/plyr.js | 6 | ||||
-rw-r--r-- | src/js/utils.js | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/js/defaults.js b/src/js/defaults.js index daf0c06e..20db0b9c 100644 --- a/src/js/defaults.js +++ b/src/js/defaults.js @@ -56,7 +56,7 @@ const defaults = { // Sprite (for icons) loadSprite: true, iconPrefix: 'plyr', - iconUrl: 'https://cdn.plyr.io/3.0.0-beta.10/plyr.svg', + iconUrl: 'https://cdn.plyr.io/3.0.0-beta.11/plyr.svg', // Blank video (used to prevent errors on source change) blankVideo: 'https://cdn.plyr.io/static/blank.mp4', diff --git a/src/js/plyr.js b/src/js/plyr.js index 131f5a64..f64c15ae 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -1,6 +1,6 @@ // ========================================================================== // Plyr -// plyr.js v3.0.0-beta.10 +// plyr.js v3.0.0-beta.11 // https://github.com/sampotts/plyr // License: The MIT License (MIT) // ========================================================================== @@ -559,6 +559,10 @@ class Plyr { return true; } + if (this.isAudio) { + return true; + } + // Get audio tracks return this.media.mozHasAudio || Boolean(this.media.webkitAudioDecodedByteCount) || Boolean(this.media.audioTracks && this.media.audioTracks.length); } diff --git a/src/js/utils.js b/src/js/utils.js index f99a69ab..03e51f97 100644 --- a/src/js/utils.js +++ b/src/js/utils.js @@ -9,7 +9,7 @@ const utils = { // Check variable types is: { plyr(input) { - return this.instanceof(input, Plyr); + return this.instanceof(input, window.Plyr); }, object(input) { return this.getConstructor(input) === Object; @@ -620,7 +620,7 @@ const utils = { const event = new CustomEvent(type, { bubbles: utils.is.boolean(bubbles) ? bubbles : false, detail: Object.assign({}, detail, { - plyr: this instanceof Plyr ? this : null, + plyr: utils.is.plyr(this) ? this : null, }), }); |