c19354837 / react-native-system-setting

A library to access system setting, and change it easily. eg: volume, brightness, wifi
MIT License
438 stars 160 forks source link

ios: Prevent volume slider overlay to display #136

Open pke opened 2 years ago

pke commented 2 years ago

It seems the iOS camera app can hide the volume slider overlay when its active and the user presses the volume buttons. Is there a way to achieve this too as long as volume listeners are registered?

EWTDTHK2 commented 2 years ago

I think so. RTCSystemSetting.m add

[self showVolumeUI:NO];

before

[self sendEventWithName:@"EventVolume" body:@{@"value": [NSNumber numberWithFloat:volume]}];

not sure if this is what you want.

pke commented 2 years ago

And this will prevent the UI to show the slider only when the app is active and restore the original behaviour when the app is in the background or terminated?

EWTDTHK2 commented 2 years ago

Yes, I think so.

buildgreatthings commented 1 year ago

Could anyone implement this on main please?

buildgreatthings commented 1 year ago

Willing to sponsor coffee for the person who fixes this if they DM me!