aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2018-01-31 19:33:00 +1100
committerSam Potts <me@sampotts.me>2018-01-31 19:33:00 +1100
commitd76ef3ff914e0dca57c6f1e730188975d98acaa8 (patch)
tree51705f63316edb6beb18e2e52c62fa89a7cd6aa9 /src/js
parent2691c7c9d6ab5bcc18b29f2487b2f2e3515329c8 (diff)
downloadplyr-d76ef3ff914e0dca57c6f1e730188975d98acaa8.tar.lz
plyr-d76ef3ff914e0dca57c6f1e730188975d98acaa8.tar.xz
plyr-d76ef3ff914e0dca57c6f1e730188975d98acaa8.zip
Small UI tweaks and fix for instanceof issue
Diffstat (limited to 'src/js')
-rw-r--r--src/js/defaults.js2
-rw-r--r--src/js/plyr.js6
-rw-r--r--src/js/utils.js4
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 7c277301..c362c62e 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;
@@ -587,7 +587,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,
}),
});