Ver código fonte

rn: add ability to set the conference subject

master
Saúl Ibarra Corretgé 6 anos atrás
pai
commit
d65b71b584

+ 22
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetConferenceOptions.java Ver arquivo

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

+ 6
- 0
ios/sdk/src/JitsiMeetConferenceOptions.h Ver arquivo

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

+ 5
- 0
ios/sdk/src/JitsiMeetConferenceOptions.m Ver arquivo

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

Carregando…
Cancelar
Salvar