Skip to content

Commit 5a5aeb4

Browse files
committed
configure audio session (IOS)
1 parent 51c8ead commit 5a5aeb4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libs/audio-manager.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {NativeEventEmitter, NativeModules} from 'react-native';
1+
import {NativeEventEmitter, NativeModules, Platform} from 'react-native';
22

33
/**
44
* @author Enrique Viard.
@@ -23,6 +23,9 @@ const AudioManager = {
2323
switchAudioInput(input) {
2424
return RNAudioManager.switchAudioInput(input);
2525
},
26+
configure(mode) {
27+
Platform.OS === 'ios' ? RNAudioManager.configure(mode) : null;
28+
},
2629
addEventListener(type, handler) {
2730
if (!_eventHandlers.hasOwnProperty(type)) {
2831
throw new Error('Event handler not found: ' + type)

0 commit comments

Comments
 (0)