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 color scheme support - native
Bettenbuk Zoltaneec7a1b628f2
diff --git a/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivity.java b/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivity.javaindex ddf9555c39..8cfccc2100 100644--- a/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivity.java+++ b/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivity.java@@ -27,6 +27,7 @@ import android.support.v7.app.AppCompatActivity;import android.view.KeyEvent;import com.facebook.react.ReactInstanceManager;+import com.facebook.react.bridge.WritableMap;import com.facebook.react.modules.core.PermissionListener;import java.net.URL;@@ -52,6 +53,11 @@ public class JitsiMeetActivityprivate static final int OVERLAY_PERMISSION_REQUEST_CODE= (int) (Math.random() * Short.MAX_VALUE);+ /**+ * A color scheme object to override the default color is the SDK.+ */+ private WritableMap colorScheme;+/*** The default base {@code URL} used to join a conference when a partial URL* (e.g. a room name only) is specified. The value is used only while@@ -120,6 +126,7 @@ public class JitsiMeetActivity// XXX Before calling JitsiMeetView#loadURL, make sure to call whatever// is documented to need such an order in order to take effect:+ view.setColorScheme(colorScheme);view.setDefaultURL(defaultURL);if (pictureInPictureEnabled != null) {view.setPictureInPictureEnabled(@@ -286,6 +293,17 @@ public class JitsiMeetActivityReactActivityLifecycleCallbacks.requestPermissions(this, permissions, requestCode, listener);}+ /**+ * @see JitsiMeetView#setColorScheme(WritableMap)+ */+ public void setColorScheme(WritableMap colorScheme) {+ if (view == null) {+ this.colorScheme = colorScheme;+ } else {+ view.setColorScheme(colorScheme);+ }+ }+/**** @see JitsiMeetView#setDefaultURL(URL)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 82222d85f2..5541102fa0 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@@ -22,7 +22,9 @@ import android.support.annotation.NonNull;import android.support.annotation.Nullable;import android.util.Log;+import com.facebook.react.bridge.Arguments;import com.facebook.react.bridge.ReadableMap;+import com.facebook.react.bridge.WritableMap;import java.lang.reflect.Method;import java.net.URL;@@ -69,6 +71,11 @@ public class JitsiMeetViewreturn loaded;}+ /**+ * A color scheme object to override the default color is the SDK.+ */+ private WritableMap colorScheme;+/*** The default base {@code URL} used to join a conference when a partial URL* (e.g. a room name only) is specified to {@link #loadURLString(String)} or@@ -130,6 +137,15 @@ public class JitsiMeetView}}+ /**+ * Gets the color scheme used in the SDK.+ *+ * @return The color scheme map.+ */+ public WritableMap getColorScheme() {+ return colorScheme;+ }+/*** Gets the default base {@code URL} used to join a conference when a* partial URL (e.g. a room name only) is specified to@@ -208,6 +224,11 @@ public class JitsiMeetViewpublic void loadURLObject(@Nullable Bundle urlObject) {Bundle props = new Bundle();+ // color scheme+ if (colorScheme != null) {+ props.putBundle("colorScheme", Arguments.toBundle(colorScheme));+ }+// defaultURLif (defaultURL != null) {props.putString("defaultURL", defaultURL.toString());@@ -305,6 +326,15 @@ public class JitsiMeetViewonExternalAPIEvent(LISTENER_METHODS, name, data);}+ /**+ * Sets the color scheme to override the default colors of the SDK.+ *+ * @param colorScheme The color scheme map.+ */+ public void setColorScheme(WritableMap colorScheme) {+ this.colorScheme = colorScheme;+ }+/*** Sets the default base {@code URL} used to join a conference when a* partial URL (e.g. a room name only) is specified todiff --git a/ios/sdk/src/JitsiMeetView.h b/ios/sdk/src/JitsiMeetView.hindex dbb217f00d..be1b2e89ca 100644--- a/ios/sdk/src/JitsiMeetView.h+++ b/ios/sdk/src/JitsiMeetView.h@@ -23,6 +23,8 @@@property (class, copy, nonatomic, nullable) NSString *conferenceActivityType;+@property (nonatomic) NSDictionary *colorScheme;+@property (copy, nonatomic, nullable) NSURL *defaultURL;@property (nonatomic, nullable, weak) id<JitsiMeetViewDelegate> delegate;diff --git a/ios/sdk/src/JitsiMeetView.m b/ios/sdk/src/JitsiMeetView.mindex 9f4ed9e677..7379a0bb19 100644--- a/ios/sdk/src/JitsiMeetView.m+++ b/ios/sdk/src/JitsiMeetView.m@@ -231,6 +231,7 @@ static NSMapTable<NSString *, JitsiMeetView *> *views;props[@"defaultURL"] = [self.defaultURL absoluteString];}+ props[@"colorScheme"] = self.colorScheme;props[@"externalAPIScope"] = externalAPIScope;props[@"pictureInPictureEnabled"] = @(self.pictureInPictureEnabled);props[@"welcomePageEnabled"] = @(self.welcomePageEnabled);