Commit ea319e73 authored by mtomasz's avatar mtomasz Committed by Commit bot

Do not reshow the text message after navigating to the next video.

Currently the message is reshown if the animation is not finished. However,
since the video is changed and the text message is related to the previous
video, it's the best to just hide it immediately when switching videos.

TEST=Tested manually by playing multiple videos and clicking play with the
     CTRL key pressed.
BUG=422120

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

Cr-Commit-Position: refs/heads/master@{#300189}
parent d946c920
......@@ -361,6 +361,10 @@ MediaControls.prototype.attachMedia = function(mediaElement) {
this.media_.addEventListener('timeupdate', this.onMediaProgressBound_);
this.media_.addEventListener('error', this.onMediaError_);
// If the text banner is being displayed, hide it immediately, since it is
// related to the previous media.
this.textBanner_.removeAttribute('visible');
// Reflect the media state in the UI.
this.onMediaDuration_();
this.onMediaPlay_(this.isPlaying());
......
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