usage of FullscreenManager.isOverlayVideoMode is changing soon |
||
Issue descriptionunsure if twellington@ is the right owner; please feel free to re-assign. ContextualSearchManager uses FullscreenManager.isOverlayVideoMode() to find out if chrome is showing "full-screen video", according to https://codereview.chromium.org/1589023003 . however, isOverlayVideoMode doesn't really mean that. it just means that the media system has requested that the browser should allow overlays for video playback, which is very much an implementation detail. very soon, the behavior will change, which might have unintended consequences for the ContextualSearchManager. even @ToT, it might not be what you're expecting. for example: - if one full-screens a <div> enclosing the video player, rather than the player element itself, then it won't be triggered. this is common for javascript controls. to the user, though, it looks a big video playing on the screen. if the intent of "full-screen video" is based on the user's perception rather than some technical limitation of full-screen player elements, then it likely doesn't work as intended @ToT. - webmediaplayer_impl might decide not to enable overlay mode if we're using software decoding, even if the player element is full-screened, since we can't use overlays. overlay video mode can cost some power, so if we're not actually using overlays, then we shouldn't enable it. - shortly, there will be changes that will entirely decouple isOverlayVideoMode from any notion of fullscreen, since we will need overlays for protected content even if it's not being displayed fullscreen. wanted to give you a heads-up. sorry that i don't have suggestions for replacements, but i'm unsure what the intention of the existing code is. with more info, i might have some ideas. thanks!
,
Jul 19 2017
*.. showing an overlay whether it is fullscreen or not...
,
Jul 19 2017
what goes wrong if it's showing an overlay?
,
Jul 19 2017
There are a couple of issues. Contextual search is itself an overlay, so the UIs don't work well together. Also, for video overlays contextual search doesn't really make sense -- that aren't any text components in a video overlay (that we're aware of) that users would want to search the web for.
,
Jul 19 2017
I'd like to disambiguate "Overlay" in this context. For the media team, Overlay means an instance of AndroidOverlay, which is a power efficient way of displaying video on screen, but looks exactly like regular video to users, and does not seem to appear over/under anything else when it is composited. I suspect that the rest of Chrome has a definition of Overlay as something like "A UI element that appears *over* other Chrome UI elements".
,
Jul 19 2017
We appreciate the early heads up. For the short-term, keeping contextual search disabled when isOverlayVideo() is true is the safest and easiest approach. At some point in the future, if Donn or myself has extra cycles we can look into whether it should actually be enabled in some situations where isOverlayVideo() returns true. For overlay, I mean the simplest definition of the word "something laid over something else." The current code documentation very clearly states that if FullscreenManager#isOverlayVideo() returns true there is a fullscreen view playing a video: - From FullscreenManager#isOverlayouVideoMode(): "@return Check whether ContentVideoView is shown." - From ContentVideoVideo: "A fullscreen view for accelerated video playback using surface view." Chrome uses #isOverlayVideo() in some other places where we except a fullscreen view playing a video. Based on this bug report it sounds like you're doing an audit of uses of #isOverlayVideo(), which is great! I'd encourage you to look at all of the current uses and try to understand the implications of the re-definition. Looking at your examples: - "if one full-screens a <div> enclosing the video player...." We may not want Contextual Search to be enabled in that scenario but we haven't actually encountered any reports where unexpected things happening in the wild. The worst-case scenario is that contextual search will show up when the user long-presses on text. I assume most full-screen div's showing videos don't have a lot of text. - "webmediaplayer_impl might decide not to enable overlay mode..." In this scenario I would expect FullscreenManager#isOverlayVideoMode() to return false based on the documentation. If a ContentVideoView isn't actually shown, #isOverlayVideoMode() should be returning false. - "shortly, there will be changes that will entirely decouple..." I don't know what protected content overlays are so it's hard to saw whether Contextual Search should be enabled while they are showing.
,
Jul 19 2017
I agree with all the comments by twellington@. An example of a bad interaction we've seen long ago was the video's text controls (for video position and duration) were clickable, but Contextual Search couldn't produce any useful result. So that possibility seems like another reason to just disable Contextual Search when we think a full screen video is shown.
,
Mar 8 2018
Issue 736514 has been merged into this issue.
,
Mar 13 2018
tguilbert@ or liberato@ please feel free to reprioritize once action is required for clients of FullscreenManager.isOverlayVideoMode. |
||
►
Sign in to add a comment |
||
Comment 1 by twelling...@chromium.org
, Jul 19 2017Owner: donnd@chromium.org