aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/defaults.js2
-rw-r--r--src/js/plyr.js6
-rw-r--r--src/js/plyr.polyfilled.js2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/js/defaults.js b/src/js/defaults.js
index 468b1888..e08fa3da 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.1/plyr.svg',
+ iconUrl: 'https://cdn.plyr.io/3.0.2/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 37dd14d3..bd4ec020 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -1,6 +1,6 @@
// ==========================================================================
// Plyr
-// plyr.js v3.0.1
+// plyr.js v3.0.2
// https://github.com/sampotts/plyr
// License: The MIT License (MIT)
// ==========================================================================
@@ -474,7 +474,7 @@ class Plyr {
const fauxDuration = parseInt(this.config.duration, 10);
// True duration
- const realDuration = Number(this.media.duration);
+ const realDuration = this.media ? Number(this.media.duration) : 0;
// If custom duration is funky, use regular duration
return !Number.isNaN(fauxDuration) ? fauxDuration : realDuration;
@@ -1139,7 +1139,7 @@ class Plyr {
clearInterval(this.timers.playing);
// Destroy YouTube API
- if (this.embed !== null) {
+ if (this.embed !== null && utils.is.function(this.embed.destroy)) {
this.embed.destroy();
}
diff --git a/src/js/plyr.polyfilled.js b/src/js/plyr.polyfilled.js
index c2f35b50..5a540207 100644
--- a/src/js/plyr.polyfilled.js
+++ b/src/js/plyr.polyfilled.js
@@ -1,6 +1,6 @@
// ==========================================================================
// Plyr Polyfilled Build
-// plyr.js v3.0.1
+// plyr.js v3.0.2
// https://github.com/sampotts/plyr
// License: The MIT License (MIT)
// ==========================================================================