Skip to content

Commit

Permalink
fix(player): Changed conditionals to show Play button on hover properly
Browse files Browse the repository at this point in the history
  • Loading branch information
rafa8626 committed Aug 19, 2020
1 parent 50a0ea8 commit 2930929
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dist/openplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4684,10 +4684,10 @@ var Controls = function () {
_this.player.loader.setAttribute('aria-hidden', 'true');

_this.player.playBtn.setAttribute('aria-hidden', _this.player.isMedia() ? 'false' : 'true');
} else if (_this.player.getOptions().showLoaderOnInit) {
_this.player.playBtn.setAttribute('aria-hidden', 'true');
} else {
_this.player.playBtn.setAttribute('aria-hidden', _this.player.getOptions().showLoaderOnInit ? 'true' : 'false');

_this.player.loader.setAttribute('aria-hidden', 'false');
_this.player.loader.setAttribute('aria-hidden', _this.player.getOptions().showLoaderOnInit ? 'false' : 'true');
}

_this.player.getContainer().classList.remove('op-controls--hidden');
Expand Down
2 changes: 1 addition & 1 deletion dist/openplayer.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/js/controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ class Controls implements PlayerComponent {
if (this.player.activeElement().currentTime) {
this.player.loader.setAttribute('aria-hidden', 'true');
this.player.playBtn.setAttribute('aria-hidden', this.player.isMedia() ? 'false' : 'true');
} else if (this.player.getOptions().showLoaderOnInit) {
this.player.playBtn.setAttribute('aria-hidden', 'true');
this.player.loader.setAttribute('aria-hidden', 'false');
} else {
this.player.playBtn.setAttribute('aria-hidden', this.player.getOptions().showLoaderOnInit ? 'true' : 'false');
this.player.loader.setAttribute('aria-hidden', this.player.getOptions().showLoaderOnInit ? 'false' : 'true');
}

this.player.getContainer().classList.remove('op-controls--hidden');
Expand Down

0 comments on commit 2930929

Please sign in to comment.