revanced-patches icon indicating copy to clipboard operation
revanced-patches copied to clipboard

bug(YouTube - Swipe controls): Not working on first swipe

Open oSumAtrIX opened this issue 2 years ago • 19 comments

Discussed in https://github.com/orgs/revanced/discussions/695

Originally posted by Atharkhan101 October 19, 2022 When I flip to full screen, in one go swiping brings up the video cards from below. Volume and brightness controls works however not in one go. Please refer video attached.

oSumAtrIX avatar Oct 19 '22 09:10 oSumAtrIX

No video was attached. I will attach my own.

https://user-images.githubusercontent.com/64138578/197333313-90b6666d-3af6-448c-955c-826d1a0d2eaf.mp4

I can reproduce the issue. This issue can be mitigated by repeated tapping until the video controls (play/pause buttons) dont appear before swiping.

Note that a few hundred ms had to be waited after the buttons disappear by itself, as to prevent youtube thinking you wanted to press the controls but missed it.

Edit: But I dont think this is a bug. This is a feature. See comments below.

SodaWithoutSparkles avatar Oct 22 '22 10:10 SodaWithoutSparkles

Yes correct there is a problem even in the first swipe swipe, this bug is old but not fixed

Frontline11 avatar Oct 24 '22 21:10 Frontline11

this bug needs to be fixed urgently

Frontline11 avatar Oct 24 '22 21:10 Frontline11

A straight forward fix could be the removal of the video cards whenever the swipe controls are enabled in the settings

daniandtheweb avatar Oct 24 '22 23:10 daniandtheweb

I consider swiping up and bringing video cards out when the player controls are visible is a feature and should not be removed. Just tap once and hide the controls then swipe, no big deal when you get used to it. It can be convenient sometimes.

Edit: A possible solution would be to label areas where swiping up results in volume/brightness change, and dont allow video cards show up.

For example, When the player controls are active, swiping at the bottom below the progress line shows video cards, while swiping on the left changes brightness and right changes volume.

When the controls are not active it could stay the way it currently is.

SodaWithoutSparkles avatar Oct 25 '22 00:10 SodaWithoutSparkles

Swipe control is not working entirely for me, I have the latest patch

fitzerrific avatar Oct 26 '22 07:10 fitzerrific

@oSumAtrIX what is the state of this bug? Has it been resolved?

image

oSumAtrIX avatar Mar 29 '23 16:03 oSumAtrIX

🌝 okay.

It is not clear what the issue actually is, as no videos have been posted by the orginal poster. However, if it was the one descripted in https://github.com/revanced/revanced-patches/issues/814#issuecomment-1287699856, then I don't think that this is an issue at all, at most an enhancement to an existing patch, as descripted here.

Yes, the fact that you need hide the player controls before swiping to control volume is a bit confusing at first. But just because it is confusing doesn't mean the patch does not work. Just because it is a bit counter-intuitive to use, doesn't mean the design is flawed at the beginning. This keeps the og feature of being able to use the suggested video feature. Sure, some documentation might be needed, but I don't think the whole approach should be modified.

Speaking of the suggested video feature, what if you used some combination of hide-player-buttons, hide-seekbar, hide-timestamp, "layout > hide related videos in quick actions", "layout > hide quick actions in fullscreen" and "layout > hide previous and next buttons"? Would it mitigate this issue?


Edit: it seems that "layout > hide previous and next buttons" could mitigate the issue. Using latest stable patch as of 2023-03-29T1700Z and YT version 18.05.40. Unless you managed to swipe at the very split seconds as the video turns fullscreen, you wont have this issue. If you are that unlucky, just lift your finger and try again

SodaWithoutSparkles avatar Mar 29 '23 17:03 SodaWithoutSparkles

There's no such setting or patch as "hide previous and next buttons". Disabling 'video cards' is also not a thing. I guess they got renamed in a PR.

AnonymousWP avatar Apr 24 '23 11:04 AnonymousWP

There's no such setting or patch as "hide previous and next buttons". Disabling 'video cards' is also not a thing. I guess they got renamed in a PR.

It is in patch hide-player-buttons. You need to add that patch first, then should you have the layout > hide previous and next buttons

SodaWithoutSparkles avatar Apr 24 '23 14:04 SodaWithoutSparkles

There's no such setting or patch as "hide previous and next buttons". Disabling 'video cards' is also not a thing. I guess they got renamed in a PR.

It is in patch hide-player-buttons. You need to add that patch first, then should you have the layout > hide previous and next buttons

I did, but it didn't fix the issue. I still need to swipe very precisely at the very millisecond. Also, I don't get how I just faced this bug. Before, I didn't have this issue. It's since the latest patch (169) for me I believe.

AnonymousWP avatar Apr 24 '23 14:04 AnonymousWP

@AnonymousWP screen recording please. Nobody provided any screen recording from the start, I was just guessing if mine have the same issue.

SodaWithoutSparkles avatar Apr 24 '23 15:04 SodaWithoutSparkles

With or without that setting? I provided one here: https://github.com/revanced/revanced-patches/issues/1969

AnonymousWP avatar Apr 24 '23 15:04 AnonymousWP

So, I found a workaround: just tap-and-hold on the screen and then swipe. Maybe I'll submit a PR when I have time to clarify this in some patch.

AnonymousWP avatar May 18 '23 20:05 AnonymousWP

So, two concrete questions:

  1. I'd like to edit the description and include a note about the above. Do I include the note in the description of "Control volume and brightness" underneath "Swipe controls"? Or do I add them separately to its respective descriptions of both separate options? E.g. "Enable brightness gesture" and "Enable volume gesture"?
  2. "Swipe magnitude threshold"'s value is a bit weird. The default is 30. But 30 what? I understand that higher means more sensitive (I assume), but is it a percentage with a maximum value or just a random value?

I think, if you agree, I'll make two separate PRs.

AnonymousWP avatar May 18 '23 22:05 AnonymousWP

  1. I am not sure if I understood correctly, what do you want to do?
  2. It is a constant: image

oSumAtrIX avatar May 18 '23 22:05 oSumAtrIX

  1. I am not sure if I understood correctly, what do you want to do?
  2. It is a constant: image

Hmm, it's a bit complicated to explain my second point (I just tested this thoroughly, but I'll do my best to explain:

  1. As you know, swipe controls are broken. The workaround that works for me is to touch-hold-swipe. I'd like to notify users by a note in YouTube ReVanced, so I was thinking of modifying a line in https://github.com/revanced/revanced-patches/blob/main/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/resource/SwipeControlsResourcePatch.kt. However, my question is: where do I put the note (which line)?
  2. I sort of understand what a constant is, but that still makes me wonder about its context: I can set it to 0, but also to 9000. Does higher mean I need to swipe further? There's also no limit, and when I set it to 9000 for a test, it didn't work anymore at all. So I'd suggest to improve the description and a maximum value. Unlike with other descriptions (which are clear), I now don't know what the difference is between setting it to 30 or 500. I didn't notice a difference. Maybe that doesn't work either as the 'normal' way of using swipe controls (which is the core reason this GitHub issue exists) is bugged.

AnonymousWP avatar May 19 '23 11:05 AnonymousWP