|
|
@@ -1,5 +1,6 @@
|
|
1
|
1
|
/*
|
|
2
|
|
- * Copyright @ 2017-present Atlassian Pty Ltd
|
|
|
2
|
+ * Copyright @ 2018-present 8x8, Inc.
|
|
|
3
|
+ * Copyright @ 2017-2018 Atlassian Pty Ltd
|
|
3
|
4
|
*
|
|
4
|
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
6
|
* you may not use this file except in compliance with the License.
|
|
|
@@ -44,31 +45,6 @@ public class JitsiMeetView
|
|
44
|
45
|
*/
|
|
45
|
46
|
private static final String TAG = JitsiMeetView.class.getSimpleName();
|
|
46
|
47
|
|
|
47
|
|
- /**
|
|
48
|
|
- * Loads a specific URL {@code String} in all existing
|
|
49
|
|
- * {@code JitsiMeetView}s.
|
|
50
|
|
- *
|
|
51
|
|
- * @param urlString he URL {@code String} to load in all existing
|
|
52
|
|
- * {@code JitsiMeetView}s.
|
|
53
|
|
- * @return If the specified {@code urlString} was submitted for loading in
|
|
54
|
|
- * at least one {@code JitsiMeetView}, then {@code true}; otherwise,
|
|
55
|
|
- * {@code false}.
|
|
56
|
|
- */
|
|
57
|
|
- public static boolean loadURLStringInViews(String urlString) {
|
|
58
|
|
- boolean loaded = false;
|
|
59
|
|
-
|
|
60
|
|
- synchronized (views) {
|
|
61
|
|
- for (BaseReactView view : views) {
|
|
62
|
|
- if (view instanceof JitsiMeetView) {
|
|
63
|
|
- ((JitsiMeetView)view).loadURLString(urlString);
|
|
64
|
|
- loaded = true;
|
|
65
|
|
- }
|
|
66
|
|
- }
|
|
67
|
|
- }
|
|
68
|
|
-
|
|
69
|
|
- return loaded;
|
|
70
|
|
- }
|
|
71
|
|
-
|
|
72
|
48
|
/**
|
|
73
|
49
|
* A color scheme object to override the default color is the SDK.
|
|
74
|
50
|
*/
|
|
|
@@ -197,16 +173,20 @@ public class JitsiMeetView
|
|
197
|
173
|
return welcomePageEnabled;
|
|
198
|
174
|
}
|
|
199
|
175
|
|
|
200
|
|
- /**
|
|
201
|
|
- * Loads a specific {@link URL} which may identify a conference to join. If
|
|
202
|
|
- * the specified {@code URL} is {@code null} and the Welcome page is
|
|
203
|
|
- * enabled, the Welcome page is displayed instead.
|
|
204
|
|
- *
|
|
205
|
|
- * @param url The {@code URL} to load which may identify a conference to
|
|
206
|
|
- * join.
|
|
207
|
|
- */
|
|
208
|
|
- public void loadURL(@Nullable URL url) {
|
|
209
|
|
- loadURLString(url == null ? null : url.toString());
|
|
|
176
|
+ public void join(@Nullable String url) {
|
|
|
177
|
+ Bundle urlObject;
|
|
|
178
|
+
|
|
|
179
|
+ if (url == null) {
|
|
|
180
|
+ urlObject = null;
|
|
|
181
|
+ } else {
|
|
|
182
|
+ urlObject = new Bundle();
|
|
|
183
|
+ urlObject.putString("url", url);
|
|
|
184
|
+ }
|
|
|
185
|
+ loadURL(urlObject);
|
|
|
186
|
+ }
|
|
|
187
|
+
|
|
|
188
|
+ public void leave() {
|
|
|
189
|
+ loadURL(null);
|
|
210
|
190
|
}
|
|
211
|
191
|
|
|
212
|
192
|
/**
|
|
|
@@ -219,7 +199,7 @@ public class JitsiMeetView
|
|
219
|
199
|
*
|
|
220
|
200
|
* @param urlObject The URL to load which may identify a conference to join.
|
|
221
|
201
|
*/
|
|
222
|
|
- public void loadURLObject(@Nullable Bundle urlObject) {
|
|
|
202
|
+ private void loadURL(@Nullable Bundle urlObject) {
|
|
223
|
203
|
Bundle props = new Bundle();
|
|
224
|
204
|
|
|
225
|
205
|
// color scheme
|
|
|
@@ -259,26 +239,6 @@ public class JitsiMeetView
|
|
259
|
239
|
createReactRootView("App", props);
|
|
260
|
240
|
}
|
|
261
|
241
|
|
|
262
|
|
- /**
|
|
263
|
|
- * Loads a specific URL {@link String} which may identify a conference to
|
|
264
|
|
- * join. If the specified URL {@code String} is {@code null} and the Welcome
|
|
265
|
|
- * page is enabled, the Welcome page is displayed instead.
|
|
266
|
|
- *
|
|
267
|
|
- * @param urlString The URL {@code String} to load which may identify a
|
|
268
|
|
- * conference to join.
|
|
269
|
|
- */
|
|
270
|
|
- public void loadURLString(@Nullable String urlString) {
|
|
271
|
|
- Bundle urlObject;
|
|
272
|
|
-
|
|
273
|
|
- if (urlString == null) {
|
|
274
|
|
- urlObject = null;
|
|
275
|
|
- } else {
|
|
276
|
|
- urlObject = new Bundle();
|
|
277
|
|
- urlObject.putString("url", urlString);
|
|
278
|
|
- }
|
|
279
|
|
- loadURLObject(urlObject);
|
|
280
|
|
- }
|
|
281
|
|
-
|
|
282
|
242
|
/**
|
|
283
|
243
|
* The internal processing for the URL of the current conference set on the
|
|
284
|
244
|
* associated {@link JitsiMeetView}.
|