diff options
Diffstat (limited to 'dist/plyr.polyfilled.js')
-rw-r--r-- | dist/plyr.polyfilled.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/dist/plyr.polyfilled.js b/dist/plyr.polyfilled.js index a09bb672..7d203b9b 100644 --- a/dist/plyr.polyfilled.js +++ b/dist/plyr.polyfilled.js @@ -8369,8 +8369,7 @@ typeof navigator === "object" && (function (global, factory) { // Add pressed property to buttons if (!is$1.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, @@ -8383,6 +8382,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$1.array(button)) { + button.filter(Boolean).forEach(addProperty); + } else { + addProperty(button); + } }); } |