Skip to content
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

[Feature Request] Volume change listener #1655

Closed
stereodenis opened this issue Aug 19, 2022 · 2 comments
Closed

[Feature Request] Volume change listener #1655

stereodenis opened this issue Aug 19, 2022 · 2 comments
Labels

Comments

@stereodenis
Copy link

What is the need and use case of this feature?
I have getVolume and setVolume methods, but no listener for remote volume change: from hardware buttons and notification widgets.

Describe the ideal solution
Add such listener to the package.
// listen the volume changing if you need

const volumeListener = TrackPlayer.addVolumeListener((data) => {
    const volume = data.value;
    console.log(volume);
});

//remove listener when you need it no more
TrackPlayer.removeVolumeListener(volumeListener)      

Describe alternatives you've considered
You can reffer to react-native-system-setting@alpha

How I can Help
I can be a beta-tester

@stereodenis
Copy link
Author

@doublesymmetry-dev @fabiandoublesymmetry what do you think?

@jspizziri
Copy link
Collaborator

@stereodenis

We'll see if @dcvz thinks this should make it into the API. One thing I can say however, is that unless you plan on being a champion and doing some implementation, it's probably not going to get implemented by the core team. There are a lot of other feature requests and library needs and I don't see this falling near the top of the core team's priorities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Feature Requests
Development

No branches or pull requests

2 participants