浏览代码

feat(rn,sdk) add setConfigOverride to JitsiMeetConferenceOptions

Allows for overriding any (overridable, of course) config option.
master
tmoldovan8x8 3 年前
父节点
当前提交
ae33755913
没有帐户链接到提交者的电子邮件

+ 45
- 67
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetConferenceOptions.java 查看文件

40
      * Room name.
40
      * Room name.
41
      */
41
      */
42
     private String room;
42
     private String room;
43
-    /**
44
-     * Conference subject.
45
-     */
46
-    private String subject;
47
     /**
43
     /**
48
      * JWT token used for authentication.
44
      * JWT token used for authentication.
49
      */
45
      */
55
     private Bundle colorScheme;
51
     private Bundle colorScheme;
56
 
52
 
57
     /**
53
     /**
58
-     * Feature flags. See: https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/flags/constants.js
54
+     * Config. See: https://github.com/jitsi/jitsi-meet/blob/master/config.js
59
      */
55
      */
60
-    private Bundle featureFlags;
56
+    private Bundle config;
61
 
57
 
62
     /**
58
     /**
63
-     * Set to {@code true} to join the conference with audio / video muted or to start in audio
64
-     * only mode respectively.
59
+     * Feature flags. See: https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/flags/constants.js
65
      */
60
      */
66
-    private Boolean audioMuted;
67
-    private Boolean audioOnly;
68
-    private Boolean videoMuted;
61
+    private Bundle featureFlags;
69
 
62
 
70
     /**
63
     /**
71
      * USer information, to be used when no token is specified.
64
      * USer information, to be used when no token is specified.
80
         return room;
73
         return room;
81
     }
74
     }
82
 
75
 
83
-    public String getSubject() {
84
-        return subject;
85
-    }
86
-
87
     public String getToken() {
76
     public String getToken() {
88
         return token;
77
         return token;
89
     }
78
     }
96
         return featureFlags;
85
         return featureFlags;
97
     }
86
     }
98
 
87
 
99
-    public boolean getAudioMuted() {
100
-        return audioMuted;
101
-    }
102
-
103
-    public boolean getAudioOnly() {
104
-        return audioOnly;
105
-    }
106
-
107
-    public boolean getVideoMuted() {
108
-        return videoMuted;
109
-    }
110
-
111
     public JitsiMeetUserInfo getUserInfo() {
88
     public JitsiMeetUserInfo getUserInfo() {
112
         return userInfo;
89
         return userInfo;
113
     }
90
     }
118
     public static class Builder {
95
     public static class Builder {
119
         private URL serverURL;
96
         private URL serverURL;
120
         private String room;
97
         private String room;
121
-        private String subject;
122
         private String token;
98
         private String token;
123
 
99
 
124
         private Bundle colorScheme;
100
         private Bundle colorScheme;
101
+        private Bundle config;
125
         private Bundle featureFlags;
102
         private Bundle featureFlags;
126
 
103
 
127
-        private Boolean audioMuted;
128
-        private Boolean audioOnly;
129
-        private Boolean videoMuted;
130
-
131
         private JitsiMeetUserInfo userInfo;
104
         private JitsiMeetUserInfo userInfo;
132
 
105
 
133
         public Builder() {
106
         public Builder() {
107
+            config = new Bundle();
134
             featureFlags = new Bundle();
108
             featureFlags = new Bundle();
135
         }
109
         }
136
 
110
 
162
          * @return - The {@link Builder} object itself so the method calls can be chained.
136
          * @return - The {@link Builder} object itself so the method calls can be chained.
163
          */
137
          */
164
         public Builder setSubject(String subject) {
138
         public Builder setSubject(String subject) {
165
-            this.subject = subject;
139
+            setConfigOverride("subject", subject);
166
 
140
 
167
             return this;
141
             return this;
168
         }
142
         }
193
 
167
 
