Small bug fixes

This commit is contained in:
Sam Potts
2018-05-06 01:03:38 +10:00
parent 5aece6fa06
commit 91a4b86860
17 changed files with 105 additions and 68 deletions

27
dist/plyr.js vendored
View File

@ -3742,7 +3742,7 @@ var defaults$1 = {
// 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',
@ -5805,7 +5805,6 @@ var Ads = function () {
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 = {
@ -5831,13 +5830,13 @@ var Ads = function () {
this.load();
}
/**
* Load the IMA SDK
*/
createClass(Ads, [{
key: 'load',
/**
* Load the IMA SDK
*/
value: function load() {
var _this2 = this;
@ -6442,6 +6441,11 @@ var Ads = function () {
this.safetyTimer = null;
}
}
}, {
key: 'enabled',
get: function get$$1() {
return this.player.isHTML5 && this.player.isVideo && this.player.config.ads.enabled && utils.is.string(this.publisherId) && this.publisherId.length;
}
}, {
key: 'tagUrl',
get: function get$$1() {
@ -6553,8 +6557,8 @@ var source = {
if (_this2.config.autoplay) {
_this2.media.setAttribute('autoplay', '');
}
if ('poster' in input) {
_this2.media.setAttribute('poster', input.poster);
if (!utils.is.empty(input.poster)) {
_this2.poster = input.poster;
}
if (_this2.config.loop.active) {
_this2.media.setAttribute('loop', '');
@ -6984,11 +6988,6 @@ var Plyr = function () {
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();
}

2
dist/plyr.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -8776,7 +8776,7 @@ var defaults$1 = {
// 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',
@ -10839,7 +10839,6 @@ var Ads = function () {
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 = {
@ -10865,13 +10864,13 @@ var Ads = function () {
this.load();
}
/**
* Load the IMA SDK
*/
createClass(Ads, [{
key: 'load',
/**
* Load the IMA SDK
*/
value: function load() {
var _this2 = this;
@ -11476,6 +11475,11 @@ var Ads = function () {
this.safetyTimer = null;
}
}
}, {
key: 'enabled',
get: function get() {
return this.player.isHTML5 && this.player.isVideo && this.player.config.ads.enabled && utils.is.string(this.publisherId) && this.publisherId.length;
}
}, {
key: 'tagUrl',
get: function get() {
@ -11587,8 +11591,8 @@ var source = {
if (_this2.config.autoplay) {
_this2.media.setAttribute('autoplay', '');
}
if ('poster' in input) {
_this2.media.setAttribute('poster', input.poster);
if (!utils.is.empty(input.poster)) {
_this2.poster = input.poster;
}
if (_this2.config.loop.active) {
_this2.media.setAttribute('loop', '');
@ -12018,11 +12022,6 @@ var Plyr = function () {
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();
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long