react-native-audio-ducking
v0.1.6
Published
React Native module for audio ducking (temporarily lowering the volume level of audio)
Downloads
9
Readme
react-native-audio-ducking
React Native module for audio ducking (temporarily lowering the volume level of audio)
Installation
npm install react-native-audio-ducking
iOS
npm install react-native-swift
react-native swiftify
Set the minimum iOS version 10.0
Android
no additional steps required
Usage
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);
}
}
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT