Skip to content

Commit

Permalink
Merge pull request #761 from frankemax/368-audio-device
Browse files Browse the repository at this point in the history
feat(audio-selector): iOS
  • Loading branch information
frankemax authored May 7, 2024
2 parents 35c3a56 + 478bd51 commit 161f2ba
Show file tree
Hide file tree
Showing 14 changed files with 714 additions and 10 deletions.
3 changes: 2 additions & 1 deletion eas.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cli": {
"version": ">=3.8.1"
"version": ">=3.8.1",
"promptToConfigurePushNotifications": false
},
"build": {
"development": {
Expand Down
24 changes: 24 additions & 0 deletions ios/JitsiAudioSession+Private.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright @ 2017-present 8x8, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#import "JitsiAudioSession.h"
#import <WebRTC/WebRTC.h>

@interface JitsiAudioSession (Private)

+ (RTCAudioSession *)rtcAudioSession;

@end
26 changes: 26 additions & 0 deletions ios/JitsiAudioSession.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright @ 2017-present 8x8, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#import <Foundation/Foundation.h>

@class AVAudioSession;

@interface JitsiAudioSession : NSObject

+ (void)activateWithAudioSession:(AVAudioSession *)session;
+ (void)deactivateWithAudioSession:(AVAudioSession *)session;

@end
34 changes: 34 additions & 0 deletions ios/JitsiAudioSession.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright @ 2017-present 8x8, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#import "JitsiAudioSession.h"
#import "JitsiAudioSession+Private.h"

@implementation JitsiAudioSession

+ (RTCAudioSession *)rtcAudioSession {
return [RTCAudioSession sharedInstance];
}

+ (void)activateWithAudioSession:(AVAudioSession *)session {
[self.rtcAudioSession audioSessionDidActivate:session];
}

+ (void)deactivateWithAudioSession:(AVAudioSession *)session {
[self.rtcAudioSession audioSessionDidDeactivate:session];
}

@end
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ PODS:
- React-perflogger (= 0.71.14)
- ReactNativeIncallManager (4.1.0):
- React-Core
- RNCallKeep (4.3.7):
- React
- RNGestureHandler (2.9.0):
- React-Core
- RNNotifee (7.7.1):
Expand Down Expand Up @@ -493,6 +495,7 @@ DEPENDENCIES:
- React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- ReactNativeIncallManager (from `../node_modules/react-native-incall-manager`)
- RNCallKeep (from `../node_modules/react-native-callkeep`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- "RNNotifee (from `../node_modules/@notifee/react-native`)"
- RNReanimated (from `../node_modules/react-native-reanimated`)
Expand Down Expand Up @@ -610,6 +613,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon"
ReactNativeIncallManager:
:path: "../node_modules/react-native-incall-manager"
RNCallKeep:
:path: "../node_modules/react-native-callkeep"
RNGestureHandler:
:path: "../node_modules/react-native-gesture-handler"
RNNotifee:
Expand Down Expand Up @@ -679,6 +684,7 @@ SPEC CHECKSUMS:
React-runtimeexecutor: ffe826b7b1cfbc32a35ed5b64d5886c0ff75f501
ReactCommon: 7f3dd5e98a9ec627c6b03d26c062bf37ea9fc888
ReactNativeIncallManager: 2385505fa5dfdbbc78925e3b8d23b30ce0cde40e
RNCallKeep: 854f73a14c1370c87c600c7e5bb8ab1fcc2e9407
RNGestureHandler: 071d7a9ad81e8b83fe7663b303d132406a7d8f39
RNNotifee: 05692d7bb42b6c718a3906aeb8431c48ff2e8097
RNReanimated: cc5e3aa479cb9170bcccf8204291a6950a3be128
Expand Down
4 changes: 4 additions & 0 deletions ios/RCTAudioModule.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// RCTAudioModule.h
#import <React/RCTBridgeModule.h>
@interface RCTAudioModule : NSObject <RCTBridgeModule>
@end
Loading

0 comments on commit 161f2ba

Please sign in to comment.