Skip to content

Commit

Permalink
android: adds JaaS configs
Browse files Browse the repository at this point in the history
  • Loading branch information
tmoldovan8x8 authored and saghul committed Oct 16, 2020
1 parent 76e256c commit 6119b5b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
@@ -1,6 +1,7 @@
package net.jitsi.sdktest;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
Expand All @@ -22,14 +23,17 @@ protected void onCreate(Bundle savedInstanceState) {
// Initialize default options for Jitsi Meet conferences.
URL serverURL;
try {
// When using JaaS, replace "https://meet.jit.si" with the proper serverURL
serverURL = new URL("https://meet.jit.si");
} catch (MalformedURLException e) {
e.printStackTrace();
throw new RuntimeException("Invalid server URL!");
}
JitsiMeetConferenceOptions defaultOptions
= new JitsiMeetConferenceOptions.Builder()
= new JitsiMeetConferenceOptions.Builder()
.setServerURL(serverURL)
// When using JaaS, set the obtained JWT here
//.setToken("MyJWT")
.setWelcomePageEnabled(false)
.build();
JitsiMeet.setDefaultConferenceOptions(defaultOptions);
Expand All @@ -43,7 +47,7 @@ public void onButtonClick(View v) {
// Build options object for joining the conference. The SDK will merge the default
// one we set earlier and this one when joining.
JitsiMeetConferenceOptions options
= new JitsiMeetConferenceOptions.Builder()
= new JitsiMeetConferenceOptions.Builder()
.setRoom(text)
.build();
// Launch the new activity with the given options. The launch() method takes care
Expand Down
Expand Up @@ -18,13 +18,16 @@ class MainActivity : AppCompatActivity() {
// Initialize default options for Jitsi Meet conferences.
val serverURL: URL
serverURL = try {
// When using JaaS, replace "https://meet.jit.si" with the proper serverURL
URL("https://meet.jit.si")
} catch (e: MalformedURLException) {
e.printStackTrace()
throw RuntimeException("Invalid server URL!")
}
val defaultOptions = JitsiMeetConferenceOptions.Builder()
.setServerURL(serverURL)
// When using JaaS, set the obtained JWT here
//.setToken("MyJWT")
.setWelcomePageEnabled(false)
.build()
JitsiMeet.setDefaultConferenceOptions(defaultOptions)
Expand Down

0 comments on commit 6119b5b

Please sign in to comment.