ソースを参照

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

+ 17
- 0
ios/sdk/src/JitsiMeet.h ファイルの表示

@@ -19,6 +19,15 @@
19 19
 
20 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 31
 @interface JitsiMeet : NSObject
23 32
 
24 33
 /**
@@ -26,14 +35,17 @@
26 35
  * SiriKit or Handoff, for example.
27 36
  */
28 37
 @property (copy, nonatomic, nullable) NSString *conferenceActivityType;
38
+
29 39
 /**
30 40
  * Custom URL scheme used for deep-linking.
31 41
  */
32 42
 @property (copy, nonatomic, nullable) NSString *customUrlScheme;
43
+
33 44
 /**
34 45
  * List of domains used for universal linking.
35 46
  */
36 47
 @property (copy, nonatomic, nullable) NSArray<NSString *> *universalLinkDomains;
48
+
37 49
 /**
38 50
  * Default conference options used for all conferences. These options will be merged
39 51
  * with those passed to JitsiMeetView.join when joining a conference.
@@ -47,6 +59,11 @@
47 59
  */
48 60
 @property (nonatomic, strong, nullable) id rtcAudioDevice;
49 61
 
62
+/**
63
+ * Specify WebRTC logging severity.
64
+ */
65
+@property (nonatomic, assign) WebRTCLoggingSeverity webRtcLoggingSeverity;
66
+
50 67
 #pragma mark - This class is a singleton
51 68
 
52 69
 + (instancetype _Nonnull)sharedInstance;

+ 6
- 6
ios/sdk/src/JitsiMeet.m ファイルの表示

@@ -54,6 +54,10 @@
54 54
 
55 55
 - (instancetype)init {
56 56
     if (self = [super init]) {
57
+        // Initialize WebRTC options.
58
+        self.rtcAudioDevice = nil;
59
+        self.webRtcLoggingSeverity = WebRTCLoggingSeverityNone;
60
+
57 61
         // Initialize the listener for handling start/stop screensharing notifications.
58 62
         _screenshareEventEmiter = [[ScheenshareEventEmiter alloc] init];
59 63
 
@@ -135,12 +139,8 @@
135 139
 
136 140
     // Initialize WebRTC options.
137 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 145
     // Initialize the one and only bridge for interfacing with React Native.
146 146
     _bridgeWrapper = [[RCTBridgeWrapper alloc] init];

読み込み中…
キャンセル
保存