aboutsummaryrefslogtreecommitdiffstats
path: root/dist/plyr.polyfilled.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2018-06-29 00:21:22 +1000
committerSam Potts <sam@potts.es>2018-06-29 00:21:22 +1000
commitc99607c85a293a565aa4110a69d04a9e8e9450b6 (patch)
treebe6c2c38a0e6bf4de0a5da076864f1c43f73a1fe /dist/plyr.polyfilled.js
parent4f5152f5265efed0a390cbe31bf6b3a174b70813 (diff)
downloadplyr-c99607c85a293a565aa4110a69d04a9e8e9450b6.tar.lz
plyr-c99607c85a293a565aa4110a69d04a9e8e9450b6.tar.xz
plyr-c99607c85a293a565aa4110a69d04a9e8e9450b6.zip
Linting, housekeeping, duration fix (fixes #1074)
Diffstat (limited to 'dist/plyr.polyfilled.js')
-rw-r--r--dist/plyr.polyfilled.js20
1 files changed, 13 insertions, 7 deletions
diff --git a/dist/plyr.polyfilled.js b/dist/plyr.polyfilled.js
index 51050c1f..2a515ff6 100644
--- a/dist/plyr.polyfilled.js
+++ b/dist/plyr.polyfilled.js
@@ -6869,7 +6869,7 @@ typeof navigator === "object" && (function (global, factory) {
}
if ('class' in attributes) {
- if (attributes.class.includes(this.config.classNames.control)) {
+ if (!attributes.class.includes(this.config.classNames.control)) {
attributes.class += ' ' + this.config.classNames.control;
}
} else {
@@ -8395,8 +8395,10 @@ typeof navigator === "object" && (function (global, factory) {
return;
}
- // Toggle state
- this.elements.buttons.captions.pressed = active;
+ // Toggle button if it's enabled
+ if (this.elements.buttons.captions) {
+ this.elements.buttons.captions.pressed = active;
+ }
// Add class hook
toggleClass(this.elements.container, activeClass, active);
@@ -9991,9 +9993,11 @@ typeof navigator === "object" && (function (global, factory) {
};
// Play/pause toggle
- Array.from(this.player.elements.buttons.play).forEach(function (button) {
- bind(button, 'click', _this4.player.togglePlay, 'play');
- });
+ if (this.player.elements.buttons.play) {
+ Array.from(this.player.elements.buttons.play).forEach(function (button) {
+ bind(button, 'click', _this4.player.togglePlay, 'play');
+ });
+ }
// Pause
bind(this.player.elements.buttons.restart, 'click', this.player.restart, 'restart');
@@ -12149,7 +12153,7 @@ typeof navigator === "object" && (function (global, factory) {
}, {
key: 'enabled',
get: function get() {
- return this.player.isVideo && this.player.config.ads.enabled && !is$1.empty(this.publisherId);
+ return this.player.isHTML5 && this.player.isVideo && this.player.config.ads.enabled && !is$1.empty(this.publisherId);
}
}, {
key: 'tagUrl',
@@ -12801,6 +12805,7 @@ typeof navigator === "object" && (function (global, factory) {
value: function on$$1(event, callback) {
on.call(this, this.elements.container, event, callback);
}
+
/**
* Add event listeners once
* @param {string} event - Event type
@@ -12812,6 +12817,7 @@ typeof navigator === "object" && (function (global, factory) {
value: function once$$1(event, callback) {
once.call(this, this.elements.container, event, callback);
}
+
/**
* Remove event listeners
* @param {string} event - Event type