Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
[RN] Add loadURLString to JitsiMeetView
Lyubo Marinovf0ab835b465e
diff --git a/android/README.md b/android/README.mdindex a31466ae90..b97d49d767 100644--- a/android/README.md+++ b/android/README.md@@ -93,6 +93,10 @@ See JitsiMeetView.getWelcomePageEnabled.See JitsiMeetView.loadURL.+#### loadURLString(String)++See JitsiMeetView.loadURLString.+#### setWelcomePageEnabled(boolean)See JitsiMeetView.setWelcomePageEnabled.@@ -113,8 +117,13 @@ empty view will be rendered when not in a conference. Defaults to false.#### loadURL(URL)-Loads the given URL and joins the room. If `null` is specified, the welcome page-is displayed instead.+Loads a specific URL which may identify a conference to join. If the specified+URL is null, the Welcome page is displayed instead.++#### loadURLString(String)++Loads a specific URL which may identify a conference to join. If the specified+URL is null, the Welcome page is displayed instead.#### setListener(listener)@@ -126,7 +135,7 @@ interface) on the view.Sets whether the Welcome page is enabled. See `getWelcomePageEnabled` for moreinformation.-NOTE: Must be called before `loadURL` for it to take effect.+NOTE: Must be called before `loadURL`/`loadURLString` for it to take effect.#### onBackPressed()diff --git a/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java b/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.javaindex 7335458b2d..b05e5c0647 100644--- a/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java+++ b/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java@@ -221,19 +221,33 @@ public class JitsiMeetView extends FrameLayout {}/**- * Loads the given URL and displays the conference. If the specified URL is- * null, the welcome page is displayed instead.+ * Loads a specific {@link URL} which may identify a conference to join. If+ * the specified {@code URL} is {@code null}, the Welcome page is displayed+ * instead.*- * @param url - The conference URL.+ * @param url - The {@code URL} to load which may identify a conference to+ * join.*/public void loadURL(@Nullable URL url) {+ loadURLString(url == null ? null : url.toString());+ }++ /**+ * Loads a specific URL {@link String} which may identify a conference to+ * join. If the specified URL {@code String} is {@code null}, the Welcome+ * page is displayed instead.+ *+ * @param urlString - The URL {@code String} to load which may identify a+ * conference to join.+ */+ public void loadURLString(@Nullable String urlString) {Bundle props = new Bundle();// externalAPIScopeprops.putString("externalAPIScope", externalAPIScope);// url- if (url != null) {- props.putString("url", url.toString());+ if (urlString != null) {+ props.putString("url", urlString);}// welcomePageEnabledprops.putBoolean("welcomePageEnabled", welcomePageEnabled);diff --git a/ios/README.md b/ios/README.mdindex 04dc4075db..87ab355686 100644--- a/ios/README.md+++ b/ios/README.md@@ -41,16 +41,25 @@ Property for getting / setting the `JitsiMeetViewDelegate` on `JitsiMeetView`.Property for getting / setting whether the Welcome page is enabled. If NO, ablack empty view will be rendered when not in a conference. Defaults to NO.-NOTE: Must be set before calling `loadURL` for it to take effect.+NOTE: Must be set before `loadURL:`/`loadURLString:` for it to take effect.-#### loadURL(URL)+#### loadURL:NSURL```objc[meetView loadURL:[NSURL URLWithString:@"https://meet.jit.si/test123"]];```-Loads the given URL and joins the room. If `null` is specified, the welcome page-is displayed instead.+Loads a specific URL which may identify a conference to join. If the specified+URL is `nil`, the Welcome page is displayed instead.++#### loadURLString:NSString++```objc+[meetView loadURLString:@"https://meet.jit.si/test123"];+```++Loads a specific URL which may identify a conference to join. If the specified+URL is `nil`, the Welcome page is displayed instead.#### Universal / deep linkingdiff --git a/ios/sdk/src/JitsiMeetView.h b/ios/sdk/src/JitsiMeetView.hindex 685dcc52bc..8d6702fc31 100644--- a/ios/sdk/src/JitsiMeetView.h+++ b/ios/sdk/src/JitsiMeetView.h@@ -39,4 +39,6 @@- (void)loadURL:(NSURL * _Nullable)url;+- (void)loadURLString:(NSString * _Nullable)urlString;+@enddiff --git a/ios/sdk/src/JitsiMeetView.m b/ios/sdk/src/JitsiMeetView.mindex 1f89300ad6..21c13078d4 100644--- a/ios/sdk/src/JitsiMeetView.m+++ b/ios/sdk/src/JitsiMeetView.m@@ -177,17 +177,33 @@ static NSMapTable<NSString *, JitsiMeetView *> *views;#pragma mark API/**- * Loads the given URL and joins the specified conference. If the specified URL- * is null, the welcome page is shown.+ * Loads a specific {@link NSURL} which may identify a conference to join. If+ * the specified {@code NSURL} is {@code nil}, the Welcome page is displayed+ * instead.+ *+ * @param url - The {@code NSURL} to load which may identify a conference to+ * join.*/- (void)loadURL:(NSURL *)url {+ [self loadURLString:(url ? url.absoluteString : nil)];+}++/**+ * Loads a specific URL {@link NSString} which may identify a conference to+ * join. If the specified URL {@code NSString} is {@code nil}, the Welcome page+ * is displayed instead.+ *+ * @param urlString - The URL {@code NSString} to load which may identify a+ * conference to join.+ */+- (void)loadURLString:(NSString *)urlString {NSMutableDictionary *props = [[NSMutableDictionary alloc] init];// externalAPIScope[props setObject:externalAPIScope forKey:@"externalAPIScope"];// url- if (url) {- [props setObject:url.absoluteString forKey:@"url"];+ if (urlString) {+ [props setObject:urlString forKey:@"url"];}// welcomePageEnabled[props setObject:@(self.welcomePageEnabled) forKey:@"welcomePageEnabled"];