Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set webrtc proxy #1063

Merged
merged 5 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:
with:
# https://github.com/actions/checkout/issues/881
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- name: Use JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Configure gradle
uses: gradle/gradle-build-action@v2
with:
Expand Down Expand Up @@ -64,6 +69,11 @@ jobs:
# with:
# https://github.com/actions/checkout/issues/881
# ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- name: Use JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Configure gradle
uses: gradle/gradle-build-action@v2
with:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

# Enrich gradle.properties for CI/CD
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -XX:MaxPermSize=512m -Dkotlin.daemon.jvm.options="-Xmx2g" -Dkotlin.incremental=false
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -XX:MaxMetaspaceSize=512m -Dkotlin.daemon.jvm.options="-Xmx2g" -Dkotlin.incremental=false
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon

jobs:
Expand Down Expand Up @@ -45,6 +45,11 @@ jobs:
app_id: ${{ secrets.APP_ID_DANGERBOT }}
private_key: ${{ secrets.APP_PEM_DANGERBOT }}
- uses: actions/checkout@v3
- name: Use JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Run ktlint
run: |
./gradlew ktlintCheck $CI_GRADLE_ARG_PROPERTIES --continue
Expand Down
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext.versions = [
'minSdk' : 21,
'compileSdk' : 33,
'targetSdk' : 33,
'sourceCompat' : JavaVersion.VERSION_11,
'targetCompat' : JavaVersion.VERSION_11,
'sourceCompat' : JavaVersion.VERSION_17,
'targetCompat' : JavaVersion.VERSION_17,
]

def gradle = "7.4.2"
Expand Down
1 change: 1 addition & 0 deletions dependencies_groups.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ext.groups = [
'com.github.MatrixFrog',
'com.github.matrix-org',
'com.github.tapadoo',
'com.github.tchapgouv',
'com.github.UnifiedPush',
'com.github.yalantis',
'com.github.Zhuinden',
Expand Down
2 changes: 1 addition & 1 deletion library/attachment-viewer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ android {
targetCompatibility versions.targetCompat
}
kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
}

buildFeatures {
Expand Down
2 changes: 1 addition & 1 deletion library/core-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ android {
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
freeCompilerArgs += [
"-opt-in=kotlin.RequiresOptIn"
]
Expand Down
2 changes: 1 addition & 1 deletion library/external/autocomplete/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
}
}

Expand Down
2 changes: 1 addition & 1 deletion library/external/dialpad/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
}
}

Expand Down
2 changes: 1 addition & 1 deletion library/external/jsonviewer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ android {
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
}
}

Expand Down
2 changes: 1 addition & 1 deletion library/multipicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ android {
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
}
}

Expand Down
2 changes: 1 addition & 1 deletion library/ui-strings/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ android {
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
}
}

Expand Down
2 changes: 1 addition & 1 deletion library/ui-styles/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ android {
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
}

buildFeatures {
Expand Down
2 changes: 1 addition & 1 deletion matrix-sdk-android-flow/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ android {
targetCompatibility versions.targetCompat
}
kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
}

// publishNonDefault true
Expand Down
2 changes: 1 addition & 1 deletion matrix-sdk-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ android {
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
freeCompilerArgs += [
// Disabled for now, there are too many errors. Could be handled in another dedicated PR
// '-Xexplicit-api=strict', // or warning
Expand Down
2 changes: 1 addition & 1 deletion vector-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ android {
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
freeCompilerArgs += [
"-opt-in=kotlin.RequiresOptIn",
// Fixes false positive "This is an internal Mavericks API. It is not intended for external use."
Expand Down
2 changes: 1 addition & 1 deletion vector-config/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ android {
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
}
}
4 changes: 2 additions & 2 deletions vector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ android {
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
freeCompilerArgs += [
"-opt-in=kotlin.RequiresOptIn",
// Fixes false positive "This is an internal Mavericks API. It is not intended for external use."
Expand Down Expand Up @@ -272,7 +272,7 @@ dependencies {

// TCHAP Manage jitsi lib
// WebRTC
withdmvoipImplementation('org.jitsi:webrtc:111.0.1')
withdmvoipImplementation('com.github.tchapgouv:webrtc:124.1.0')
// Jitsi
withvoipApi('org.jitsi.react:jitsi-meet-sdk:8.1.1') {
exclude group: 'com.google.firebase'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,17 @@ class WebRtcCallManager @Inject constructor(
true
)
val defaultVideoDecoderFactory = DefaultVideoDecoderFactory(eglBaseContext)
val proxyHost = System.getProperty("http.proxyHost")
val proxyPort = System.getProperty("http.proxyPort")?.toInt()
Timber.tag(loggerTag.value).v("PeerConnectionFactory.createPeerConnectionFactory ...")
peerConnectionFactory = PeerConnectionFactory.builder()
val builder = PeerConnectionFactory.builder()
.setOptions(options)
.setVideoEncoderFactory(defaultVideoEncoderFactory)
.setVideoDecoderFactory(defaultVideoDecoderFactory)
.createPeerConnectionFactory()
if (!proxyHost.isNullOrBlank() && proxyPort != null) {
builder.setHttpsProxy(proxyHost, proxyPort)
}
peerConnectionFactory = builder.createPeerConnectionFactory()
}

private fun onCallActive(call: WebRtcCall) {
Expand Down
Loading