Browse Source

rn: add more SDK documentation

efficient_tiling
Saúl Ibarra Corretgé 6 years ago
parent
commit
2715e81f1d

+ 53
- 1
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetConferenceOptions.java View File

62
      */
62
      */
63
     private Boolean welcomePageEnabled;
63
     private Boolean welcomePageEnabled;
64
 
64
 
65
+    /**
66
+     * Class used to build the immutable {@link JitsiMeetConferenceOptions} object.
67
+     */
65
     public static class Builder {
68
     public static class Builder {
66
         private URL serverURL;
69
         private URL serverURL;
67
         private String room;
70
         private String room;
78
         public Builder() {
81
         public Builder() {
79
         }
82
         }
80
 
83
 
84
+        /**\
85
+         * Sets the server URL.
86
+         * @param url - {@link URL} of the server where the conference should take place.
87
+         * @return - The {@link Builder} object itself so the method calls can be chained.
88
+         */
81
         public Builder setServerURL(URL url) {
89
         public Builder setServerURL(URL url) {
82
             this.serverURL = url;
90
             this.serverURL = url;
83
 
91
 
84
             return this;
92
             return this;
85
         }
93
         }
86
 
94
 
95
+        /**
96
+         * Sets the room where the conference will take place.
97
+         * @param room - Name of the room.
98
+         * @return - The {@link Builder} object itself so the method calls can be chained.
99
+         */
87
         public Builder setRoom(String room) {
100
         public Builder setRoom(String room) {
88
             this.room = room;
101
             this.room = room;
89
 
102
 
90
             return this;
103
             return this;
91
         }
104
         }
92
 
105
 
106
+        /**
107
+         * Sets the JWT token to be used for authentication when joining a conference.
108
+         * @param token - The JWT token to be used for authentication.
109
+         * @return - The {@link Builder} object itself so the method calls can be chained.
110
+         */
93
         public Builder setToken(String token) {
111
         public Builder setToken(String token) {
94
             this.token = token;
112
             this.token = token;
95
 
113
 
96
             return this;
114
             return this;
97
         }
115
         }
98
 
116
 
117
+        /**
118
+         * Sets the color scheme override so the app is themed. See:
119
+         * https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/color-scheme/defaultScheme.js
120
+         * for the structure.
121
+         * @param colorScheme - A color scheme to be applied to the app.
122
+         * @return - The {@link Builder} object itself so the method calls can be chained.
123
+         */
99
         public Builder setColorScheme(Bundle colorScheme) {
124
         public Builder setColorScheme(Bundle colorScheme) {
100
             this.colorScheme = colorScheme;
125
             this.colorScheme = colorScheme;
101
 
126
 
102
             return this;
127
             return this;
103
         }
128
         }
104
 
129
 
130
+        /**
131
+         * Indicates the conference will be joined with the microphone muted.
132
+         * @param muted - Muted indication.
133
+         * @return - The {@link Builder} object itself so the method calls can be chained.
134
+         */
105
         public Builder setAudioMuted(boolean muted) {
135
         public Builder setAudioMuted(boolean muted) {
106
             this.audioMuted = muted;
136
             this.audioMuted = muted;
107
 
137
 
108
             return this;
138
             return this;
109
         }
139
         }
110
 
140
 
141
+        /**
142
+         * Indicates the conference will be joined in audio-only mode. In this mode no video is
143
+         * sent or received.
144
+         * @param audioOnly - Audio-mode indicator.
145
+         * @return - The {@link Builder} object itself so the method calls can be chained.
146
+         */
111
         public Builder setAudioOnly(boolean audioOnly) {
147
         public Builder setAudioOnly(boolean audioOnly) {
112
             this.audioOnly = audioOnly;
148
             this.audioOnly = audioOnly;
113
 
149
 
114
             return this;
150
             return this;
115
         }
151
         }
116
-
152
+        /**
153
+         * Indicates the conference will be joined with the camera muted.
154
+         * @param videoMuted - Muted indication.
155
+         * @return - The {@link Builder} object itself so the method calls can be chained.
156
+         */
117
         public Builder setVideoMuted(boolean videoMuted) {
157
         public Builder setVideoMuted(boolean videoMuted) {
118
             this.videoMuted = videoMuted;
158
             this.videoMuted = videoMuted;
119
 
159
 
120
             return this;
160
             return this;
121
         }
161
         }
122
 
162
 
163
+        /**
164
+         * Sets the welcome page enabled / disabled. The welcome page lists recent meetings and
165
+         * calendar appointments and it's meant to be used by standalone applications. Defaults to
166
+         * false.
167
+         * @param enabled - Whether the welcome page should be enabled or not.
168
+         * @return - The {@link Builder} object itself so the method calls can be chained.
169
+         */
123
         public Builder setWelcomePageEnabled(boolean enabled) {
170
         public Builder setWelcomePageEnabled(boolean enabled) {
124
             this.welcomePageEnabled = enabled;
171
             this.welcomePageEnabled = enabled;
125
 
172
 
126
             return this;
173
             return this;
127
         }
174
         }
128
 
175
 
176
+        /**
177
+         * Builds the immutable {@link JitsiMeetConferenceOptions} object with the configuration
178
+         * that this {@link Builder} instance specified.
179
+         * @return - The built {@link JitsiMeetConferenceOptions} object.
180
+         */
129
         public JitsiMeetConferenceOptions build() {
181
         public JitsiMeetConferenceOptions build() {
130
             JitsiMeetConferenceOptions options = new JitsiMeetConferenceOptions();
182
             JitsiMeetConferenceOptions options = new JitsiMeetConferenceOptions();
131
 
183
 

+ 2
- 1
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java View File

133
     }
133
     }
134
 
134
 
135
     /**
135
     /**
136
-     * Joins the conference specified by the given {@link JitsiMeetConferenceOptions}.
136
+     * Joins the conference specified by the given {@link JitsiMeetConferenceOptions}. If there is
137
+     * already an active conference, it will be left and the new one will be joined.
137
      * @param options - Description of what conference must be joined and what options will be used
138
      * @param options - Description of what conference must be joined and what options will be used
138
      *                when doing so.
139
      *                when doing so.
139
      */
140
      */

+ 3
- 1
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetViewListener.java View File

35
      *
35
      *
36
      * @param data Map with an "error" key with the error and a "url" key with
36
      * @param data Map with an "error" key with the error and a "url" key with
37
      * the conference URL. If the conference finished gracefully no `error`
37
      * the conference URL. If the conference finished gracefully no `error`
38
-     * key will be present.
38
+     * key will be present. The possible values for "error" are described here:
39
+     * https://github.com/jitsi/lib-jitsi-meet/blob/master/JitsiConnectionErrors.js
40
+     * https://github.com/jitsi/lib-jitsi-meet/blob/master/JitsiConferenceErrors.js
39
      */
41
      */
40
     void onConferenceTerminated(Map<String, Object> data);
42
     void onConferenceTerminated(Map<String, Object> data);
41
 
43
 

+ 21
- 0
ios/sdk/src/JitsiMeetConferenceOptions.h View File

18
 
18
 
19
 @interface JitsiMeetConferenceOptionsBuilder : NSObject
19
 @interface JitsiMeetConferenceOptionsBuilder : NSObject
20
 
20
 
21
+/**
22
+ * Server where the conference should take place.
23
+ */
21
 @property (nonatomic, copy, nullable) NSURL *serverURL;
24
 @property (nonatomic, copy, nullable) NSURL *serverURL;
25
+/**
26
+ * Room name.
27
+ */
22
 @property (nonatomic, copy, nullable) NSString *room;
28
 @property (nonatomic, copy, nullable) NSString *room;
29
+/**
30
+ * JWT token used for authentication.
31
+ */
23
 @property (nonatomic, copy, nullable) NSString *token;
32
 @property (nonatomic, copy, nullable) NSString *token;
24
 
33
 
34
+/**
35
+ * Color scheme override, see:
36
+ * https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/color-scheme/defaultScheme.js
37
+ */
25
 @property (nonatomic, copy, nullable) NSDictionary *colorScheme;
38
 @property (nonatomic, copy, nullable) NSDictionary *colorScheme;
26
 
39
 
40
+/**
41
+ * Set to YES to join the conference with audio / video muted or to start in audio
42
+ * only mode respectively.
43
+ */
27
 @property (nonatomic) BOOL audioOnly;
44
 @property (nonatomic) BOOL audioOnly;
28
 @property (nonatomic) BOOL audioMuted;
45
 @property (nonatomic) BOOL audioMuted;
29
 @property (nonatomic) BOOL videoMuted;
46
 @property (nonatomic) BOOL videoMuted;
30
 
47
 
48
+/**
49
+ * Set to YES to enable the welcome page. Typically SDK users won't need this enabled
50
+ * since the host application decides which meeting to join.
51
+ */
31
 @property (nonatomic) BOOL welcomePageEnabled;
52
 @property (nonatomic) BOOL welcomePageEnabled;
32
 
53
 
33
 @end
54
 @end

+ 3
- 1
ios/sdk/src/JitsiMeetView.h View File

27
 
27
 
28
 /**
28
 /**
29
  * Joins the conference specified by the given options. The gievn options will
29
  * Joins the conference specified by the given options. The gievn options will
30
- * be merged with the defaultConferenceOptions (if set) in JitsiMeet.
30
+ * be merged with the defaultConferenceOptions (if set) in JitsiMeet. If there
31
+ * is an already active conference it will be automatically left prior to
32
+ * joining the new one.
31
  */
33
  */
32
 - (void)join:(JitsiMeetConferenceOptions *)options;
34
 - (void)join:(JitsiMeetConferenceOptions *)options;
33
 /**
35
 /**

+ 3
- 1
ios/sdk/src/JitsiMeetViewDelegate.h View File

31
  *
31
  *
32
  * The `data` dictionary contains an `error` key with the error and a `url` key
32
  * The `data` dictionary contains an `error` key with the error and a `url` key
33
  * with the conference URL. If the conference finished gracefully no `error`
33
  * with the conference URL. If the conference finished gracefully no `error`
34
- * key will be present.
34
+ * key will be present. The possible values for "error" are described here:
35
+ * https://github.com/jitsi/lib-jitsi-meet/blob/master/JitsiConnectionErrors.js
36
+ * https://github.com/jitsi/lib-jitsi-meet/blob/master/JitsiConferenceErrors.js
35
  */
37
  */
36
 - (void)conferenceTerminated:(NSDictionary *)data;
38
 - (void)conferenceTerminated:(NSDictionary *)data;
37
 
39
 

Loading…
Cancel
Save