Skip to content

Commit

Permalink
Bumped Jitsi Meet version to 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skrafft committed May 16, 2019
1 parent 175cece commit 89213d1
Show file tree
Hide file tree
Showing 144 changed files with 1,962 additions and 5,253 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ In your component,

You can add listeners for the following events:
- CONFERENCE_JOINED
- CONFERENCE_FAILED
- CONFERENCE_LEFT
- CONFERENCE_WILL_JOIN
- CONFERENCE_WILL_LEAVE
- LOAD_CONFIG_ERROR

## iOS Manual Install
### Step 1. Add Files Into Project
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ repositories {

dependencies {
//resolutionStrategy.force "org.webkit:android-jsc:r224109"
implementation ('org.jitsi.react:jitsi-meet-sdk:1.21.0') {
implementation ('org.jitsi.react:jitsi-meet-sdk:2.1.0') {
transitive = true
compile ("org.webkit:android-jsc:r224109") { force = true }
//compile ("org.webkit:android-jsc:r224109") { force = true }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import android.provider.Settings;
import android.util.Log;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.support.v4.app.FragmentActivity;

import com.facebook.react.ReactInstanceManager;
import com.facebook.react.modules.core.PermissionListener;
Expand All @@ -19,10 +19,11 @@

import org.jitsi.meet.sdk.JitsiMeetView;
import org.jitsi.meet.sdk.JitsiMeetViewListener;
import org.jitsi.meet.sdk.ReactActivityLifecycleCallbacks;
import org.jitsi.meet.sdk.JitsiMeetActivityInterface;
import org.jitsi.meet.sdk.JitsiMeetActivityDelegate;
import org.jitsi.meet.sdk.JitsiMeetConferenceOptions;

public class JitsiMeetNavigatorActivity extends AppCompatActivity implements JitsiMeetViewListener, JitsiMeetActivityInterface {
public class JitsiMeetNavigatorActivity extends FragmentActivity implements JitsiMeetViewListener, JitsiMeetActivityInterface {

/**
* Instance of the {@link JitsiMeetView} which this activity will display.
Expand All @@ -35,13 +36,13 @@ protected void onActivityResult(
int requestCode,
int resultCode,
Intent data) {
ReactActivityLifecycleCallbacks.onActivityResult(
JitsiMeetActivityDelegate.onActivityResult(
this, requestCode, resultCode, data);
}

@Override
public void onBackPressed() {
ReactActivityLifecycleCallbacks.onBackPressed();
JitsiMeetActivityDelegate.onBackPressed();
}

@Override
Expand All @@ -51,7 +52,10 @@ protected void onCreate(Bundle savedInstanceState) {
String url = getIntent().getStringExtra("url");
view = new JitsiMeetView(this);
view.setListener(this);
view.loadURLString(url);
JitsiMeetConferenceOptions options = new JitsiMeetConferenceOptions.Builder()
.setRoom(url)
.build();
view.join(options);

setContentView(view);
}
Expand All @@ -65,12 +69,12 @@ protected void onDestroy() {
view = null;
}

ReactActivityLifecycleCallbacks.onHostDestroy(this);
JitsiMeetActivityDelegate.onHostDestroy(this);
}

@Override
public void onNewIntent(Intent intent) {
ReactActivityLifecycleCallbacks.onNewIntent(intent);
JitsiMeetActivityDelegate.onNewIntent(intent);
}

// https://developer.android.com/reference/android/support/v4/app/ActivityCompat.OnRequestPermissionsResultCallback
Expand All @@ -79,29 +83,29 @@ public void onRequestPermissionsResult(
final int requestCode,
final String[] permissions,
final int[] grantResults) {
ReactActivityLifecycleCallbacks.onRequestPermissionsResult(requestCode, permissions, grantResults);
JitsiMeetActivityDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults);
}

/**
* Implementation of the {@code PermissionAwareActivity} interface.
*/
@Override
public void requestPermissions(String[] permissions, int requestCode, PermissionListener listener) {
ReactActivityLifecycleCallbacks.requestPermissions(this, permissions, requestCode, listener);
JitsiMeetActivityDelegate.requestPermissions(this, permissions, requestCode, listener);
}

@Override
protected void onResume() {
super.onResume();

ReactActivityLifecycleCallbacks.onHostResume(this);
JitsiMeetActivityDelegate.onHostResume(this);
}

@Override
public void onStop() {
super.onStop();

ReactActivityLifecycleCallbacks.onHostPause(this);
JitsiMeetActivityDelegate.onHostPause(this);
}

@Override
Expand All @@ -126,28 +130,16 @@ private void on(String name, Map<String, Object> data) {
sendBroadcast(intent, getApplication().getPackageName() + ".permission.JITSI_BROADCAST");
}

public void onConferenceFailed(Map<String, Object> data) {
on("CONFERENCE_FAILED", data);
}

public void onConferenceJoined(Map<String, Object> data) {
on("CONFERENCE_JOINED", data);
}

public void onConferenceLeft(Map<String, Object> data) {
public void onConferenceTerminated(Map<String, Object> data) {
this.onBackPressed();
on("CONFERENCE_LEFT", data);
}

public void onConferenceWillJoin(Map<String, Object> data) {
on("CONFERENCE_WILL_JOIN", data);
}

public void onConferenceWillLeave(Map<String, Object> data) {
on("CONFERENCE_WILL_LEAVE", data);
}

public void onLoadConfigError(Map<String, Object> data) {
on("LOAD_CONFIG_ERROR", data);
}
}
Loading

0 comments on commit 89213d1

Please sign in to comment.