abdallahmehiz / mpvKt

A media player for android, based on mpv-android and built with Jetpack Compose.
Apache License 2.0
572 stars 18 forks source link

More balanced volume step value #66

Closed nvllz closed 1 month ago

nvllz commented 1 month ago

Version 0.1.5 introduces revised volume handling. I'm not sure if it's hardcoded or device dependent, but when I try to change the volume, the step value is 7. I find it too big, would love a more resonable value for this, or some kind of setting like the double tap to seek duration preference. While 7 seems acceptable for volume button action, it's expected to be more subtle for vertical gesture. Maybe just make it like 2 for gesture only if possible? Just to prevent fast accidental volume increases, but still leave the way to quickly change the volume with physical buttons.

abdallahmehiz commented 1 month ago

That 7 is a percentage no? can you try disabling the show volume as percentage option in the player settings?

nvllz commented 1 month ago

Sure, I missed that switch. But by disabling it, it only goes from 0-15, so the step value is still quite high.

abdallahmehiz commented 1 month ago

15 steps is the amount specified by the vendor though. most phones have 15 steps. Some can go higher or lower, depending on the device. I can't control that...

nvllz commented 1 month ago

Okay, it seems to be 15 for me because of the Samsung Good Lock sound assistant utility, I guess (increases the global media volume limit to 150%). But why is it like that anyway? I mean, percentage values are more user friendly, and having it 0-100 would allow for a lower step value than the current 10% (0-15 in my case steps by 1, making it 10% of the max value, and is displayed as 7% when showing volume as a percentage (100%/15 steps gives ~7% for a step).

abdallahmehiz commented 1 month ago

I am not sure how Samsung's tools amplify your device's audio but since the system stills gives mpvKt the value of 15 steps it's probably some software mixer they've installed, which I can't do anything about.

nvllz commented 1 month ago

What is the volume step value with percentage volume values setting turned on for you? For me it goes like 0>7>14... each increment.

abdallahmehiz commented 1 month ago

Yep, my device has 15 volume steps so it increments by 7% each step.

nvllz commented 1 month ago

Is this the limitation of the mpv? I have never seen such a weird way of dealing with volume, really. It was always 0-100% with 1% step values.

abdallahmehiz commented 1 month ago

Oh no, It's how an android thing. Every media player on android has this.

abdallahmehiz commented 1 month ago

I guess I can close the issue now? Or are there any other questions?

nvllz commented 1 month ago

Is it really not possible or too complex to make it the way other apps handle it? Like 0-100% just for volume, like it's already the case for brightness. I'm asking in case you don't understand my idea, because it's a way in other video players like Cloudstream, NextPlayer and audio players (any you will pick). If there's some Android barrier, I'm sorry for my lack of knowledge.

If so, please close the issue. Thanks for your interest.

abdallahmehiz commented 1 month ago

Is it really not possible or too complex to make it the way other apps handle it?

It is possible, but implementing will add a lot of complexity especially when handling stuff like media session and background playback

because it's a way in other video players like Cloudstream, NextPlayer and audio players (any you will pick).

On my end, NextPlayer does the exact same thing of incrementing by 7%, so does VLC, MX, and mpv-android.

If there's some Android barrier, I'm sorry for my lack of knowledge.

The only way i can see this be done in (of the top of my head) is to set the device's volume to max and then control the media volume from the audio decoder's mixer. Which, to be frank, isn't a good solution.