A plugin to manage audio mode and volume
import {AudioManagement, VolumeType} from 'hrs-cordova-plugin-audiomanagement';
async function changeVolume() {
const volumePercentage = 75;
await AudioManagement.setVolume(VolumeType.MUSIC, volumePercentage);
}
- make sure you have nvm installed
- run
nvm use
at the root of the project to use the correct version (install if needed) - run
npm install
To add a new API or modify existing ones:
- make any necessary changes in the typescript API at
src/ts/cordova-plugin-audiomanagement.ts
- make any necessary changes in android layer at
src/android/AudioManagement.java
- sync the typescript API by running
npm run build
- update the plugin version after changes are made by running the npm version command