New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 717520 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
no longer working on chrome
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug

Blocking:
issue 713225



Sign in to add a comment

Media controls flicker when entering/exiting fullscreen

Project Member Reported by joh...@chromium.org, May 2 2017

Issue description

Chrome Version: ToT
OS: all

[What steps will reproduce the problem?]

(1) Play a video with native media controls, e.g. https://mounirlamouri.github.io/sandbox/media/dynamic-controls.html
(2) Wait until the media controls auto-hide.
(3) Enter/exit fullscreen on the video.

Obviously for (3) you can't press the fullscreen button on the media controls. Instead one way to trigger (3) on Android is to exit fullscreen by pressing the device's back button; similarly on desktop you can press Esc. Another, particularly distracting case where this happens is if you enable video-rotate-to-fullscreen in chrome://flags ( issue 713225 ).

[What is the expected result?]

If media controls are hidden due to inactivity, they should remain hidden when entering/exiting fullscreen (except in the case of an inline video with custom controls going fullscreen and hence needing native media controls).

[What happens instead?]

Both when entering and exiting fullscreen, the media controls appear briefly then almost immediately hide again.

They are shown by HTMLMediaElement::UpdateControlsVisibility (called from HTMLMediaElement::Did{Enter,Exit}Fullscreen) and then hidden again by MediaControlsImpl::OnTimeUpdate since ShouldHideMediaControls() returns true.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1fb662149d40ec4b4a19d984007528ea0b8798e3

commit 1fb662149d40ec4b4a19d984007528ea0b8798e3
Author: johnme <johnme@chromium.org>
Date: Tue May 16 19:28:36 2017

[Media Controls] Prevent flicker when enter/exit fullscreen

Previously, entering/exiting fullscreen whilst the media controls are
hidden due to inactivity would cause the media controls to briefly show
then almost immediately hide again, resulting in an ugly flicker.

They were shown by HTMLMediaElement::UpdateControlsVisibility (called
from HTMLMediaElement::Did{Enter,Exit}Fullscreen) and then hidden again
by MediaControlsImpl::OnTimeUpdate since ShouldHideMediaControls()
returns true.

(This was often masked by the fact that clicking the fullscreen button
with a mouse results in the mouse hovering over the media controls at
the start of the fullscreen transition, in which case it's ok to show
the media controls. It became particularly noticeable with the recent
video-rotate-to-fullscreen feature, which enters/exits fullscreen
without interacting with the media controls, but it can be reproduced
without that feature as well).

This patch renames MediaControls::Show to MaybeShow and makes it only
show the controls if they won't soon be hidden again.

BUG= 717520 
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2873493004
Cr-Commit-Position: refs/heads/master@{#472180}

[modify] https://crrev.com/1fb662149d40ec4b4a19d984007528ea0b8798e3/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/1fb662149d40ec4b4a19d984007528ea0b8798e3/third_party/WebKit/LayoutTests/SlowTests
[add] https://crrev.com/1fb662149d40ec4b4a19d984007528ea0b8798e3/third_party/WebKit/LayoutTests/media/controls/video-enter-exit-fullscreen-while-hovering-shows-controls.html
[add] https://crrev.com/1fb662149d40ec4b4a19d984007528ea0b8798e3/third_party/WebKit/LayoutTests/media/controls/video-enter-exit-fullscreen-without-hovering-doesnt-show-controls.html
[delete] https://crrev.com/f0a3d1dc467162b8c481fe146b86d9f938eedf20/third_party/WebKit/LayoutTests/media/video-controls-visible-exiting-fullscreen.html
[modify] https://crrev.com/1fb662149d40ec4b4a19d984007528ea0b8798e3/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
[modify] https://crrev.com/1fb662149d40ec4b4a19d984007528ea0b8798e3/third_party/WebKit/Source/core/html/media/MediaControls.h
[modify] https://crrev.com/1fb662149d40ec4b4a19d984007528ea0b8798e3/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp
[modify] https://crrev.com/1fb662149d40ec4b4a19d984007528ea0b8798e3/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h
[modify] https://crrev.com/1fb662149d40ec4b4a19d984007528ea0b8798e3/third_party/WebKit/Source/modules/media_controls/MediaControlsImplTest.cpp

Comment 2 by joh...@chromium.org, May 31 2017

Status: Fixed (was: Started)

Comment 3 by joh...@chromium.org, May 31 2017

Labels: M-60

Sign in to add a comment