futo-org / grayjay-android

Read-only mirror of Grayjay repo for issue tracking
https://gitlab.futo.org/videostreaming/grayjay
Other
637 stars 40 forks source link

[Bug] Clip overlay is doubled when rotating the phone back and forth #582

Open radu-andrei-oprea opened 8 months ago

radu-andrei-oprea commented 8 months ago

Version 221 - when rotating the phone, the clip overlay might get doubled, from the progress bar to the top buttons on the clip window. Everything except for the play/pause button and the title. The new buttons/bar appear slightly top right of their original positions. The new buttons directly overlap the original ones, but function as intended. The new bar functions as intended as well, and is in sync with the old one. Both can be used to move through the video.

This will happen either when flipped vertically or horizontally. It will fluctuate between normal and doubled, when rotating one or more times.

Behaviour is inconsistent. A way to recreate it every time has not been yet pinned down. Suspected cause might be watching a youtube video with a slightly longer title. However, after closing and opening the app again, the bug still persists.

Device: Mi 10T Pro 5G MiUI Global 13.0.12 Android 12 skq1.211006.001

IUEngineering commented 8 months ago

Have the same issue with a OnePlus Nord 2T 5G

xephos1one commented 8 months ago

Here are some screenshots in landscape and portrait mode:

Screenshot_20231231-112541

Screenshot_20240101-131252

koen-futo commented 7 months ago

Possible fix implement which will be deployed in the next update. I have seen it before but not been steadily able to reproduce it. Therefore I was only able to make a theoretical fix.

radu-andrei-oprea commented 7 months ago

Possible fix implement which will be deployed in the next update. I have seen it before but not been steadily able to reproduce it. Therefore I was only able to make a theoretical fix.

One week later, I haven't encountered the issue anymore. If it's ok with you, I can close the issue. Thanks for your work

xephos1one commented 7 months ago

Still happening to me in version 227

koen-futo commented 7 months ago

@xephos1one are you able to give any more details?

xephos1one commented 7 months ago

@koen-futo It took some time to find a possible way to replicate it a few times:

Sadly it only works sometimes.

radu-andrei-oprea commented 7 months ago

@koen-futo okay, it came back. @xephos1one might have a point, it definitely has something to do with locking the screen in landscape mode.

I also found a way to trigger this (although it's inconsistent):

  1. Lock the phone in landscape mode while watching a video (Youtube, although it's likely irrelevant)
  2. Unlock the phone horizontally
  3. Turn it vertically
  4. Press on the screen to show the overlay
  5. Flip the phone while the overlay is showing
  6. Once in landscape mode, the bug might occur
xephos1one commented 7 months ago

Yesterday it also happened directly after opening the app, clicking on a video in portrait mode and turning the phone to landscape mode - without locking the screen. The timing might be important between opening the video in portrait mode and turning to landscape 🤔

Matesaktesak commented 7 months ago

I can't pinpoint what's triggering this issue, but it's happening daily. Running v233 release on a Xiaomi Redmi Note 12 5G Pro+ with Android 13

Dragonjinx commented 7 months ago

Somewhat consistent way of triggering this for me:

F1nnM commented 6 months ago

Another data point maybe: For me it happens without locking the screen or anything.

When rotating the phone, 90% of the time it transitions smoothly into the fullscreen video, and the controls don't duplicate. 10% of the time it briefly flashes the home screen (or whichever one is "under" the video), and when that happens the duplicates appear.

koen-futo commented 6 months ago

Thanks guys for all the extra information. Any information you can provide is useful. We will look into this soon. At the moment we are prioritizing the Desktop app a bit to get it out as soon as possible.

donatorsky commented 5 months ago

Hi everyone, wanted to add few cents to the discussion.

It happens to me always while playing any YouTube video when I rotate the phone very quickly and the app switches from/to landscape to/from portrait mode. No additional steps required, no controls visuals must be visible before rotation, etc. I'm attaching (a bit chaotic, but I believe it all gets clear when viewed slowed down) screen recording. Running v236 release on a Samsung Galaxy S24 Ultra with Android 14.

https://github.com/futo-org/grayjay-android/assets/5360041/f42fef77-4e7b-46a8-a95f-4a7f3d75030b

Matesaktesak commented 2 months ago

I believe the problem is, that the app is displaying landscape-mode controls even in portrait. I'd guess that some boolean toggle function is sometimes not triggering. I'm so sorry, but I don't have the time to dig through the source to find it...