Pārlūkot izejas kodu

rn: add more SDK documentation

efficient_tiling
Saúl Ibarra Corretgé 6 gadus atpakaļ
vecāks
revīzija
2715e81f1d

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

@@ -62,6 +62,9 @@ public class JitsiMeetConferenceOptions {
62 62
      */
63 63
     private Boolean welcomePageEnabled;
64 64
 
65
+    /**
66
+     * Class used to build the immutable {@link JitsiMeetConferenceOptions} object.
67
+     */
65 68
     public static class Builder {
66 69
         private URL serverURL;
67 70
         private String room;
@@ -78,54 +81,103 @@ public class JitsiMeetConferenceOptions {
78 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 89
         public Builder setServerURL(URL url) {
82 90
             this.serverURL = url;
83 91
 
84 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 100
         public Builder setRoom(String room) {
88 101
             this.room = room;
89 102
 
90 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 111
         public Builder setToken(String token) {
94 112
             this.token = token;
95 113
 
96 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 124
         public Builder setColorScheme(Bundle colorScheme) {
100 125
             this.colorScheme = colorScheme;
101 126
 
102 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 135
         public Builder setAudioMuted(boolean muted) {
106 136
             this.audioMuted = muted;
107 137
 
108 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 147
         public Builder setAudioOnly(boolean audioOnly) {
112 148
             this.audioOnly = audioOnly;
113 149
 
114 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 157
         public Builder setVideoMuted(boolean videoMuted) {
118 158
             this.videoMuted = videoMuted;
119 159
 
120 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 170
         public Builder setWelcomePageEnabled(boolean enabled) {
124 171
             this.welcomePageEnabled = enabled;
125 172
 
126 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 181
         public JitsiMeetConferenceOptions build() {
130 182
             JitsiMeetConferenceOptions options = new JitsiMeetConferenceOptions();
131 183
 

+ 2
- 1
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java Parādīt failu

@@ -133,7 +133,8 @@ public class JitsiMeetView extends BaseReactView<JitsiMeetViewListener> {
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 138
      * @param options - Description of what conference must be joined and what options will be used
138 139
      *                when doing so.
139 140
      */

+ 3
- 1
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetViewListener.java Parādīt failu

@@ -35,7 +35,9 @@ public interface JitsiMeetViewListener {
35 35
      *
36 36
      * @param data Map with an "error" key with the error and a "url" key with
37 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 42
     void onConferenceTerminated(Map<String, Object> data);
41 43
 

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

@@ -18,16 +18,37 @@
18 18
 
19 19
 @interface JitsiMeetConferenceOptionsBuilder : NSObject
20 20
 
21
+/**
22
+ * Server where the conference should take place.
23
+ */
21 24
 @property (nonatomic, copy, nullable) NSURL *serverURL;
25
+/**
26
+ * Room name.
27
+ */
22 28
 @property (nonatomic, copy, nullable) NSString *room;
29
+/**
30
+ * JWT token used for authentication.
31
+ */
23 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 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 44
 @property (nonatomic) BOOL audioOnly;
28 45
 @property (nonatomic) BOOL audioMuted;
29 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 52
 @property (nonatomic) BOOL welcomePageEnabled;
32 53
 
33 54
 @end

+ 3
- 1
ios/sdk/src/JitsiMeetView.h Parādīt failu

@@ -27,7 +27,9 @@
27 27
 
28 28
 /**
29 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 34
 - (void)join:(JitsiMeetConferenceOptions *)options;
33 35
 /**

+ 3
- 1
ios/sdk/src/JitsiMeetViewDelegate.h Parādīt failu

@@ -31,7 +31,9 @@
31 31
  *
32 32
  * The `data` dictionary contains an `error` key with the error and a `url` key
33 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 38
 - (void)conferenceTerminated:(NSDictionary *)data;
37 39
 

Notiek ielāde…
Atcelt
Saglabāt