Pārlūkot izejas kodu

[RN] Documentation, comments

master
Lyubo Marinov 7 gadus atpakaļ
vecāks
revīzija
e1222e947b

+ 3
- 3
android/README.md Parādīt failu

@@ -138,9 +138,9 @@ when the Activity holding this view is going to be destroyed, usually in the
138 138
 
139 139
 #### getDefaultURL()
140 140
 
141
-Returns the default URL for joining a conference when a non-full URL is given,
142
-or null if it's not set. If not set, the builtin default (in JavaScript) is
143
-used: https://meet.jit.si.
141
+Returns the default base URL used to join a conference when a partial URL (e.g.
142
+a room name only) is specified to `loadURLString`/`loadURLObject`. If not set or
143
+if set to `null`, the default built in JavaScript is used: https://meet.jit.si.
144 144
 
145 145
 #### getListener()
146 146
 

+ 16
- 16
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivity.java Parādīt failu

@@ -56,15 +56,16 @@ public class JitsiMeetActivity
56 56
     private DefaultHardwareBackBtnHandler defaultBackButtonImpl;
57 57
 
58 58
     /**
59
-     * Instance of the {@link JitsiMeetView} which this activity will display.
59
+     * The default base {@code URL} used to join a conference when a partial URL
60
+     * (e.g. a room name only) is specified. The value is used only while
61
+     * {@link #view} equals {@code null}.
60 62
      */
61
-    private JitsiMeetView view;
63
+    private URL defaultURL;
62 64
 
63 65
     /**
64
-     * Default URL to be used when joining a conference. The value is used only
65
-     * while {@link #view} equals {@code null}.
66
+     * Instance of the {@link JitsiMeetView} which this activity will display.
66 67
      */
67
-    private URL defaultURL;
68
+    private JitsiMeetView view;
68 69
 
69 70
     /**
70 71
      * Whether the Welcome page is enabled. The value is used only while
@@ -82,7 +83,7 @@ public class JitsiMeetActivity
82 83
 
83 84
     /**
84 85
      *
85
-     * @see JitsiMeetView#getDefaultURL
86
+     * @see JitsiMeetView#getDefaultURL()
86 87
      */
87 88
     public URL getDefaultURL() {
88 89
         return view == null ? defaultURL : view.getDefaultURL();
@@ -90,7 +91,7 @@ public class JitsiMeetActivity
90 91
 
91 92
     /**
92 93
      *
93
-     * @see JitsiMeetView#getWelcomePageEnabled
94
+     * @see JitsiMeetView#getWelcomePageEnabled()
94 95
      */
95 96
     public boolean getWelcomePageEnabled() {
96 97
         return view == null ? welcomePageEnabled : view.getWelcomePageEnabled();
@@ -117,12 +118,11 @@ public class JitsiMeetActivity
117 118
     protected JitsiMeetView initializeView() {
118 119
         JitsiMeetView view = new JitsiMeetView(this);
119 120
 
120
-        // In order to have the desired effect
121
-        // JitsiMeetView#setWelcomePageEnabled(boolean) or
122
-        // JitsiMeetView#setDefaultURL(URL) must be invoked before
123
-        // JitsiMeetView#loadURL(URL).
121
+        // XXX Before calling JitsiMeetView#loadURL, make sure to call whatever
122
+        // is documented to need such an order in order to take effect:
124 123
         view.setDefaultURL(defaultURL);
125 124
         view.setWelcomePageEnabled(welcomePageEnabled);
125
+
126 126
         view.loadURL(null);
127 127
 
128 128
         return view;
@@ -243,19 +243,19 @@ public class JitsiMeetActivity
243 243
 
244 244
     /**
245 245
      *
246
-     * @see JitsiMeetView#setDefaultURL
246
+     * @see JitsiMeetView#setDefaultURL(URL)
247 247
      */
248
-    public void setDefaultURL(URL url) {
248
+    public void setDefaultURL(URL defaultURL) {
249 249
         if (view == null) {
250
-            defaultURL = url;
250
+            this.defaultURL = defaultURL;
251 251
         } else {
252
-            view.setDefaultURL(url);
252
+            view.setDefaultURL(defaultURL);
253 253
         }
254 254
     }
255 255
 
256 256
     /**
257 257
      *
258
-     * @see JitsiMeetView#setWelcomePageEnabled
258
+     * @see JitsiMeetView#setWelcomePageEnabled(boolean)
259 259
      */
260 260
     public void setWelcomePageEnabled(boolean welcomePageEnabled) {
261 261
         if (view == null) {

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

@@ -237,7 +237,9 @@ public class JitsiMeetView extends FrameLayout {
237 237
     }
238 238
 
239 239
     /**
240
-     * Default base URL to use when joining a conference without a full URL.
240
+     * The default base {@code URL} used to join a conference when a partial URL
241
+     * (e.g. a room name only) is specified to {@link #loadURLString(String)} or
242
+     * {@link #loadURLObject(Bundle)}.
241 243
      */
242 244
     private URL defaultURL;
243 245
 
@@ -297,11 +299,13 @@ public class JitsiMeetView extends FrameLayout {
297 299
     }
298 300
 
299 301
     /**
300
-     * Gets the default base URL. If set, it will be preferred over the builtin
301
-     * default (https://meet.jit.si) in JavaScript. When set, it will be used
302
-     * to compose the full URL for a conference, when no full URL is provided.
302
+     * Gets the default base {@code URL} used to join a conference when a
303
+     * partial URL (e.g. a room name only) is specified to
304
+     * {@link #loadURLString(String)} or {@link #loadURLObject(Bundle}. If not
305
+     * set or if set to {@code null}, the default built in JavaScript is used:
306
+     * {@link https://meet.jit.si}
303 307
      *
304
-     * @return {@URL} the default URL or {@null} if none was set.
308
+     * @return The default base {@code URL} or {@code null}.
305 309
      */
306 310
     public URL getDefaultURL() {
307 311
         return defaultURL;
@@ -398,13 +402,16 @@ public class JitsiMeetView extends FrameLayout {
398 402
     }
399 403
 
400 404
     /**
401
-     * Sets the default base URL. Must be called before {@link #loadURL(URL)}
402
-     * for it to take effect.
405
+     * Sets the default base {@code URL} used to join a conference when a
406
+     * partial URL (e.g. a room name only) is specified to
407
+     * {@link #loadURLString(String)} or {@link #loadURLObject(Bundle)}. Must be
408
+     * called before {@link #loadURL(URL)} for it to take effect.
403 409
      *
404
-     * @param url - The {@URL} to be set as the new default URL.
410
+     * @param defaultURL - The {@code URL} to be set as the default base URL.
411
+     * @see #getDefaultURL()
405 412
      */
406
-    public void setDefaultURL(URL url) {
407
-        defaultURL = url;
413
+    public void setDefaultURL(URL defaultURL) {
414
+        this.defaultURL = defaultURL;
408 415
     }
409 416
 
410 417
     /**

+ 7
- 6
ios/README.md Parādīt failu

@@ -44,20 +44,21 @@ The `JitsiMeetView` class is the entry point to the SDK. It a subclass of
44 44
 
45 45
 #### delegate
46 46
 
47
-Property for getting / setting the `JitsiMeetViewDelegate` on `JitsiMeetView`.
47
+Property to get/set the `JitsiMeetViewDelegate` on `JitsiMeetView`.
48 48
 
49 49
 #### defaultURL
50 50
 
51
-Property for getting / setting the base default URL. The default URL is used for
52
-joining a conference when a non-full URL is given. If not set (or nil), the
53
-builtin default (in JavaScript) is used: https://meet.jit.si.
51
+Property to get/set the default base URL used to join a conference when a
52
+partial URL (e.g. a room name only) is specified to
53
+`loadURLString:`/`loadURLObject:`. If not set or if set to `nil`, the default
54
+built in JavaScript is used: https://meet.jit.si.
54 55
 
55 56
 NOTE: Must be set before `loadURL:`/`loadURLString:` for it to take effect.
56 57
 
57 58
 #### welcomePageEnabled
58 59
 
59
-Property for getting / setting whether the Welcome page is enabled. If NO, a
60
-black empty view will be rendered when not in a conference. Defaults to NO.
60
+Property to get/set whether the Welcome page is enabled. If `NO`, a black empty
61
+view will be rendered when not in a conference. Defaults to `NO`.
61 62
 
62 63
 NOTE: Must be set before `loadURL:`/`loadURLString:` for it to take effect.
63 64
 

Notiek ielāde…
Atcelt
Saglabāt