aboutsummaryrefslogtreecommitdiffstats
path: root/dist/plyr.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/plyr.js')
-rw-r--r--dist/plyr.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/dist/plyr.js b/dist/plyr.js
index c0811917..9877c8ca 100644
--- a/dist/plyr.js
+++ b/dist/plyr.js
@@ -2942,8 +2942,7 @@ typeof navigator === "object" && (function (global, factory) {
// Add pressed property to buttons
if (!is.empty(this.elements.buttons)) {
- // Toggle classname when pressed property is set
- Object.values(this.elements.buttons).filter(Boolean).forEach(function (button) {
+ var addProperty = function addProperty(button) {
var className = _this10.config.classNames.controlPressed;
Object.defineProperty(button, 'pressed', {
enumerable: true,
@@ -2956,6 +2955,15 @@ typeof navigator === "object" && (function (global, factory) {
toggleClass(button, className, pressed);
}
});
+ };
+
+ // Toggle classname when pressed property is set
+ Object.values(this.elements.buttons).filter(Boolean).forEach(function (button) {
+ if (is.array(button)) {
+ button.filter(Boolean).forEach(addProperty);
+ } else {
+ addProperty(button);
+ }
});
}