React Native module for audio ducking (temporarily lowering the volume level of audio)
npm install react-native-audio-ducking
npm install react-native-swift
cd ios && pod install
react-native swiftify
react-native run-ios
Set the minimum iOS version 10.0
react-native run-android
import AudioDucking from "react-native-audio-ducking";
// ...
async function duckAudio() {
try {
await AudioDucking.duckAudio();
} catch (error) {
console.log('duckAudio error', error);
}
}
async function removeAudioDucking() {
try {
await AudioDucking.removeAudioDucking();
} catch (error) {
console.log('removeAudioDucking error', error);
}
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT