Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(ios) add ability to configure the native WebRTC logging level

Saúl Ibarra Corretgé07a25a1f0055
diff --git a/ios/app/src/AppDelegate.m b/ios/app/src/AppDelegate.m
index d2903206db..6fe43f6ef1 100644
--- a/ios/app/src/AppDelegate.m
+++ b/ios/app/src/AppDelegate.m
@@ -29,6 +29,10 @@
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
JitsiMeet *jitsiMeet = [JitsiMeet sharedInstance];
+#if 0
+ jitsiMeet.webRtcLoggingSeverity = WebRTCLoggingSeverityVerbose;
+#endif
+
jitsiMeet.conferenceActivityType = JitsiMeetConferenceActivityType;
jitsiMeet.customUrlScheme = @"org.jitsi.meet";
jitsiMeet.universalLinkDomains = @[@"meet.jit.si", @"alpha.jitsi.net", @"beta.meet.jit.si"];
diff --git a/ios/sdk/src/JitsiMeet.h b/ios/sdk/src/JitsiMeet.h
index cc26b1cb33..4614954dcb 100644
--- a/ios/sdk/src/JitsiMeet.h
+++ b/ios/sdk/src/JitsiMeet.h
@@ -19,6 +19,15 @@
#import <JitsiMeetSDK/JitsiMeetConferenceOptions.h>
+// Matches RTCLoggingSeverity from RTCLogging.h
+typedef NS_ENUM(NSInteger, WebRTCLoggingSeverity) {
+ WebRTCLoggingSeverityVerbose,
+ WebRTCLoggingSeverityInfo,
+ WebRTCLoggingSeverityWarning,
+ WebRTCLoggingSeverityError,
+ WebRTCLoggingSeverityNone,
+};
+
@interface JitsiMeet : NSObject
/**
@@ -26,14 +35,17 @@
* SiriKit or Handoff, for example.
*/
@property (copy, nonatomic, nullable) NSString *conferenceActivityType;
+
/**
* Custom URL scheme used for deep-linking.
*/
@property (copy, nonatomic, nullable) NSString *customUrlScheme;
+
/**
* List of domains used for universal linking.
*/
@property (copy, nonatomic, nullable) NSArray<NSString *> *universalLinkDomains;
+
/**
* Default conference options used for all conferences. These options will be merged
* with those passed to JitsiMeetView.join when joining a conference.
@@ -47,6 +59,11 @@
*/
@property (nonatomic, strong, nullable) id rtcAudioDevice;
+/**
+ * Specify WebRTC logging severity.
+ */
+@property (nonatomic, assign) WebRTCLoggingSeverity webRtcLoggingSeverity;
+
#pragma mark - This class is a singleton
+ (instancetype _Nonnull)sharedInstance;
diff --git a/ios/sdk/src/JitsiMeet.m b/ios/sdk/src/JitsiMeet.m
index d19f5ac616..afa89cc515 100644
--- a/ios/sdk/src/JitsiMeet.m
+++ b/ios/sdk/src/JitsiMeet.m
@@ -54,6 +54,10 @@
- (instancetype)init {
if (self = [super init]) {
+ // Initialize WebRTC options.
+ self.rtcAudioDevice = nil;
+ self.webRtcLoggingSeverity = WebRTCLoggingSeverityNone;
+
// Initialize the listener for handling start/stop screensharing notifications.
_screenshareEventEmiter = [[ScheenshareEventEmiter alloc] init];
@@ -135,12 +139,8 @@
// Initialize WebRTC options.
WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
- if (_rtcAudioDevice != nil) {
- options.audioDevice = _rtcAudioDevice;
- }
-#if 0
- options.loggingSeverity = RTCLoggingSeverityInfo;
-#endif
+ options.audioDevice = _rtcAudioDevice;
+ options.loggingSeverity = (RTCLoggingSeverity)_webRtcLoggingSeverity;
// Initialize the one and only bridge for interfacing with React Native.
_bridgeWrapper = [[RCTBridgeWrapper alloc] init];