Merge pull request #923 from friday/922

Only add hideControls class if config.hideControls is truthy
This commit is contained in:
Sam Potts 2018-04-27 20:07:18 +10:00 committed by GitHub
commit 5ca769807e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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