Skip to content

Commit

Permalink
Allow video preview to be disabled on Android too
Browse files Browse the repository at this point in the history
  • Loading branch information
jcamins committed Feb 22, 2021
1 parent 1879dac commit ff46d65
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class RNZoomUsModule extends ReactContextBaseJavaModule implements ZoomSD
private Promise initializePromise;
private Promise meetingPromise;

private Boolean shouldDisablePreview = false;

public RNZoomUsModule(ReactApplicationContext reactContext) {
super(reactContext);
this.reactContext = reactContext;
Expand All @@ -56,6 +58,10 @@ public void initialize(final ReadableMap params, final ReadableMap settings, fin
try {
initializePromise = promise;

if (settings.hasKey("disableShowVideoPreviewWhenJoinMeeting")) {
shouldDisablePreview = settings.getBoolean("disableShowVideoPreviewWhenJoinMeeting");
}

reactContext.getCurrentActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
Expand Down Expand Up @@ -208,6 +214,8 @@ public void onZoomSDKInitializeResult(int errorCode, int internalErrorCode) {
} else {
registerListener();
initializePromise.resolve("Initialize Zoom SDK successfully.");

ZoomSDK.getInstance().getMeetingSettingsHelper().disableShowVideoPreviewWhenJoinMeeting(shouldDisablePreview);
}
}

Expand Down

0 comments on commit ff46d65

Please sign in to comment.