From 9b1c01351c21ec66dab39a0d7e181995cb8a0922 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 17 Aug 2020 10:03:43 +0200 Subject: [PATCH] Adding jitsi.md documentation --- docs/jitsi.md | 82 +++++++++++++++++++++++++++++++++ tools/jitsi/build_jisti_libs.sh | 8 ++-- 2 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 docs/jitsi.md diff --git a/docs/jitsi.md b/docs/jitsi.md new file mode 100644 index 0000000000..071470b040 --- /dev/null +++ b/docs/jitsi.md @@ -0,0 +1,82 @@ +# Jitsi in Element Android + +Native Jitsi support has been added to Element Android by the PR [#1914](https://github.com/vector-im/element-android/pull/1914). The description of the PR contains some documentation about the behaviour in each possible room configuration. + +Also, ensure to have a look on [the documentation from Element Web](https://github.com/vector-im/element-web/blob/develop/docs/jitsi.md) + +The official documentation about how to integrate the Jitsi SDK in an Android app is available here: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-android-sdk. + +# Native Jitsi SDK + +The Jitsi SDK is built by ourselves with the flag LIBRE_BUILD, to be able to be integrated on the F-Droid version of Element Android. + +The generated maven repository is then host in the project https://github.com/vector-im/jitsi_libre_maven + +## How to build the Jitsi Meet SDK + +### Jitsi version + +Update the script `./tools/jitsi/build_jisti_libs.sh` with the tag of the project `https://github.com/jitsi/jitsi-meet`. + +Currently we are building the version with the tag `android-sdk-2.9.3`. + +### Run the build script + +At the root of the Element Android, run the following script: + +```shell script +./tools/jitsi/build_jisti_libs.sh +``` + +It will build the Jitsi Meet Android library and put every generated files in the folder `/tmp/jitsi` + +### Link with the new generated library + +- Update the file `./build.gradle` to use the previously created local Maven repository. Currently we have this line: + +```groovy +url "https://github.com/vector-im/jitsi_libre_maven/raw/master/android-sdk-2.9.3" +``` + +You can uncomment and update the line starting with `// url "file://...` and comment the line starting with `url`, to test the library using the locally generated Maven repository. + +- Update the dependency of the WebRTC library in the file `./matrix-sdk-android/build.gradle`. Currently we have this line: + +```groovy +implementation('com.facebook.react:react-native-webrtc:1.84.0-jitsi-5112273@aar') +``` + +- Update the dependency of the Jitsi Meet library in the file `./vector/build.gradle`. Currently we have this line: + +```groovy +implementation('org.jitsi.react:jitsi-meet-sdk:2.9.3') { transitive = true } +``` + +- Perform a gradle sync and build the project +- Perform test + +### Sanity tests + +In order to validate that the upgrade of the Jitsi and WebRTC dependency does not break anything, the following sanity tests have to be performed, using two devices: +- Make 1-1 audio call (so using WebRTC) +- Make 1-1 video call (so using WebRTC) +- Create and join a conference call with audio only (so using Jitsi library). Leave the conference. Join it again. +- Create and join a conference call with audio and video (so using Jitsi library) Leave the conference. Join it again. + +### Export the build library + +If all the tests are passed, you can export the generated Jitsi library to our Maven repository. + +- Clone the project https://github.com/vector-im/jitsi_libre_maven. +- Create a new folder with the version name. +- Copy every generated files form `/tmp/jitsi` to the folder you have just created. +- Commit and push the change on https://github.com/vector-im/jitsi_libre_maven. +- Update the file `./build.gradle` to use the previously created Maven repository. Currently we have this line: + +```groovy +url "https://github.com/vector-im/jitsi_libre_maven/raw/master/android-sdk-2.9.3" +``` + +- Build the project and perform the sanity tests again. + +- Update the file `/CANGES.md` to notify about the library upgrade, and create a regular PR for project Element Android. \ No newline at end of file diff --git a/tools/jitsi/build_jisti_libs.sh b/tools/jitsi/build_jisti_libs.sh index 2eb8115108..1341a87d10 100755 --- a/tools/jitsi/build_jisti_libs.sh +++ b/tools/jitsi/build_jisti_libs.sh @@ -52,14 +52,14 @@ npm install # #react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output index.android.bundle --assets-dest android/app/src/main/res/ -./android/scripts/release-sdk.sh /tmp/jitsi2/ +./android/scripts/release-sdk.sh /tmp/jitsi/ # Also copy jsc -mkdir -p /tmp/jitsi2/org/webkit/ -cp -r ./node_modules/jsc-android/dist/org/webkit/android-jsc /tmp/jitsi2/org/webkit/ +mkdir -p /tmp/jitsi/org/webkit/ +cp -r ./node_modules/jsc-android/dist/org/webkit/android-jsc /tmp/jitsi/org/webkit/ echo echo "##################################################" -echo "Release has been done here: /tmp/jitsi2/" +echo "Release has been done here: /tmp/jitsi/" echo "##################################################"