aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2018-02-05 21:28:16 +1100
committerSam Potts <sam@potts.es>2018-02-05 21:28:16 +1100
commitf3ea31c515dd9631e0268ebd43475e422f9a1ecb (patch)
treeaf3fe21dcb89a1c26ded771d0544069bc6e7c5c0 /src/js
parent1ee88cba16dbb85e7e1decb4d5e6a1191d73efad (diff)
parentaf3ae7522908c72dbe760de517692f4982037b19 (diff)
downloadplyr-f3ea31c515dd9631e0268ebd43475e422f9a1ecb.tar.lz
plyr-f3ea31c515dd9631e0268ebd43475e422f9a1ecb.tar.xz
plyr-f3ea31c515dd9631e0268ebd43475e422f9a1ecb.zip
Merge branch 'beta' of github.com:sampotts/plyr into beta
# Conflicts: # dist/plyr.js # dist/plyr.js.map
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 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,
}),
});