native-audio-settings
v1.0.2
Published
This Capacitor plugin allows retrieving the current media volume level on a device. The plugin includes methods to read the volume level on both Android and iOS platforms.
Downloads
943
Readme
native-audio-settings
This plugin is designed to provide easy access to native audio settings on both Android and iOS platforms within the Capacitor framework.
Description
The plugin offers a unified API to retrieve and monitor audio settings, allowing developers to seamlessly integrate audio-related functionalities into their Capacitor applications.
Install
npm install native-audio-settings
npx cap sync
API
getMainVolume()
getMainVolume() => Promise<{ mainVolume: number; maxMainVolume: number; }>
Returns: Promise<{ mainVolume: number; maxMainVolume: number; }>
getNotificationVolume()
getNotificationVolume() => Promise<{ notificationVolume: number; maxNotificationVolume: number; }>
Returns: Promise<{ notificationVolume: number; maxNotificationVolume: number; }>
addListener('notificationVolumeChange', ...)
addListener(eventName: 'notificationVolumeChange', listenerFunc: (info: { notificationVolume: number; maxNotificationVolume: number; }) => void) => Promise<{ remove: () => void; }>
| Param | Type |
| ------------------ | ---------------------------------------------------------------------------------------------- |
| eventName
| 'notificationVolumeChange' |
| listenerFunc
| (info: { notificationVolume: number; maxNotificationVolume: number; }) => void |
Returns: Promise<{ remove: () => void; }>
Contributing
We appreciate your contribution to enhance and expand the project. To ensure a smooth and rewarding collaboration process, please follow these guidelines.
Creating an Issue
Before starting development work, please create an Issue to discuss the changes you want to implement. This allows for feedback and a shared understanding of the purpose and scope of your proposed contribution.
Working on a Fork
Create a fork of this repository and work in your fork instead of the main repository. This ensures that your changes can be reviewed before being integrated into the main project.
Code Convention Compliance
Adhere to existing code conventions and style in the project. A consistent codebase facilitates review and maintenance.
Creating a Pull Request
Open a pull request against the main repository when your work is ready for review. Please provide a clearly formulated description of your changes and additions.
Review and Feedback
Expect constructive review of your work. Be prepared to make changes and answer questions during the review process.
Testing
Ensure that your changes are thoroughly tested.
Have Fun
Most importantly, have fun! Contributing to open source is a positive experience, and we appreciate your effort.
Authors and acknowledgment
None yet, but bring it on!
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Project status
Development of the native-audio-settings plugin is ongoing, with regular updates and enhancements. If you are interested in contributing or becoming a maintainer, please reach out.