From 722f8de4655b27802d9375903540082872848ed4 Mon Sep 17 00:00:00 2001
From: Carlos Santos <4a.santos@gmail.com>
Date: Thu, 3 Nov 2022 17:40:30 +0100
Subject: [PATCH] openvidu-android: Updated webrtc sdk
Updated webrtc sdk using an alternative repository https://github.com/webrtc-sdk/android instead of the deprecated and official Google library
openvidu-android: Downgraded appcompat-resources to 1.4.2
Downgraded appcompat-resources to 1.4.2 for avoiding the targetSdk and compileSdk update
openvidu-android: Removed enableDtlsSrtp from PeerConnection config
enableDtlsSrtp is not longer exported as public configuration parameter (https://webrtc-review.googlesource.com/c/src/+/234864/10/sdk/android/api/org/webrtc/PeerConnection.java)
---
openvidu-android/.idea/jarRepositories.xml | 5 +++++
openvidu-android/app/build.gradle | 2 +-
.../java/io/openvidu/openvidu_android/openvidu/Session.java | 2 --
openvidu-android/build.gradle | 6 ++++--
4 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/openvidu-android/.idea/jarRepositories.xml b/openvidu-android/.idea/jarRepositories.xml
index a5f05cd8..23704740 100644
--- a/openvidu-android/.idea/jarRepositories.xml
+++ b/openvidu-android/.idea/jarRepositories.xml
@@ -21,5 +21,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/openvidu-android/app/build.gradle b/openvidu-android/app/build.gradle
index d3c65d45..616f4cad 100644
--- a/openvidu-android/app/build.gradle
+++ b/openvidu-android/app/build.gradle
@@ -46,7 +46,7 @@ dependencies {
implementation 'com.jakewharton:butterknife:10.2.0'
implementation 'com.squareup.okhttp3:okhttp:4.2.0'
implementation 'com.neovisionaries:nv-websocket-client:2.9'
- implementation 'org.webrtc:google-webrtc:1.0.32006'
+ implementation 'com.github.webrtc-sdk:android:104.5112.03'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.4.0'
diff --git a/openvidu-android/app/src/main/java/io/openvidu/openvidu_android/openvidu/Session.java b/openvidu-android/app/src/main/java/io/openvidu/openvidu_android/openvidu/Session.java
index a9305ee5..2e6b997f 100644
--- a/openvidu-android/app/src/main/java/io/openvidu/openvidu_android/openvidu/Session.java
+++ b/openvidu-android/app/src/main/java/io/openvidu/openvidu_android/openvidu/Session.java
@@ -89,7 +89,6 @@ public class Session {
config.continualGatheringPolicy =
PeerConnection.ContinualGatheringPolicy.GATHER_CONTINUALLY;
config.keyType = PeerConnection.KeyType.ECDSA;
- config.enableDtlsSrtp = true;
config.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN;
PeerConnection peerConnection = peerConnectionFactory.createPeerConnection(config, new CustomPeerConnectionObserver("local") {
@@ -136,7 +135,6 @@ public class Session {
config.continualGatheringPolicy =
PeerConnection.ContinualGatheringPolicy.GATHER_CONTINUALLY;
config.keyType = PeerConnection.KeyType.ECDSA;
- config.enableDtlsSrtp = true;
config.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN;
PeerConnection peerConnection = peerConnectionFactory.createPeerConnection(config, new CustomPeerConnectionObserver("remotePeerCreation") {
diff --git a/openvidu-android/build.gradle b/openvidu-android/build.gradle
index 32ae39dd..997422c9 100644
--- a/openvidu-android/build.gradle
+++ b/openvidu-android/build.gradle
@@ -7,7 +7,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.3.0'
+ classpath 'com.android.tools.build:gradle:7.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -18,7 +18,9 @@ allprojects {
repositories {
google()
jcenter()
-
+ maven { url 'https://jitpack.io' }
+
+
}
}