1.1.3 • Published 8 months ago
react-native-audio-speaker v1.1.3
react-native-audio-speaker
A React Native module to toggle speaker/phone speaker for iOS and Android.
Installation
npm
npm install react-native-audio-speaker
# or
yarn add react-native-audio-speaker
iOS
Add the following line to your ios/Podfile
:
pod 'react-native-audio-speaker', :path => '../node_modules/react-native-audio-speaker'
Then run:
cd ios && pod install
Android
No additional steps required for Android.
Usage
import AudioSpeaker from 'react-native-audio-speaker';
// Toggle speaker
AudioSpeaker.toggleSpeaker();
// Check if speaker is on
AudioSpeaker.isSpeaker().then((isSpeakerOn) => {
console.log('Speaker is on:', isSpeakerOn);
});
// Switch to speaker
AudioSpeaker.switchToSpeaker();
// Switch to receiver
AudioSpeaker.switchToReceiver();
License
MIT
1.1.3
8 months ago
1.1.2
10 months ago
1.1.1
10 months ago
1.1.0
10 months ago
1.0.14
10 months ago
1.0.13
10 months ago
1.0.12
10 months ago
1.0.11
10 months ago
1.0.10
10 months ago
1.0.9
10 months ago
1.0.8
10 months ago
1.0.7
10 months ago
1.0.6
10 months ago
1.0.5
10 months ago
1.0.4
10 months ago
1.0.3
10 months ago
1.0.2
10 months ago
1.0.1
11 months ago
1.0.0
11 months ago