194
         /**
168
         /**
195
          * Indicates the conference will be joined with the microphone muted.
169
          * Indicates the conference will be joined with the microphone muted.
196
-         * @param muted - Muted indication.
170
+         * @param audioMuted - Muted indication.
197
          * @return - The {@link Builder} object itself so the method calls can be chained.
171
          * @return - The {@link Builder} object itself so the method calls can be chained.
198
          */
172
          */
199
-        public Builder setAudioMuted(boolean muted) {
200
-            this.audioMuted = muted;
173
+        public Builder setAudioMuted(boolean audioMuted) {
174
+            setConfigOverride("startWithAudioMuted", audioMuted);
201
 
175
 
202
             return this;
176
             return this;
203
         }
177
         }
209
          * @return - The {@link Builder} object itself so the method calls can be chained.
183
          * @return - The {@link Builder} object itself so the method calls can be chained.
210
          */
184
          */
211
         public Builder setAudioOnly(boolean audioOnly) {
185
         public Builder setAudioOnly(boolean audioOnly) {
212
-            this.audioOnly = audioOnly;
186
+            setConfigOverride("startAudioOnly", audioOnly);
213
 
187
 
214
             return this;
188
             return this;
215
         }
189
         }
219
          * @return - The {@link Builder} object itself so the method calls can be chained.
193
          * @return - The {@link Builder} object itself so the method calls can be chained.
220
          */
194
          */
221
         public Builder setVideoMuted(boolean videoMuted) {
195
         public Builder setVideoMuted(boolean videoMuted) {
222
-            this.videoMuted = videoMuted;
196
+            setConfigOverride("startWithVideoMuted", videoMuted);
223
 
197
 
224
             return this;
198
             return this;
225
         }
199
         }
261
             return this;
235
             return this;
262
         }
236
         }
263
 
237
 
