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/plugins/ads.js5
-rw-r--r--src/js/plyr.js7
-rw-r--r--src/js/plyr.polyfilled.js2
-rw-r--r--src/js/source.js10
5 files changed, 12 insertions, 14 deletions
diff --git a/src/js/defaults.js b/src/js/defaults.js
index 7857644b..70319352 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.3.0/plyr.svg',
+ iconUrl: 'https://cdn.plyr.io/3.3.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/plugins/ads.js b/src/js/plugins/ads.js
index 4a3deeaa..79c00ab3 100644
--- a/src/js/plugins/ads.js
+++ b/src/js/plugins/ads.js
@@ -18,7 +18,6 @@ class Ads {
constructor(player) {
this.player = player;
this.publisherId = player.config.ads.publisherId;
- this.enabled = player.isHTML5 && player.isVideo && player.config.ads.enabled && utils.is.string(this.publisherId) && this.publisherId.length;
this.playing = false;
this.initialized = false;
this.elements = {
@@ -44,6 +43,10 @@ class Ads {
this.load();
}
+ get enabled() {
+ return this.player.isHTML5 && this.player.isVideo && this.player.config.ads.enabled && utils.is.string(this.publisherId) && this.publisherId.length;
+ }
+
/**
* Load the IMA SDK
*/
diff --git a/src/js/plyr.js b/src/js/plyr.js
index e77a7562..23b1a42b 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -1,6 +1,6 @@
// ==========================================================================
// Plyr
-// plyr.js v3.3.0
+// plyr.js v3.3.2
// https://github.com/sampotts/plyr
// License: The MIT License (MIT)
// ==========================================================================
@@ -333,11 +333,6 @@ class Plyr {
return null;
}
- // If ads are enabled, wait for them first
- /* if (this.ads.enabled && !this.ads.initialized) {
- return this.ads.managerPromise.then(() => this.ads.play()).catch(() => this.media.play());
- } */
-
// Return the promise (for HTML5)
return this.media.play();
}
diff --git a/src/js/plyr.polyfilled.js b/src/js/plyr.polyfilled.js
index eae4091a..eca1fe16 100644
--- a/src/js/plyr.polyfilled.js
+++ b/src/js/plyr.polyfilled.js
@@ -1,6 +1,6 @@
// ==========================================================================
// Plyr Polyfilled Build
-// plyr.js v3.3.0
+// plyr.js v3.3.2
// https://github.com/sampotts/plyr
// License: The MIT License (MIT)
// ==========================================================================
diff --git a/src/js/source.js b/src/js/source.js
index 4e3f9186..e9a2938e 100644
--- a/src/js/source.js
+++ b/src/js/source.js
@@ -2,12 +2,12 @@
// Plyr source update
// ==========================================================================
-import { providers } from './types';
-import utils from './utils';
import html5 from './html5';
import media from './media';
-import ui from './ui';
import support from './support';
+import { providers } from './types';
+import ui from './ui';
+import utils from './utils';
const source = {
// Add elements to HTML5 media (source, tracks, etc)
@@ -94,8 +94,8 @@ const source = {
if (this.config.autoplay) {
this.media.setAttribute('autoplay', '');
}
- if ('poster' in input) {
- this.media.setAttribute('poster', input.poster);
+ if (!utils.is.empty(input.poster)) {
+ this.poster = input.poster;
}
if (this.config.loop.active) {
this.media.setAttribute('loop', '');