@@ -6,6 +6,29 @@ const RNCallKeepModule = NativeModules.RNCallKeep;
66const isIOS = Platform . OS === 'ios' ;
77const supportConnectionService = ! isIOS && Platform . Version >= 23 ;
88
9+ const AudioSessionCategoryOption = {
10+ mixWithOthers : 0x1 ,
11+ duckOthers : 0x2 ,
12+ interruptSpokenAudioAndMixWithOthers : 0x11 ,
13+ allowBluetooth : 0x4 ,
14+ allowBluetoothA2DP : 0x20 ,
15+ allowAirPlay : 0x40 ,
16+ defaultToSpeaker : 0x8 ,
17+ overrideMutedMicrophoneInterruption : 0x80 ,
18+ }
19+
20+ const AudioSessionMode = {
21+ default : 'AVAudioSessionModeDefault' ,
22+ gameChat : 'AVAudioSessionModeGameChat' ,
23+ measurement : 'AVAudioSessionModeMeasurement' ,
24+ moviePlayback : 'AVAudioSessionModeMoviePlayback' ,
25+ spokenAudio : 'AVAudioSessionModeSpokenAudio' ,
26+ videoChat : 'AVAudioSessionModeVideoChat' ,
27+ videoRecording : 'AVAudioSessionModeVideoRecording' ,
28+ voiceChat : 'AVAudioSessionModeVoiceChat' ,
29+ voicePrompt : 'AVAudioSessionModeVoicePrompt' ,
30+ }
31+
932const CONSTANTS = {
1033 END_CALL_REASONS : {
1134 FAILED : 1 ,
@@ -17,7 +40,7 @@ const CONSTANTS = {
1740 } ,
1841} ;
1942
20- export { emit , CONSTANTS } ;
43+ export { emit , CONSTANTS , AudioSessionCategoryOption , AudioSessionMode } ;
2144
2245class EventListener {
2346 constructor ( type , listener , callkeep ) {
0 commit comments