This commit is contained in:
Sam Potts
2018-05-06 01:32:51 +10:00
parent ceb6c9a100
commit 1655150092
17 changed files with 78 additions and 24 deletions

View File

@ -158,7 +158,7 @@ const ui = {
},
// Check playing state
checkPlaying() {
checkPlaying(event) {
// Class hooks
utils.toggleClass(this.elements.container, this.config.classNames.playing, this.playing);
utils.toggleClass(this.elements.container, this.config.classNames.paused, this.paused);
@ -167,6 +167,11 @@ const ui = {
// Set ARIA state
utils.toggleState(this.elements.buttons.play, this.playing);
// Only update controls on non timeupdate events
if (utils.is.event(event) && event.type === 'timeupdate') {
return;
}
// Toggle controls
this.toggleControls(!this.playing);
},