Skip to content

feat(YouTube - Swipe controls): Add option to change volume swipe sensitivity #4557

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

Merged
merged 5 commits into from
Apr 14, 2025

Conversation

xVemu
Copy link
Contributor

@xVemu xVemu commented Mar 6, 2025

It's super annoying to scroll through 160 volume levels, so I've added an option to customize how much volume a single swipe changes.

May fix #1646, #3094, #1108

@xVemu xVemu marked this pull request as draft March 6, 2025 19:35
@xVemu xVemu marked this pull request as ready for review March 6, 2025 19:41
@LisoUseInAIKyrios
Copy link
Contributor

Is there ever a time when the swipe is too sensitive and the user wants swiping to change the volume less?

Then this should be a percentage and not a multiplier. Something like 1% to 1,000%, with a default of 100%. Under 100% makes swiping less sensitive and over 100% makes it more sensitive.

Should swipe brightness also have a sensitivity setting?

@MarcaDian
Copy link
Contributor

Should swipe brightness also have a sensitivity setting?

as an option it can be added, but to my recollection users haven't complained about itю

Sensitivity settings are already available in the Inotia00 patches, recently, it is very common for users to have 150 volume settings (especially on chinese firmwares), so I consider this PR important.

@xVemu
Copy link
Contributor Author

xVemu commented Mar 6, 2025

Is there ever a time when the swipe is too sensitive and the user wants swiping to change the volume less?

Currently, this would result in volume like 0.25, 0.67 etc. which could cause issues with changing volume.
I think there's no need for value smaller than 1.
Although 0 is ok since it just disables changing volume.

Should swipe brightness also have a sensitivity setting?

I don't think it's necessary

@LisoUseInAIKyrios
Copy link
Contributor

If there is little reason to make the volume less sensitive, then a multiplier seems ok. A multiplier might be more intuitive than a percentage that goes past 100%.

I suppose the brightness could have a multiplier/sensitivity setting just for completeness, but if nobody is asking or interested then there is not much reason to add more settings.

Although 0 is ok since it just disables changing volume.

A multiplier/sensitivity of zero makes no sense and would make swiping do nothing. If volume swiping is to be turned off then turn it off with the enable volume swipe switch.

@xVemu
Copy link
Contributor Author

xVemu commented Mar 6, 2025

A multiplier/sensitivity of zero makes no sense and would make swiping do nothing. If volume swiping is to be turned off then turn it off with the enable volume swipe switch.

Yeah, I agree, but what should 0 do then? Act like 1?
I guess there's no way to set a minimum value of 1 in the dialog?

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Mar 6, 2025

Check if the multiplier/sensitivity is zero, and reset it to 1. Can also do sanity check and reset to default if the value is something crazy like 50 or more.

Similar to:

if (opacity < 0 || opacity > 100) {
Utils.showToastLong(str("revanced_swipe_overlay_background_opacity_invalid_toast"))
Settings.SWIPE_OVERLAY_OPACITY.resetToDefault()
opacity = Settings.SWIPE_OVERLAY_OPACITY.get()
}

Although a toast is not needed, and if it's zero then just save and use a value of 1.

@LisoUseInAIKyrios
Copy link
Contributor

Instead of the term 'multiplier', I think 'sensitivity' or maybe a different term could be used.

Sensitivity seems intuitive, since a higher value means more sensitive and a greater increase of the volume for each swipe.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title feat(YouTube - Swipe controls): Add volume swipe multiplier feat(YouTube - Swipe controls): Add volume swipe sensitivity Mar 6, 2025
@ILoveOpenSourceApplications
Copy link
Contributor

Does this PR partially resolve #1985?

@LisoUseInAIKyrios
Copy link
Contributor

For volume, yes. I don't think the brightness problem described in that issue is still relevant since auto brightness can be turned off.

@LisoUseInAIKyrios LisoUseInAIKyrios removed the request for review from oSumAtrIX April 10, 2025 13:58
@oSumAtrIX oSumAtrIX changed the title feat(YouTube - Swipe controls): Add volume swipe sensitivity feat(YouTube - Swipe controls): Add option to change volume swipe sensitivity Apr 11, 2025
@oSumAtrIX oSumAtrIX merged commit 8957325 into ReVanced:dev Apr 14, 2025
1 check passed
Copy link

welcome bot commented Apr 14, 2025

Thank you for contributing to ReVanced. Join us on Discord to receive a role for your contribution.

github-actions bot pushed a commit that referenced this pull request Apr 14, 2025
# [5.20.0-dev.5](v5.20.0-dev.4...v5.20.0-dev.5) (2025-04-14)

### Features

* **YouTube - Swipe controls:** Add option to change volume swipe sensitivity (step size) ([#4557](#4557)) ([8957325](8957325))
github-actions bot pushed a commit that referenced this pull request Apr 15, 2025
# [5.20.0](v5.19.1...v5.20.0) (2025-04-15)

### Bug Fixes

* **Duolingo - Hide ads:**  Support lastest app release ([#4790](#4790)) ([215fccb](215fccb))
* **Spotify - Unlock Spotify Premium:** Remove premium restriction for 'Spotify Connect' ([#4782](#4782)) ([50f5b1a](50f5b1a))
* **Spotify:** Fix login by replacing `Spoof signature` patch with new `Spoof package info` patch ([#4794](#4794)) ([d639151](d639151))
* **YouTube - Remove background playback restrictions:** Restore PiP button functionality after screen is unlocked ([6837348](6837348))

### Features

* Add `Set target SDK version 34` patch (Disable edge-to-edge display) ([#4780](#4780)) ([dcf6178](dcf6178))
* **Spotify - Custom theme:** Add option to use unmodified player background gradient ([#4741](#4741)) ([0ee3693](0ee3693))
* **YouTube - Swipe controls:** Add option to change volume swipe sensitivity (step size) ([#4557](#4557)) ([8957325](8957325))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants