| Index: ui/file_manager/video_player/js/media_controls.js
|
| diff --git a/ui/file_manager/video_player/js/media_controls.js b/ui/file_manager/video_player/js/media_controls.js
|
| index 8d63495b2e60d3e47deef5da9cfb806d94d8ee51..aa45bfdd35fedcc058d5f44b5e14eb21adb6c965 100644
|
| --- a/ui/file_manager/video_player/js/media_controls.js
|
| +++ b/ui/file_manager/video_player/js/media_controls.js
|
| @@ -1013,9 +1013,22 @@ VideoControls.prototype = { __proto__: MediaControls.prototype };
|
| * @private
|
| */
|
| VideoControls.prototype.showIconFeedback_ = function() {
|
| - this.stateIcon_.removeAttribute('state');
|
| + var stateIcon = this.stateIcon_;
|
| + stateIcon.removeAttribute('state');
|
| +
|
| setTimeout(function() {
|
| - this.stateIcon_.setAttribute('state', this.isPlaying() ? 'play' : 'pause');
|
| + var newState = this.isPlaying() ? 'play' : 'pause';
|
| +
|
| + var onAnimationEnd = function(state, event) {
|
| + if (stateIcon.getAttribute('state') === state)
|
| + stateIcon.removeAttribute('state');
|
| +
|
| + stateIcon.removeEventListener('webkitAnimationEnd', onAnimationEnd);
|
| + }.bind(null, newState);
|
| + stateIcon.addEventListener('webkitAnimationEnd', onAnimationEnd);
|
| +
|
| + // Shows the icon with animation.
|
| + stateIcon.setAttribute('state', newState);
|
| }.bind(this), 0);
|
| };
|
|
|
|
|