1.1.3 • Published 12 months ago

react-native-audio-speaker v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

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

12 months ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago