Only add hideControls class if config.hideControls is truthy

This commit is contained in:
Albin Larsson 2018-04-26 17:51:14 +02:00
parent a812650fea
commit 9e19b526b9

View File

@ -1076,8 +1076,8 @@ class Plyr {
utils.toggleClass(this.elements.controls, this.config.classNames.noTransition, false); utils.toggleClass(this.elements.controls, this.config.classNames.noTransition, false);
} }
// Check if controls toggled // Set hideControls class
const toggled = utils.toggleClass(this.elements.container, this.config.classNames.hideControls, true); const toggled = utils.toggleClass(this.elements.container, this.config.classNames.hideControls, this.config.hideControls);
// Trigger event and close menu // Trigger event and close menu
if (toggled) { if (toggled) {