238
+        public Builder setConfigOverride(String config, String value) {
239
+            this.config.putString(config, value);
240
+
241
+            return this;
242
+        }
243
+
244
+        public Builder setConfigOverride(String config, int value) {
245
+            this.config.putInt(config, value);
246
+
247
+            return this;
248
+        }
249
+
250
+        public Builder setConfigOverride(String config, boolean value) {
251
+            this.config.putBoolean(config, value);
252
+
253
+            return this;
254
+        }
255
+
256
+        public Builder setConfigOverride(String config, Bundle bundle) {
257
+            this.config.putBundle(config, bundle);
258
+
259
+            return this;
260
+        }
261
+
262
+        public Builder setConfigOverride(String config, String[] list) {
263
+            this.config.putStringArray(config, list);
264
+
265
+            return this;
266
+        }
267
+
264
         /**
268
         /**
265
          * Builds the immutable {@link JitsiMeetConferenceOptions} object with the configuration
269
          * Builds the immutable {@link JitsiMeetConferenceOptions} object with the configuration
266
          * that this {@link Builder} instance specified.
270
          * that this {@link Builder} instance specified.
271
 
275
 
272
             options.serverURL = this.serverURL;
276
             options.serverURL = this.serverURL;
273
             options.room = this.room;
277
             options.room = this.room;
274
-            options.subject = this.subject;
275
             options.token = this.token;
278
             options.token = this.token;
276
             options.colorScheme = this.colorScheme;
279
             options.colorScheme = this.colorScheme;
280
+            options.config = this.config;
277
             options.featureFlags = this.featureFlags;
281
             options.featureFlags = this.featureFlags;
278
-            options.audioMuted = this.audioMuted;
279
-            options.audioOnly = this.audioOnly;
280
-            options.videoMuted = this.videoMuted;
281
             options.userInfo = this.userInfo;
282
             options.userInfo = this.userInfo;
282
 
283
 
283
             return options;
284
             return options;
290
     private JitsiMeetConferenceOptions(Parcel in) {
291
     private JitsiMeetConferenceOptions(Parcel in) {
291
         serverURL = (URL) in.readSerializable();
292
         serverURL = (URL) in.readSerializable();
292
         room = in.readString();
293
         room = in.readString();
293
-        subject = in.readString();
294
         token = in.readString();
294
         token = in.readString();
295
         colorScheme = in.readBundle();
295
         colorScheme = in.readBundle();
296
+        config = in.readBundle();
296
         featureFlags = in.readBundle();
297
         featureFlags = in.readBundle();
297
         userInfo = new JitsiMeetUserInfo(in.readBundle());
298
         userInfo = new JitsiMeetUserInfo(in.readBundle());
298
         byte tmpAudioMuted = in.readByte();
299
         byte tmpAudioMuted = in.readByte();
299
-        audioMuted = tmpAudioMuted == 0 ? null : tmpAudioMuted == 1;
300
-        byte tmpAudioOnly = in.readByte();
301
-        audioOnly = tmpAudioOnly == 0 ? null : tmpAudioOnly == 1;
302
-        byte tmpVideoMuted = in.readByte();
303
-        videoMuted = tmpVideoMuted == 0 ? null : tmpVideoMuted == 1;
304
     }
300
     }
305
 
301
 
306
     Bundle asProps() {
302
     Bundle asProps() {
317
             props.putBundle("colorScheme", colorScheme);
313
             props.putBundle("colorScheme", colorScheme);
318
         }
314
         }
319
 
315
 
320
-        Bundle config = new Bundle();
321
-
322
-        if (audioMuted != null) {
323
-            config.putBoolean("startWithAudioMuted", audioMuted);
324
-        }
325
-        if (audioOnly != null) {
326
-            config.putBoolean("startAudioOnly", audioOnly);
327
-        }
328
-        if (videoMuted != null) {
329
-            config.putBoolean("startWithVideoMuted", videoMuted);
330
-        }
331
-        if (subject != null) {
332
-            config.putString("subject", subject);
333
-        }
334
-
335
         Bundle urlProps = new Bundle();
316
         Bundle urlProps = new Bundle();
336
 
317
 
337
         // The room is fully qualified
318
         // The room is fully qualified
379
     public void writeToParcel(Parcel dest, int flags) {
360
     public void writeToParcel(Parcel dest, int flags) {
380
         dest.writeSerializable(serverURL);
361
         dest.writeSerializable(serverURL);
381
         dest.writeString(room);
362
         dest.writeString(room);
382
-        dest.writeString(subject);
383
         dest.writeString(token);
363
         dest.writeString(token);
384
         dest.writeBundle(colorScheme);
364
         dest.writeBundle(colorScheme);
365
+        dest.writeBundle(config);
385
         dest.writeBundle(featureFlags);
366
         dest.writeBundle(featureFlags);
386
         dest.writeBundle(userInfo != null ? userInfo.asBundle() : new Bundle());
367
         dest.writeBundle(userInfo != null ? userInfo.asBundle() : new Bundle());
387
-        dest.writeByte((byte) (audioMuted == null ? 0 : audioMuted ? 1 : 2));
388
-        dest.writeByte((byte) (audioOnly == null ? 0 : audioOnly ? 1 : 2));
389
-        dest.writeByte((byte) (videoMuted == null ? 0 : videoMuted ? 1 : 2));
390
     }
368
     }
391
 
369
 
392
     @Override
370
     @Override

+ 3
- 0
config.js 查看文件

594
     },
594
     },
595
 
595
 
596
     analytics: {
596
     analytics: {
597
+        // True if the analytics should be disabled
598
+        // disabled: false,
599
+
597
         // The Google Analytics Tracking ID:
600
         // The Google Analytics Tracking ID:
598
         // googleAnalyticsTrackingId: 'your-tracking-id-UA-123456-1'
601
         // googleAnalyticsTrackingId: 'your-tracking-id-UA-123456-1'
599
 
602
 

+ 11
- 27
ios/sdk/src/JitsiMeetConferenceOptions.h 查看文件

29
  * Room name.
29
  * Room name.
30
  */
30
  */
31
 @property (nonatomic, copy, nullable) NSString *room;
31
 @property (nonatomic, copy, nullable) NSString *room;
32
-/**
33
- * Conference subject.
34
- */
35
-@property (nonatomic, copy, nullable) NSString *subject;
36
 /**
32
 /**
37
  * JWT token used for authentication.
33
  * JWT token used for authentication.
38
  */
34
  */
49
  */
45
  */
50
 @property (nonatomic, readonly, nonnull) NSDictionary *featureFlags;
46
 @property (nonatomic, readonly, nonnull) NSDictionary *featureFlags;
51
 
47
 
52
-/**
53
- * Set to YES to join the conference with audio / video muted or to start in audio
54
- * only mode respectively.
55
- */
56
-@property (nonatomic) BOOL audioOnly;
57
-@property (nonatomic) BOOL audioMuted;
58
-@property (nonatomic) BOOL videoMuted;
48
+@property (nonatomic, readonly, nonnull) NSDictionary *config;
59
 
49
 
60
 /**
50
 /**
61
  * Set to YES to enable the welcome page. Typically SDK users won't need this enabled
51
  * Set to YES to enable the welcome page. Typically SDK users won't need this enabled
71
 - (void)setFeatureFlag:(NSString *_Nonnull)flag withBoolean:(BOOL)value;
61
 - (void)setFeatureFlag:(NSString *_Nonnull)flag withBoolean:(BOOL)value;
72
 - (void)setFeatureFlag:(NSString *_Nonnull)flag withValue:(id _Nonnull)value;
62
 - (void)setFeatureFlag:(NSString *_Nonnull)flag withValue:(id _Nonnull)value;
73
 
63
 
74
-/**
75
- * CallKit call handle, to be used when implementing incoming calls.
76
- */
77
-@property (nonatomic, copy, nullable) NSString *callHandle;
64
+- (void)setConfigOverride:(NSString *_Nonnull)config withBoolean:(BOOL)value;
65
+- (void)setConfigOverride:(NSString *_Nonnull)config withValue:(id _Nonnull)value;
66
+- (void)setConfigOverride:(NSString *_Nonnull)config withDictionary:(NSDictionary * _Nonnull)dictionary;
67
+- (void)setConfigOverride:(NSString *_Nonnull)config withArray:( NSArray * _Nonnull)array;
78
 
68
 
79
-/**
80
- * CallKit call UUID, to be used when implementing incoming calls.
81
- */
82
-@property (nonatomic, copy, nullable) NSUUID *callUUID;
69
+- (void)setAudioOnly:(BOOL)audioOnly;
70
+- (void)setAudioMuted:(BOOL)audioMuted;
71
+- (void)setVideoMuted:(BOOL)videoMuted;
72
+- (void)setCallHandle:(NSString *_Nonnull)callHandle;
73
+- (void)setCallUUID:(NSUUID *_Nonnull)callUUID;
74
+- (void)setSubject:(NSString *_Nonnull)subject;
83
 
75
 
84
 @end
76
 @end
85
 
77
 
88
 @property (nonatomic, copy, nullable, readonly) NSURL *serverURL;
80
 @property (nonatomic, copy, nullable, readonly) NSURL *serverURL;
89
 
81
 
90
 @property (nonatomic, copy, nullable, readonly) NSString *room;
82
 @property (nonatomic, copy, nullable, readonly) NSString *room;
91
-@property (nonatomic, copy, nullable, readonly) NSString *subject;
92
 @property (nonatomic, copy, nullable, readonly) NSString *token;
83
 @property (nonatomic, copy, nullable, readonly) NSString *token;
93
 
84
 
94
 @property (nonatomic, copy, nullable) NSDictionary *colorScheme;
85
 @property (nonatomic, copy, nullable) NSDictionary *colorScheme;
95
 @property (nonatomic, readonly, nonnull) NSDictionary *featureFlags;
86
 @property (nonatomic, readonly, nonnull) NSDictionary *featureFlags;
96
 
87
 
97
-@property (nonatomic, readonly) BOOL audioOnly;
98
-@property (nonatomic, readonly) BOOL audioMuted;
99
-@property (nonatomic, readonly) BOOL videoMuted;
100
-
101
 @property (nonatomic, readonly) BOOL welcomePageEnabled;
88
 @property (nonatomic, readonly) BOOL welcomePageEnabled;
102
 
89
 
103
 @property (nonatomic, nullable) JitsiMeetUserInfo *userInfo;
90
 @property (nonatomic, nullable) JitsiMeetUserInfo *userInfo;
104
 
91
 
105
-@property (nonatomic, copy, nullable, readonly) NSString *callHandle;
106
-@property (nonatomic, copy, nullable, readonly) NSUUID *callUUID;
107
-
108
 + (instancetype _Nonnull)fromBuilder:(void (^_Nonnull)(JitsiMeetConferenceOptionsBuilder *_Nonnull))initBlock;
92
 + (instancetype _Nonnull)fromBuilder:(void (^_Nonnull)(JitsiMeetConferenceOptionsBuilder *_Nonnull))initBlock;
109
 - (instancetype _Nonnull)init NS_UNAVAILABLE;
93
 - (instancetype _Nonnull)init NS_UNAVAILABLE;
110
 
94
 

+ 34
- 87
ios/sdk/src/JitsiMeetConferenceOptions.m 查看文件

26
 
26
 
27
 
27
 
28
 @implementation JitsiMeetConferenceOptionsBuilder {
28
 @implementation JitsiMeetConferenceOptionsBuilder {
29
-    NSNumber *_audioOnly;
30
-    NSNumber *_audioMuted;
31
-    NSNumber *_videoMuted;
32
     NSMutableDictionary *_featureFlags;
29
     NSMutableDictionary *_featureFlags;
30
+    NSMutableDictionary *_config;
33
 }
31
 }
34
 
32
 
35
-@dynamic audioOnly;
36
-@dynamic audioMuted;
37
-@dynamic videoMuted;
38
 @dynamic welcomePageEnabled;
33
 @dynamic welcomePageEnabled;
39
 
34
 
40
 - (instancetype)init {
35
 - (instancetype)init {
41
     if (self = [super init]) {
36
     if (self = [super init]) {
42
         _serverURL = nil;
37
         _serverURL = nil;
43
         _room = nil;
38
         _room = nil;
44
-        _subject = nil;
45
         _token = nil;
39
         _token = nil;
46
 
40
 
47
         _colorScheme = nil;
41
         _colorScheme = nil;
42
+        _config = [[NSMutableDictionary alloc] init];
48
         _featureFlags = [[NSMutableDictionary alloc] init];
43
         _featureFlags = [[NSMutableDictionary alloc] init];
49
 
44
 
50
-        _audioOnly = nil;
51
-        _audioMuted = nil;
52
-        _videoMuted = nil;
53
-
54
         _userInfo = nil;
45
         _userInfo = nil;
55
-
56
-        _callHandle = nil;
57
-        _callUUID = nil;
58
     }
46
     }
59
     
47
     
60
     return self;
48
     return self;
68
     _featureFlags[flag] = value;
56
     _featureFlags[flag] = value;
69
 }
57
 }
70
 
58
 
71
-#pragma mark - Dynamic properties
72
-
73
 - (void)setAudioOnly:(BOOL)audioOnly {
59
 - (void)setAudioOnly:(BOOL)audioOnly {
74
-    _audioOnly = [NSNumber numberWithBool:audioOnly];
75
-}
76
-
77
-- (BOOL)audioOnly {
78
-    return _audioOnly && [_audioOnly boolValue];
60
+    [self setConfigOverride:@"startAudioOnly" withBoolean:audioOnly];
79
 }
61
 }
80
 
62
 
81
 - (void)setAudioMuted:(BOOL)audioMuted {
63
 - (void)setAudioMuted:(BOOL)audioMuted {
82
-    _audioMuted = [NSNumber numberWithBool:audioMuted];
64
+    [self setConfigOverride:@"startWithAudioMuted" withBoolean:audioMuted];
83
 }
65
 }
84
 
66
 
85
-- (BOOL)audioMuted {
86
-    return _audioMuted && [_audioMuted boolValue];
67
+- (void)setVideoMuted:(BOOL)videoMuted {
68
+    [self setConfigOverride:@"startWithVideoMuted" withBoolean:videoMuted];
87
 }
69
 }
88
 
70
 
89
-- (void)setVideoMuted:(BOOL)videoMuted {
90
-    _videoMuted = [NSNumber numberWithBool:videoMuted];
71
+- (void)setCallHandle:(NSString *_Nonnull)callHandle {
72
+    [self setConfigOverride:@"callHandle" withValue:callHandle];
91
 }
73
 }
92
 
74
 
93
-- (BOOL)videoMuted {
94
-    return _videoMuted && [_videoMuted boolValue];
75
+- (void)setCallUUID:(NSUUID *_Nonnull)callUUID {
76
+    [self setConfigOverride:@"callUUID" withValue:[callUUID UUIDString]];
95
 }
77
 }
96
 
78
 
97
-- (void)setWelcomePageEnabled:(BOOL)welcomePageEnabled {
98
-    [self setFeatureFlag:WelcomePageEnabledFeatureFlag
99
-               withBoolean:welcomePageEnabled];
79
+- (void)setSubject:(NSString *_Nonnull)subject {
80
+    [self setConfigOverride:@"subject" withValue:subject];
100
 }
81
 }
101
 
82
 
102
-- (BOOL)welcomePageEnabled {
103
-    NSNumber *n = _featureFlags[WelcomePageEnabledFeatureFlag];
83
+- (void)setConfigOverride:(NSString *_Nonnull)config withBoolean:(BOOL)value {
84
+    [self setConfigOverride:config withValue:[NSNumber numberWithBool:value]];
85
+}
104
 
86
 
105
-    return n != nil ? [n boolValue] : NO;
87
+- (void)setConfigOverride:(NSString *_Nonnull)config withDictionary:(NSDictionary*)dictionary {
88
+    _config[config] = dictionary;
106
 }
89
 }
107
 
90
 
108
-#pragma mark - Private API
91
+- (void)setConfigOverride:(NSString *_Nonnull)config withArray:( NSArray * _Nonnull)array {
92
+    _config[config] = array;
93
+}
109
 
94
 
110
-- (NSNumber *)getAudioOnly {
111
-    return _audioOnly;
95
+- (void)setConfigOverride:(NSString *_Nonnull)config withValue:(id _Nonnull)value {
96
+    _config[config] = value;
112
 }
97
 }
113
 
98
 
114
-- (NSNumber *)getAudioMuted {
115
-    return _audioMuted;
99
+#pragma mark - Dynamic properties
100
+
101
+- (void)setWelcomePageEnabled:(BOOL)welcomePageEnabled {
102
+    [self setFeatureFlag:WelcomePageEnabledFeatureFlag
103
+               withBoolean:welcomePageEnabled];
116
 }
104
 }
117
 
105
 
118
-- (NSNumber *)getVideoMuted {
119
-    return _videoMuted;
106
+- (BOOL)welcomePageEnabled {
107
+    NSNumber *n = _featureFlags[WelcomePageEnabledFeatureFlag];
108
+
109
+    return n != nil ? [n boolValue] : NO;
120
 }
110
 }
121
 
111
 
122
 @end
112
 @end
123
 
113
 
124
 @implementation JitsiMeetConferenceOptions {
114
 @implementation JitsiMeetConferenceOptions {
125
-    NSNumber *_audioOnly;
126
-    NSNumber *_audioMuted;
127
-    NSNumber *_videoMuted;
128
     NSDictionary *_featureFlags;
115
     NSDictionary *_featureFlags;
116
+    NSDictionary *_config;
129
 }
117
 }
130
 
