|
@@ -40,10 +40,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
40
|
40
|
* Room name.
|
41
|
41
|
*/
|
42
|
42
|
private String room;
|
43
|
|
- /**
|
44
|
|
- * Conference subject.
|
45
|
|
- */
|
46
|
|
- private String subject;
|
47
|
43
|
/**
|
48
|
44
|
* JWT token used for authentication.
|
49
|
45
|
*/
|
|
@@ -55,17 +51,14 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
55
|
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
|
64
|
* USer information, to be used when no token is specified.
|
|
@@ -80,10 +73,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
80
|
73
|
return room;
|
81
|
74
|
}
|
82
|
75
|
|
83
|
|
- public String getSubject() {
|
84
|
|
- return subject;
|
85
|
|
- }
|
86
|
|
-
|
87
|
76
|
public String getToken() {
|
88
|
77
|
return token;
|
89
|
78
|
}
|
|
@@ -96,18 +85,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
96
|
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
|
88
|
public JitsiMeetUserInfo getUserInfo() {
|
112
|
89
|
return userInfo;
|
113
|
90
|
}
|
|
@@ -118,19 +95,16 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
118
|
95
|
public static class Builder {
|
119
|
96
|
private URL serverURL;
|
120
|
97
|
private String room;
|
121
|
|
- private String subject;
|
122
|
98
|
private String token;
|
123
|
99
|
|
124
|
100
|
private Bundle colorScheme;
|
|
101
|
+ private Bundle config;
|
125
|
102
|
private Bundle featureFlags;
|
126
|
103
|
|
127
|
|
- private Boolean audioMuted;
|
128
|
|
- private Boolean audioOnly;
|
129
|
|
- private Boolean videoMuted;
|
130
|
|
-
|
131
|
104
|
private JitsiMeetUserInfo userInfo;
|
132
|
105
|
|
133
|
106
|
public Builder() {
|
|
107
|
+ config = new Bundle();
|
134
|
108
|
featureFlags = new Bundle();
|
135
|
109
|
}
|
136
|
110
|
|
|
@@ -162,7 +136,7 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
162
|
136
|
* @return - The {@link Builder} object itself so the method calls can be chained.
|
163
|
137
|
*/
|
164
|
138
|
public Builder setSubject(String subject) {
|
165
|
|
- this.subject = subject;
|
|
139
|
+ setConfigOverride("subject", subject);
|
166
|
140
|
|
167
|
141
|
return this;
|
168
|
142
|
}
|
|
@@ -193,11 +167,11 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
193
|
167
|
|
194
|
168
|
/**
|
195
|
169
|
* Indicates the conference will be joined with the microphone muted.
|
196
|
|
- * @param muted - Muted indication.
|
|
170
|
+ * @param audioMuted - Muted indication.
|
197
|
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
|
176
|
return this;
|
203
|
177
|
}
|
|
@@ -209,7 +183,7 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
209
|
183
|
* @return - The {@link Builder} object itself so the method calls can be chained.
|
210
|
184
|
*/
|
211
|
185
|
public Builder setAudioOnly(boolean audioOnly) {
|
212
|
|
- this.audioOnly = audioOnly;
|
|
186
|
+ setConfigOverride("startAudioOnly", audioOnly);
|
213
|
187
|
|
214
|
188
|
return this;
|
215
|
189
|
}
|
|
@@ -219,7 +193,7 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
219
|
193
|
* @return - The {@link Builder} object itself so the method calls can be chained.
|
220
|
194
|
*/
|
221
|
195
|
public Builder setVideoMuted(boolean videoMuted) {
|
222
|
|
- this.videoMuted = videoMuted;
|
|
196
|
+ setConfigOverride("startWithVideoMuted", videoMuted);
|
223
|
197
|
|
224
|
198
|
return this;
|
225
|
199
|
}
|
|
@@ -261,6 +235,36 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
261
|
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
|
269
|
* Builds the immutable {@link JitsiMeetConferenceOptions} object with the configuration
|
266
|
270
|
* that this {@link Builder} instance specified.
|
|
@@ -271,13 +275,10 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
271
|
275
|
|
272
|
276
|
options.serverURL = this.serverURL;
|
273
|
277
|
options.room = this.room;
|
274
|
|
- options.subject = this.subject;
|
275
|
278
|
options.token = this.token;
|
276
|
279
|
options.colorScheme = this.colorScheme;
|
|
280
|
+ options.config = this.config;
|
277
|
281
|
options.featureFlags = this.featureFlags;
|
278
|
|
- options.audioMuted = this.audioMuted;
|
279
|
|
- options.audioOnly = this.audioOnly;
|
280
|
|
- options.videoMuted = this.videoMuted;
|
281
|
282
|
options.userInfo = this.userInfo;
|
282
|
283
|
|
283
|
284
|
return options;
|
|
@@ -290,17 +291,12 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
290
|
291
|
private JitsiMeetConferenceOptions(Parcel in) {
|
291
|
292
|
serverURL = (URL) in.readSerializable();
|
292
|
293
|
room = in.readString();
|
293
|
|
- subject = in.readString();
|
294
|
294
|
token = in.readString();
|
295
|
295
|
colorScheme = in.readBundle();
|
|
296
|
+ config = in.readBundle();
|
296
|
297
|
featureFlags = in.readBundle();
|
297
|
298
|
userInfo = new JitsiMeetUserInfo(in.readBundle());
|
298
|
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
|
302
|
Bundle asProps() {
|
|
@@ -317,21 +313,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
317
|
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
|
316
|
Bundle urlProps = new Bundle();
|
336
|
317
|
|
337
|
318
|
// The room is fully qualified
|
|
@@ -379,14 +360,11 @@ public class JitsiMeetConferenceOptions implements Parcelable {
|
379
|
360
|
public void writeToParcel(Parcel dest, int flags) {
|
380
|
361
|
dest.writeSerializable(serverURL);
|
381
|
362
|
dest.writeString(room);
|
382
|
|
- dest.writeString(subject);
|
383
|
363
|
dest.writeString(token);
|
384
|
364
|
dest.writeBundle(colorScheme);
|
|
365
|
+ dest.writeBundle(config);
|
385
|
366
|
dest.writeBundle(featureFlags);
|
386
|
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
|
370
|
@Override
|