-
-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(YouTube): Fix player button fade out animations #4469
fix(YouTube): Fix player button fade out animations #4469
Conversation
Does requiring a restart improve anything? Or is anything simpler if a restart is required? |
The fade out immediately (when tapping the video player overlay) should be Currently it's not used though. |
No restart required. The button first becomes invisible and then disappears. The animation is displayed correctly and the chapter_title does not overlap the button. |
If it's simpler then can do a little copy paste of these changes to the SponsorBlock buttons. Can figure out refactoring to a common class later (or never if nobody cares enough). |
As I wrote above, that's what I did, I just copied the same code to SB. But for some reason after that the animations started jumping again and I reverted and left only the changes to the bottom buttons. |
Found only one bug. If you minimize the video in the in-app-miniplayer, and disable any button, then Will need to restart the application. It seems to me that such a case is very rare, so I do not know whether it is necessary to pay attention to it. SB buttons decided to stick with the old animations, as the new code causes the bottom buttons to blink. |
Yeah that issue seems minor enough that it can be ignored. |
Another way out of this situation is to require a restart when changing the visibility status of the buttons. |
I tried (again) to fix the wrong fade out duration when taping the overlay (it fades out faster), but gave up after failing to find a simple solution. For now this is as good as it'll get, and an improvement over what currently is used. |
I had an idea, why not add these bottom buttons to the new container in
So that they are in the container where It is even noticeable that the |
Could try and see. I previously tried adding the buttons to a different layout file (I don't remember which file), but whatever file I used had issues with the chapter titles text overlapping the buttons. |
I'm looking at adding the buttons to the fullscreen stub, but I don't think that will easily work. It appears the fast fade out is applied to the fullscreen button itself and not a container view or anything that can be used to inherit the behavior to the RV buttons. |
Yes, it's not easy. I tried, but I had problems inflating the ViewStub, the buttons wouldn't initialize. The documentation says that you need to inflate() first so that the buttons are available later. After some actions the buttons still could not be initialized. It's difficult for me. |
…t does not fix any issues.
…Works but does not fix any issues." This reverts commit 1717a64.
Is this ready to merge? If a simple fix for the fast fade out can be figured out it can be another PR. |
Yes, ready. |
Studying the question, I came across interpolation animations, namely, for example,
I think it has gotten better, but I state the fact that the duration from resources is not suitable, my animations are longer than they should be. |
That is likely the animation type. It's not an Animation object because with 1717a64 I tried overriding |
The fade out duration from the resources is 700ms. |
Since it is not possible to intercept the animations of the fullscreen button, I tried to copy its behavior. But most likely, several animations are composed there, which are also supplemented with interpolation (which I wrote about above). I meant the animation that after a tap on the screen, that's what I want to copy, at the moment the fadeout animation of the button and all containers in the player is the same, and revanced* buttons fade later and appear with a delay after a tap than the fullscreen button. I previously assumed if the buttons were integrated into the ViewStub (youtube_controls_fullscreen_button.xml) they would also use the fullscreen button behavior. But I lost a lot of time, but I did not succeed, I lack experience. Currently, this PR is better than it was. PS: I think you understood me (I use a google translator, sometimes it does not convey what I mean) |
# [5.13.0-dev.3](v5.13.0-dev.2...v5.13.0-dev.3) (2025-02-19) ### Bug Fixes * **YouTube:** Fix player button fade out animations ([#4469](#4469)) ([bf8e775](bf8e775))
Fixing overlaying chapter title on disappearing bottom buttons.
Previously discussed here
Before
After