118
 
131
-@dynamic audioOnly;
132
-@dynamic audioMuted;
133
-@dynamic videoMuted;
134
 @dynamic welcomePageEnabled;
119
 @dynamic welcomePageEnabled;
135
 
120
 
136
 #pragma mark - Dynamic properties
121
 #pragma mark - Dynamic properties
137
 
122
 
138
-- (BOOL)audioOnly {
139
-    return _audioOnly && [_audioOnly boolValue];
140
-}
141
-
142
-- (BOOL)audioMuted {
143
-    return _audioMuted && [_audioMuted boolValue];
144
-}
145
-
146
-- (BOOL)videoMuted {
147
-    return _videoMuted && [_videoMuted boolValue];
148
-}
149
-
150
 - (BOOL)welcomePageEnabled {
123
 - (BOOL)welcomePageEnabled {
151
     NSNumber *n = _featureFlags[WelcomePageEnabledFeatureFlag];
124
     NSNumber *n = _featureFlags[WelcomePageEnabledFeatureFlag];
152
 
125
 
159
     if (self = [super init]) {
132
     if (self = [super init]) {
160
         _serverURL = builder.serverURL;
133
         _serverURL = builder.serverURL;
161
         _room = builder.room;
134
         _room = builder.room;
162
-        _subject = builder.subject;
163
         _token = builder.token;
135
         _token = builder.token;
164
 
136
 
165
         _colorScheme = builder.colorScheme;
137
         _colorScheme = builder.colorScheme;
166
 
138
 
167
-        _audioOnly = [builder getAudioOnly];
168
-        _audioMuted = [builder getAudioMuted];
169
-        _videoMuted = [builder getVideoMuted];
139
+        _config = builder.config;
170
 
140
 
171
         _featureFlags = [NSDictionary dictionaryWithDictionary:builder.featureFlags];
141
         _featureFlags = [NSDictionary dictionaryWithDictionary:builder.featureFlags];
172
 
142
 
173
         _userInfo = builder.userInfo;
143
         _userInfo = builder.userInfo;
174
-
175
-        _callHandle = builder.callHandle;
176
-        _callUUID = builder.callUUID;
177
     }
144
     }
178
 
145
 
179
     return self;
146
     return self;
198
         props[@"colorScheme"] = self.colorScheme;
165
         props[@"colorScheme"] = self.colorScheme;
199
     }
166
     }
200
 
167
 
201
-    NSMutableDictionary *config = [[NSMutableDictionary alloc] init];
202
-    if (_audioOnly != nil) {
203
-        config[@"startAudioOnly"] = @(self.audioOnly);
204
-    }
205
-    if (_audioMuted != nil) {
206
-        config[@"startWithAudioMuted"] = @(self.audioMuted);
207
-    }
208
-    if (_videoMuted != nil) {
209
-        config[@"startWithVideoMuted"] = @(self.videoMuted);
210
-    }
211
-    if (_subject != nil) {
212
-        config[@"subject"] = self.subject;
213
-    }
214
-    if (_callHandle != nil) {
215
-        config[@"callHandle"] = self.callHandle;
216
-    }
217
-    if (_callUUID != nil) {
218
-        config[@"callUUID"] = [self.callUUID UUIDString];
219
-    }
220
-
221
     NSMutableDictionary *urlProps = [[NSMutableDictionary alloc] init];
168
     NSMutableDictionary *urlProps = [[NSMutableDictionary alloc] init];
222
 
169
 
223
     // The room is fully qualified.
170
     // The room is fully qualified.
241
         props[@"userInfo"] = [self.userInfo asDict];
188
         props[@"userInfo"] = [self.userInfo asDict];
242
     }
189
     }
243
 
190
 
244
-    urlProps[@"config"] = config;
191
+    urlProps[@"config"] = _config;
245
     props[@"url"] = urlProps;
192
     props[@"url"] = urlProps;
246
 
193
 
247
     return props;
194
     return props;

正在加载...
取消
保存