Commit b885fc3b authored by yoshiki's avatar yoshiki Committed by Commit bot

Video Player: Don't show the loop message in unexpected timing

BUG=418275
TEST=manually tested

Review URL: https://codereview.chromium.org/611953002

Cr-Commit-Position: refs/heads/master@{#297151}
parent 36a3e811
...@@ -572,6 +572,7 @@ ...@@ -572,6 +572,7 @@
background-color: black; background-color: black;
border-radius: 10px; border-radius: 10px;
color: white; color: white;
display: none;
font-size: 18px; font-size: 18px;
left: 50%; left: 50%;
margin-left: -250px; margin-left: -250px;
...@@ -588,6 +589,7 @@ ...@@ -588,6 +589,7 @@
.text-banner[visible] { .text-banner[visible] {
-webkit-animation: text-banner-blowup 3000ms; -webkit-animation: text-banner-blowup 3000ms;
display: block;
} }
.playback-state-icon[state] { .playback-state-icon[state] {
......
...@@ -1048,7 +1048,15 @@ VideoControls.prototype.showIconFeedback_ = function() { ...@@ -1048,7 +1048,15 @@ VideoControls.prototype.showIconFeedback_ = function() {
VideoControls.prototype.showTextBanner_ = function(identifier) { VideoControls.prototype.showTextBanner_ = function(identifier) {
this.textBanner_.removeAttribute('visible'); this.textBanner_.removeAttribute('visible');
this.textBanner_.textContent = this.stringFunction_(identifier); this.textBanner_.textContent = this.stringFunction_(identifier);
setTimeout(function() { setTimeout(function() {
var onAnimationEnd = function(event) {
this.textBanner_.removeEventListener(
'webkitAnimationEnd', onAnimationEnd);
this.textBanner_.removeAttribute('visible');
}.bind(this);
this.textBanner_.addEventListener('webkitAnimationEnd', onAnimationEnd);
this.textBanner_.setAttribute('visible', 'true'); this.textBanner_.setAttribute('visible', 'true');
}.bind(this), 0); }.bind(this), 0);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment