Skip to content

Commit

Permalink
fix(player): Added proper tooltip on play button when it is paused
Browse files Browse the repository at this point in the history
  • Loading branch information
rafa8626 committed Dec 20, 2018
1 parent a8c4989 commit 051e23c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dist/openplayer.js
Expand Up @@ -1723,6 +1723,8 @@ var Player = function () {
this.events.play = function () {
_this3.playBtn.classList.add('op-player__play--paused');

_this3.playBtn.title = _this3.options.labels.pause;

_this3.loader.setAttribute('aria-hidden', 'true');

setTimeout(function () {
Expand All @@ -1740,6 +1742,8 @@ var Player = function () {
_this3.playBtn.classList.remove('op-player__play--paused');

_this3.playBtn.setAttribute('aria-hidden', constants_1.IS_ANDROID || constants_1.IS_IOS ? 'false' : 'true');

_this3.playBtn.title = _this3.options.labels.play;
};
}

Expand Down
2 changes: 1 addition & 1 deletion dist/openplayer.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/js/player.ts
Expand Up @@ -746,6 +746,7 @@ class Player {
};
this.events.play = () => {
this.playBtn.classList.add('op-player__play--paused');
this.playBtn.title = this.options.labels.pause;
this.loader.setAttribute('aria-hidden', 'true');

setTimeout(() => {
Expand All @@ -759,6 +760,7 @@ class Player {
this.loader.setAttribute('aria-hidden', 'true');
this.playBtn.classList.remove('op-player__play--paused');
this.playBtn.setAttribute('aria-hidden', IS_ANDROID || IS_IOS ? 'false' : 'true');
this.playBtn.title = this.options.labels.play;
};
}

Expand Down

0 comments on commit 051e23c

Please sign in to comment.