mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(ios) add ability to inject a custom RTCAudioDevice implementation
It allows for full control over the audio handling.
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
e9a8fd5392
commit
d6bbe07cf2
@@ -40,6 +40,13 @@
|
||||
*/
|
||||
@property (nonatomic, nullable) JitsiMeetConferenceOptions *defaultConferenceOptions;
|
||||
|
||||
/**
|
||||
* Custom RTCAudioDevice implementation.
|
||||
* https://github.com/jitsi/webrtc/blob/M124/sdk/objc/components/audio/RTCAudioDevice.h
|
||||
* https://github.com/mstyura/RTCAudioDevice
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) id rtcAudioDevice;
|
||||
|
||||
#pragma mark - This class is a singleton
|
||||
|
||||
+ (instancetype _Nonnull)sharedInstance;
|
||||
|
||||
@@ -54,15 +54,6 @@
|
||||
|
||||
- (instancetype)init {
|
||||
if (self = [super init]) {
|
||||
#if 0
|
||||
// Initialize WebRTC options.
|
||||
WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
|
||||
options.loggingSeverity = RTCLoggingSeverityInfo;
|
||||
#endif
|
||||
|
||||
// Initialize the one and only bridge for interfacing with React Native.
|
||||
_bridgeWrapper = [[RCTBridgeWrapper alloc] init];
|
||||
|
||||
// Initialize the listener for handling start/stop screensharing notifications.
|
||||
_screenshareEventEmiter = [[ScheenshareEventEmiter alloc] init];
|
||||
|
||||
@@ -142,6 +133,16 @@
|
||||
return;
|
||||
};
|
||||
|
||||
// Initialize WebRTC options.
|
||||
WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
|
||||
if (_rtcAudioDevice != nil) {
|
||||
options.audioDevice = _rtcAudioDevice;
|
||||
}
|
||||
#if 0
|
||||
options.loggingSeverity = RTCLoggingSeverityInfo;
|
||||
#endif
|
||||
|
||||
// Initialize the one and only bridge for interfacing with React Native.
|
||||
_bridgeWrapper = [[RCTBridgeWrapper alloc] init];
|
||||
}
|
||||
|
||||
@@ -249,6 +250,8 @@
|
||||
}
|
||||
|
||||
- (RCTBridge *)getReactBridge {
|
||||
// Initialize bridge lazily.
|
||||
[self instantiateReactNativeBridge];
|
||||
return _bridgeWrapper.bridge;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user