firefox-echo-show icon indicating copy to clipboard operation
firefox-echo-show copied to clipboard

Screen between nav and video flickers after exiting fullscreen on YouTube.com

Open kglazko opened this issue 6 years ago • 14 comments
trafficstars

Steps to reproduce

  1. Navigate to youtube.com
  2. Select a video and press play
  3. Press the expand button to enter full-screen
  4. Pinch screen to return to regular OR
  5. Click the un-expand button
  6. Repeat on Desktop mode

Expected behavior

Video should exit full-screen mode normally like on all other sites

Actual behavior

Screen between nav and video flickers and jerks while video is exiting full-screen mode

Device information

  • Echo Show device 2nd gen
  • Firefox version: 1.3 (latest)

kglazko avatar Feb 01 '19 18:02 kglazko

@kglazko What does "repeat on desktop mode" mean?

mcomella avatar Feb 08 '19 18:02 mcomella

I can't reproduce this (though I don't know what repeat on desktop mode is). Exiting fullscreen doesn't look great but I can't reproduce any visual artifacting.

Hypothesis: there is nothing behind the fullscreen view so when it moves around, it shows a garbage graphics buffer and glitches out.

Speculative fix: we put a view behind the fullscreen view so that it doesn't glitch out.

mcomella avatar Feb 08 '19 18:02 mcomella

There's a button on the YouTube actual website to view the site in Desktop Mode. It loads by default in mobile mode.

kglazko avatar Feb 08 '19 19:02 kglazko

I can reproduce this with youtube desktop mode: it's not as exaggerated as the example video kglazko but I can look into fixing it.

mcomella avatar Feb 08 '19 21:02 mcomella

I added a red background behind the fullscreen view and I definitely see the red when transitioning in and out of fullscreen view: looks like we'll need to put a container behind fullscreen to compensate.

mcomella avatar Feb 08 '19 21:02 mcomella

Note: I discovered this is a regression from #75: https://github.com/mozilla-mobile/firefox-echo-show/commit/2e839f195a2af89a55d1dc297fa3806ad255d9c5

mcomella avatar Feb 09 '19 00:02 mcomella

Cannot reproduce flicker anymore on mobile or desktop YouTube on Echo.

kglazko avatar Feb 13 '19 22:02 kglazko

I can still reproduce this: I realized the window background needs to be enabled both while fullscreen is enabled and for the amount of time it takes for the browser to transition out of fullscreen mode.

mcomella avatar Feb 14 '19 00:02 mcomella

I tried setting the window background to transparent 5s after fullscreen to fix this issue but unfortunately, there is a giant black flash and fade back to the content when the window background is removed. This problem doesn't seem to happen when we set the background drawable to null.

Options:

  • Make sure solution I just found works (for Kate too). Note: it's obnoxiously complex
  • Never have window background (backout)
  • Always have window background (possible perf issues)
  • Try harder with other solutions (e.g. include layout in activity view hierarchy, set appbar layout scroll behavior)

Note: this solution may have caused #240: we should check with Kate if removing this patch fixes that issue.

mcomella avatar Feb 15 '19 01:02 mcomella

Kind of blocked on #240 to make sure we're not exacerbating that issue.

mcomella avatar Feb 15 '19 22:02 mcomella

We determined this bug did not regress #240 so we can move ahead with my proposed solution.

mcomella avatar Feb 15 '19 22:02 mcomella

It turns out the issue was caused because the toolbar entry/exit animation when we were entering/exiting fullscreen was creating a gap between the views.

We originally created an elaborate solution where we changed the windowBackground #227 and then realized disabling the background needed to be deferred #242 long enough for the fullscreen exit animation to finish. It turns out the simpler solution is just to disable the animation (i.e. a one line change), which had poor performance anyway: I'll be adding another PR to use that much simpler solution.

mcomella avatar Feb 21 '19 03:02 mcomella

QA: @kglazko In order to fix this issue, we disabled the web content translation animation when entering/exiting web content. The animation was really janky and this solution much simpler so we felt it was a worthwhile trade-off. This change was low risk (though the refactor underneath it, which you've already tested, is a little higher risk).

mcomella avatar Feb 21 '19 03:02 mcomella

Re-opening to confirm/deny this is still happening.

devinreams avatar Feb 22 '19 18:02 devinreams