Pārlūkot izejas kodu

rn: add ability to set the conference subject

j8
Saúl Ibarra Corretgé 6 gadus atpakaļ
vecāks
revīzija
d65b71b584

+ 22
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetConferenceOptions.java Parādīt failu

@@ -40,6 +40,10 @@ 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;
43 47
     /**
44 48
      * JWT token used for authentication.
45 49
      */
@@ -70,6 +74,7 @@ public class JitsiMeetConferenceOptions implements Parcelable {
70 74
     public static class Builder {
71 75
         private URL serverURL;
72 76
         private String room;
77
+        private String subject;
73 78
         private String token;
74 79
 
75 80
         private Bundle colorScheme;
@@ -105,6 +110,17 @@ public class JitsiMeetConferenceOptions implements Parcelable {
105 110
             return this;
106 111
         }
107 112
 
113
+        /**
114
+         * Sets the conference subject.
115
+         * @param subject - Subject for the conference.
116
+         * @return - The {@link Builder} object itself so the method calls can be chained.
117
+         */
118
+        public Builder setSubject(String subject) {
119
+            this.subject = subject;
120
+
121
+            return this;
122
+        }
123
+
108 124
         /**
109 125
          * Sets the JWT token to be used for authentication when joining a conference.
110 126
          * @param token - The JWT token to be used for authentication.
@@ -185,6 +201,7 @@ public class JitsiMeetConferenceOptions implements Parcelable {
185 201
 
186 202
             options.serverURL = this.serverURL;
187 203
             options.room = this.room;
204
+            options.subject = this.subject;
188 205
             options.token = this.token;
189 206
             options.colorScheme = this.colorScheme;
190 207
             options.audioMuted = this.audioMuted;
@@ -201,6 +218,7 @@ public class JitsiMeetConferenceOptions implements Parcelable {
201 218
 
202 219
     private JitsiMeetConferenceOptions(Parcel in) {
203 220
         room = in.readString();
221
+        subject = in.readString();
204 222
         token = in.readString();
205 223
         colorScheme = in.readBundle();
206 224
         byte tmpAudioMuted = in.readByte();
@@ -238,6 +256,9 @@ public class JitsiMeetConferenceOptions implements Parcelable {
238 256
         if (videoMuted != null) {
239 257
             config.putBoolean("startWithVideoMuted", videoMuted);
240 258
         }
259
+        if (subject != null) {
260
+            config.putString("subject", subject);
261
+        }
241 262
 
242 263
         Bundle urlProps = new Bundle();
243 264
 
@@ -281,6 +302,7 @@ public class JitsiMeetConferenceOptions implements Parcelable {
281 302
     @Override
282 303
     public void writeToParcel(Parcel dest, int flags) {
283 304
         dest.writeString(room);
305
+        dest.writeString(subject);
284 306
         dest.writeString(token);
285 307
         dest.writeBundle(colorScheme);
286 308
         dest.writeByte((byte) (audioMuted == null ? 0 : audioMuted ? 1 : 2));

+ 6
- 0
ios/sdk/src/JitsiMeetConferenceOptions.h Parādīt failu

@@ -26,6 +26,10 @@
26 26
  * Room name.
27 27
  */
28 28
 @property (nonatomic, copy, nullable) NSString *room;
29
+/**
30
+ * Conference subject.
31
+ */
32
+@property (nonatomic, copy, nullable) NSString *subject;
29 33
 /**
30 34
  * JWT token used for authentication.
31 35
  */
@@ -56,7 +60,9 @@
56 60
 @interface JitsiMeetConferenceOptions : NSObject
57 61
 
58 62
 @property (nonatomic, copy, nullable, readonly) NSURL *serverURL;
63
+
59 64
 @property (nonatomic, copy, nullable, readonly) NSString *room;
65
+@property (nonatomic, copy, nullable, readonly) NSString *subject;
60 66
 @property (nonatomic, copy, nullable, readonly) NSString *token;
61 67
 
62 68
 @property (nonatomic, copy, nullable) NSDictionary *colorScheme;

+ 5
- 0
ios/sdk/src/JitsiMeetConferenceOptions.m Parādīt failu

@@ -34,6 +34,7 @@
34 34
     if (self = [super init]) {
35 35
         _serverURL = nil;
36 36
         _room = nil;
37
+        _subject = nil;
37 38
         _token = nil;
38 39
 
39 40
         _colorScheme = nil;
@@ -138,6 +139,7 @@
138 139
     if (self = [super init]) {
139 140
         _serverURL = builder.serverURL;
140 141
         _room = builder.room;
142
+        _subject = builder.subject;
141 143
         _token = builder.token;
142 144
 
143 145
         _colorScheme = builder.colorScheme;
@@ -183,6 +185,9 @@
183 185
     if (_videoMuted != nil) {
184 186
         config[@"startWithVideoMuted"] = @(self.videoMuted);
185 187
     }
188
+    if (_subject != nil) {
189
+        config[@"subject"] = self.subject;
190
+    }
186 191
 
187 192
     NSMutableDictionary *urlProps = [[NSMutableDictionary alloc] init];
188 193
 

Notiek ielāde…
Atcelt
Saglabāt