Skip to content

Commit

Permalink
Merge pull request #60 from LivelyHearing/jce/allow-disable-preview-o…
Browse files Browse the repository at this point in the history
…n-android

Allow video preview to be disabled on Android too
  • Loading branch information
mieszko4 committed Feb 25, 2021
2 parents 56a578c + ff46d65 commit 8625a8e
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 8625a8e

Please sign in to comment.