소스 검색

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

factor2
Saúl Ibarra Corretgé 8 달 전
부모
커밋
07a25a1f00
3개의 변경된 파일27개의 추가작업 그리고 6개의 파일을 삭제
  1. 4
    0
      ios/app/src/AppDelegate.m
  2. 17
    0
      ios/sdk/src/JitsiMeet.h
  3. 6
    6
      ios/sdk/src/JitsiMeet.m

+ 4
- 0
ios/app/src/AppDelegate.m 파일 보기

29
   didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
29
   didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
30
     JitsiMeet *jitsiMeet = [JitsiMeet sharedInstance];
30
     JitsiMeet *jitsiMeet = [JitsiMeet sharedInstance];
31
 
31
 
32
+#if 0
33
+    jitsiMeet.webRtcLoggingSeverity = WebRTCLoggingSeverityVerbose;
34
+#endif
35
+
32
     jitsiMeet.conferenceActivityType = JitsiMeetConferenceActivityType;
36
     jitsiMeet.conferenceActivityType = JitsiMeetConferenceActivityType;
33
     jitsiMeet.customUrlScheme = @"org.jitsi.meet";
37
     jitsiMeet.customUrlScheme = @"org.jitsi.meet";
34
     jitsiMeet.universalLinkDomains = @[@"meet.jit.si", @"alpha.jitsi.net", @"beta.meet.jit.si"];
38
     jitsiMeet.universalLinkDomains = @[@"meet.jit.si", @"alpha.jitsi.net", @"beta.meet.jit.si"];

+ 17
- 0
ios/sdk/src/JitsiMeet.h 파일 보기

19
 
19
 
20
 #import <JitsiMeetSDK/JitsiMeetConferenceOptions.h>
20
 #import <JitsiMeetSDK/JitsiMeetConferenceOptions.h>
21
 
21
 
22
+// Matches RTCLoggingSeverity from RTCLogging.h
23
+typedef NS_ENUM(NSInteger, WebRTCLoggingSeverity) {
24
+  WebRTCLoggingSeverityVerbose,
25
+  WebRTCLoggingSeverityInfo,
26
+  WebRTCLoggingSeverityWarning,
27
+  WebRTCLoggingSeverityError,
28
+  WebRTCLoggingSeverityNone,
29
+};
30
+
22
 @interface JitsiMeet : NSObject
31
 @interface JitsiMeet : NSObject
23
 
32
 
24
 /**
33
 /**
26
  * SiriKit or Handoff, for example.
35
  * SiriKit or Handoff, for example.
27
  */
36
  */
28
 @property (copy, nonatomic, nullable) NSString *conferenceActivityType;
37
 @property (copy, nonatomic, nullable) NSString *conferenceActivityType;
38
+
29
 /**
39
 /**
30
  * Custom URL scheme used for deep-linking.
40
  * Custom URL scheme used for deep-linking.
31
  */
41
  */
32
 @property (copy, nonatomic, nullable) NSString *customUrlScheme;
42
 @property (copy, nonatomic, nullable) NSString *customUrlScheme;
43
+
33
 /**
44
 /**
34
  * List of domains used for universal linking.
45
  * List of domains used for universal linking.
35
  */
46
  */
36
 @property (copy, nonatomic, nullable) NSArray<NSString *> *universalLinkDomains;
47
 @property (copy, nonatomic, nullable) NSArray<NSString *> *universalLinkDomains;
48
+
37
 /**
49
 /**
38
  * Default conference options used for all conferences. These options will be merged
50
  * Default conference options used for all conferences. These options will be merged
39
  * with those passed to JitsiMeetView.join when joining a conference.
51
  * with those passed to JitsiMeetView.join when joining a conference.
47
  */
59
  */
48
 @property (nonatomic, strong, nullable) id rtcAudioDevice;
60
 @property (nonatomic, strong, nullable) id rtcAudioDevice;
49
 
61
 
62
+/**
63
+ * Specify WebRTC logging severity.
64
+ */
65
+@property (nonatomic, assign) WebRTCLoggingSeverity webRtcLoggingSeverity;
66
+
50
 #pragma mark - This class is a singleton
67
 #pragma mark - This class is a singleton
51
 
68
 
52
 + (instancetype _Nonnull)sharedInstance;
69
 + (instancetype _Nonnull)sharedInstance;

+ 6
- 6
ios/sdk/src/JitsiMeet.m 파일 보기

54
 
54
 
55
 - (instancetype)init {
55
 - (instancetype)init {
56
     if (self = [super init]) {
56
     if (self = [super init]) {
57
+        // Initialize WebRTC options.
58
+        self.rtcAudioDevice = nil;
59
+        self.webRtcLoggingSeverity = WebRTCLoggingSeverityNone;
60
+
57
         // Initialize the listener for handling start/stop screensharing notifications.
61
         // Initialize the listener for handling start/stop screensharing notifications.
58
         _screenshareEventEmiter = [[ScheenshareEventEmiter alloc] init];
62
         _screenshareEventEmiter = [[ScheenshareEventEmiter alloc] init];
59
 
63
 
135
 
139
 
136
     // Initialize WebRTC options.
140
     // Initialize WebRTC options.
137
     WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
141
     WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
138
-    if (_rtcAudioDevice != nil) {
139
-        options.audioDevice = _rtcAudioDevice;
140
-    }
141
-#if 0
142
-    options.loggingSeverity = RTCLoggingSeverityInfo;
143
-#endif
142
+    options.audioDevice = _rtcAudioDevice;
143
+    options.loggingSeverity = (RTCLoggingSeverity)_webRtcLoggingSeverity;
144
 
144
 
145
     // Initialize the one and only bridge for interfacing with React Native.
145
     // Initialize the one and only bridge for interfacing with React Native.
146
     _bridgeWrapper = [[RCTBridgeWrapper alloc] init];
146
     _bridgeWrapper = [[RCTBridgeWrapper alloc] init];

Loading…
취소
저장