├── .editorconfig
├── .gitignore
├── LICENSE-APACHE
├── LICENSE-MIT
├── LICENSE-THIRD-PARTY
├── README.md
├── RELEASING.md
├── build.gradle
├── copy-webrtc.sh
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── libs
├── arm64-v8a
│ └── libjingle_peerconnection_so.so
├── armeabi-v7a
│ └── libjingle_peerconnection_so.so
├── libwebrtc.jar
├── x86
│ └── libjingle_peerconnection_so.so
└── x86_64
│ └── libjingle_peerconnection_so.so
├── settings.gradle
└── src
└── main
├── AndroidManifest.xml
└── java
└── ch
└── threema
└── webrtc
└── NothingToSeeHere.java
/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 |
3 | root = true
4 |
5 | [*]
6 | end_of_line = lf
7 | insert_final_newline = true
8 | trim_trailing_whitespace = true
9 |
10 | [*.java]
11 | charset = utf-8
12 | indent_style = space
13 | indent_size = 4
14 |
15 | [*.yml]
16 | indent_style = space
17 | indent_size = 2
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Vim
2 | *.swp
3 |
4 | # IntelliJ
5 | *.iml
6 | .idea
7 |
8 | # Gradle
9 | .gradle
10 | local.properties
11 |
12 | # Java
13 | build/
14 |
--------------------------------------------------------------------------------
/LICENSE-APACHE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
--------------------------------------------------------------------------------
/LICENSE-MIT:
--------------------------------------------------------------------------------
1 | Copyright (c) 2024 Threema GmbH
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/LICENSE-THIRD-PARTY:
--------------------------------------------------------------------------------
1 | # WebRTC
2 |
3 | License for the following files:
4 |
5 | - libs/libwebrtc.jar
6 | - libs/audio_device_java.jar
7 | - libs/libjingle_peerconnection_java.jar
8 | - libs/x86/libjingle_peerconnection_so.so
9 | - libs/x86_64/libjingle_peerconnection_so.so
10 | - libs/armeabi-v7a/libjingle_peerconnection_so.so
11 | - libs/arm64-v8a/libjingle_peerconnection_so.so
12 |
13 | Copyright (c) 2024, The WebRTC project authors. All rights reserved.
14 |
15 | Redistribution and use in source and binary forms, with or without
16 | modification, are permitted provided that the following conditions are
17 | met:
18 |
19 | * Redistributions of source code must retain the above copyright
20 | notice, this list of conditions and the following disclaimer.
21 |
22 | * Redistributions in binary form must reproduce the above copyright
23 | notice, this list of conditions and the following disclaimer in
24 | the documentation and/or other materials provided with the
25 | distribution.
26 |
27 | * Neither the name of Google nor the names of its contributors may
28 | be used to endorse or promote products derived from this software
29 | without specific prior written permission.
30 |
31 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
36 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
37 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
38 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
39 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
41 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WebRTC Build for Android
2 |
3 | [](https://github.com/threema-ch/webrtc-android)
4 |
5 | This is a WebRTC build with Java bindings packaged for Android.
6 |
7 | > :warning: **Warning:** This build of WebRTC contains [patches specific to
8 | > Threema][patches] (see section "Patches / Build config" below). Certain
9 | > aspects (for example audio codecs, RTP header extensions or ciphersuite
10 | > selection) may behave differently than stock WebRTC and you might run into
11 | > compatibility issues in some cases. We offer no support for this package
12 | > outside of Threema. If you need help with WebRTC, try asking in the
13 | > [discuss-webrtc mailing list][discuss-webrtc] or on StackOverflow.
14 |
15 | [patches]: https://github.com/threema-ch/webrtc-build-docker/tree/master/patches
16 | [discuss-webrtc]: https://groups.google.com/g/discuss-webrtc
17 |
18 |
19 | ## Installing
20 |
21 | This package is available on Maven Central (starting with version 91.0.1). It
22 | includes the WebRTC PeerConnection build for ARM and x86, both 32 and 64 bit
23 | builds.
24 |
25 | Gradle:
26 |
27 | ```groovy
28 | compile 'ch.threema:webrtc-android:134.0.0'
29 | ```
30 |
31 | Maven:
32 |
33 | ```xml
34 |
35 | ch.threema
36 | webrtc-android
37 | 134.0.0
38 | pom
39 |
40 | ```
41 |
42 |
43 | ## Target Commits
44 |
45 | These are the target commits for the releases:
46 |
47 | - v134.0.0 [`8d78f5de6c27b2c793039989ea381f1428fb0100`](https://webrtc.googlesource.com/src.git/+/8d78f5de6c27b2c793039989ea381f1428fb0100)
48 | - v123.0.0 [`41b1493ddb5d98e9125d5cb002fd57ce76ebd8a7`](https://webrtc.googlesource.com/src.git/+/41b1493ddb5d98e9125d5cb002fd57ce76ebd8a7)
49 | - v120.0.0 [`b0cc68e61205fd11a7256a6e85307ec17ad95790`](https://webrtc.googlesource.com/src.git/+/b0cc68e61205fd11a7256a6e85307ec17ad95790)
50 | - v114.0.0 [`a624ee1be7a11e795a849edb2a27dc1137d2b63d`](https://webrtc.googlesource.com/src.git/+/a624ee1be7a11e795a849edb2a27dc1137d2b63d)
51 | - v110.0.0 [`218b56e516386cd57c7513197528c3124bcd7ef3`](https://webrtc.googlesource.com/src.git/+/218b56e516386cd57c7513197528c3124bcd7ef3)
52 | - v108.0.0 [`93081d594f7efff72958a79251f53731b99e902b`](https://webrtc.googlesource.com/src.git/+/93081d594f7efff72958a79251f53731b99e902b)
53 | - v100.0.0 [`ffd9187dc0d9211ad52173bf0daa5001ca7d45ee`](https://webrtc.googlesource.com/src.git/+/ffd9187dc0d9211ad52173bf0daa5001ca7d45ee)
54 | - v91.0.1 [`3e0c60ba4ef28a9f26fe991e5eec3150402c7dd3`](https://webrtc.googlesource.com/src.git/+/3e0c60ba4ef28a9f26fe991e5eec3150402c7dd3)
55 | - v91.0.0 [`3e0c60ba4ef28a9f26fe991e5eec3150402c7dd3`](https://webrtc.googlesource.com/src.git/+/3e0c60ba4ef28a9f26fe991e5eec3150402c7dd3)
56 | - v84.2.1 [`963cc1ef1336b52ca27742beb28bfbc211ed54d0`](https://webrtc.googlesource.com/src.git/+/963cc1ef1336b52ca27742beb28bfbc211ed54d0)
57 | - v84.2.0 [`963cc1ef1336b52ca27742beb28bfbc211ed54d0`](https://webrtc.googlesource.com/src.git/+/963cc1ef1336b52ca27742beb28bfbc211ed54d0)
58 | - v84.1.1 [`963cc1ef1336b52ca27742beb28bfbc211ed54d0`](https://webrtc.googlesource.com/src.git/+/963cc1ef1336b52ca27742beb28bfbc211ed54d0)
59 | - v84.1.0 [`a740523c6bb2630114937449cc97b844891cebaf`](https://webrtc.googlesource.com/src.git/+/a740523c6bb2630114937449cc97b844891cebaf)
60 | - v84.0.0 [`a740523c6bb2630114937449cc97b844891cebaf`](https://webrtc.googlesource.com/src.git/+/a740523c6bb2630114937449cc97b844891cebaf)
61 | - v83.1.1 [`e2ad989961f3de12e2c352521fcfdad6e66b6359`](https://webrtc.googlesource.com/src.git/+/e2ad989961f3de12e2c352521fcfdad6e66b6359)
62 | - v83.1.0 [`e2ad989961f3de12e2c352521fcfdad6e66b6359`](https://webrtc.googlesource.com/src.git/+/e2ad989961f3de12e2c352521fcfdad6e66b6359)
63 | - v83.0.0 [`e2ad989961f3de12e2c352521fcfdad6e66b6359`](https://webrtc.googlesource.com/src.git/+/e2ad989961f3de12e2c352521fcfdad6e66b6359)
64 | - v81.1.0 [`76725a6a631c4f21db1f5560eece2feb78b20aca`](https://webrtc.googlesource.com/src.git/+/76725a6a631c4f21db1f5560eece2feb78b20aca)
65 | - v81.0.0 [`64649176f542fb919628e4f2149ccd1946769786`](https://webrtc.googlesource.com/src.git/+/64649176f542fb919628e4f2149ccd1946769786)
66 | - v80.0.0 [`7a0e44c1a84fb4ed57a6701cfc8093756c37af6f`](https://webrtc.googlesource.com/src.git/+/7a0e44c1a84fb4ed57a6701cfc8093756c37af6f)
67 | - v79.0.0 [`b484ec0082948ae086c2ba4142b4d2bf8bc4dd4b`](https://webrtc.googlesource.com/src.git/+/b484ec0082948ae086c2ba4142b4d2bf8bc4dd4b)
68 | - v78.0.0 [`0b2302e5e0418b6716fbc0b3927874fd3a842caf`](https://webrtc.googlesource.com/src.git/+/0b2302e5e0418b6716fbc0b3927874fd3a842caf)
69 | - v77.0.0 [`ad73985e75684cb4ac4dadb9d3d86ad0d66612a0`](https://webrtc.googlesource.com/src.git/+/ad73985e75684cb4ac4dadb9d3d86ad0d66612a0)
70 | - v76.0.0 [`9863f3d246e2da7a2e1f42bbc5757f6af5ec5682`](https://webrtc.googlesource.com/src.git/+/9863f3d246e2da7a2e1f42bbc5757f6af5ec5682)
71 |
72 |
73 | ## Patches / Build config
74 |
75 | The builds are created using [webrtc-build-docker](https://github.com/threema-ch/webrtc-build-docker).
76 |
77 | **v134.0.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 debuggable_apks=false enable_libaom=false rtc_enable_protobuf=false rtc_include_dav1d_in_internal_decoder_factory=false`):
78 |
79 | 6261 2025-03-19 20:51 /patches/disable-dtmf-and-comfort-noise.patch
80 | 9723 2025-03-19 20:52 /patches/disable-unused-audio-codecs.patch
81 | 850 2025-03-19 20:54 /patches/dont-leak-video-orientation.patch
82 | 909 2025-03-19 20:55 /patches/dtls-cipher-suites.patch
83 | 942 2025-03-19 20:56 /patches/enable-cbr-by-default.patch
84 | 9209 2025-03-19 21:11 /patches/expose-certificate-fingerprint.patch
85 | 8365 2025-03-19 21:22 /patches/expose-crypto-option-aes-128-sha1-80.patch
86 | 3164 2025-03-19 21:23 /patches/expose-video-capturer-state.patch
87 | 103096 2025-03-20 17:05 /patches/group-call-frame-crypto.patch
88 | 2454 2025-03-19 21:28 /patches/only-resolve-uuid-mdns-hostnames.patch
89 | 2574 2025-03-19 21:32 /patches/srtp-cipher-suites.patch
90 |
91 | **v123.0.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false rtc_include_dav1d_in_internal_decoder_factory=false rtc_include_ilbc=false`):
92 |
93 | 6002 2024-03-18 19:39 /patches/disable-dtmf-and-comfort-noise.patch
94 | 11843 2024-03-18 15:24 /patches/disable-unused-audio-codecs.patch
95 | 850 2024-03-18 15:25 /patches/dont-leak-video-orientation.patch
96 | 909 2024-03-18 19:39 /patches/dtls-cipher-suites.patch
97 | 942 2024-03-18 15:26 /patches/enable-cbr-by-default.patch
98 | 9564 2024-03-18 15:26 /patches/expose-certificate-fingerprint.patch
99 | 8477 2024-03-18 15:27 /patches/expose-crypto-option-aes-128-sha1-80.patch
100 | 3164 2024-03-18 15:27 /patches/expose-video-capturer-state.patch
101 | 101862 2024-03-18 19:39 /patches/group-call-frame-crypto.patch
102 | 2456 2024-03-18 19:39 /patches/only-resolve-uuid-mdns-hostnames.patch
103 | 2574 2024-03-18 19:39 /patches/srtp-cipher-suites.patch
104 |
105 | **v120.0.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false rtc_include_dav1d_in_internal_decoder_factory=false rtc_include_ilbc=false`):
106 |
107 | 6002 2023-12-14 16:31 /patches/disable-dtmf-and-comfort-noise.patch
108 | 11843 2023-06-01 15:41 /patches/disable-unused-audio-codecs.patch
109 | 850 2023-12-14 16:31 /patches/dont-leak-video-orientation.patch
110 | 909 2023-12-14 16:31 /patches/dtls-cipher-suites.patch
111 | 942 2023-06-01 15:41 /patches/enable-cbr-by-default.patch
112 | 9564 2023-12-14 16:31 /patches/expose-certificate-fingerprint.patch
113 | 8477 2023-12-14 16:31 /patches/expose-crypto-option-aes-128-sha1-80.patch
114 | 3164 2023-12-14 16:31 /patches/expose-video-capturer-state.patch
115 | 1752 2023-12-14 16:31 /patches/force-dtls-1_2.patch
116 | 01870 2023-12-14 16:31 /patches/group-call-frame-crypto.patch
117 | 2456 2023-12-14 16:31 /patches/only-resolve-uuid-mdns-hostnames.patch
118 | 2574 2023-12-14 16:31 /patches/srtp-cipher-suites.patch
119 |
120 | **v114.0.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false rtc_include_dav1d_in_internal_decoder_factory=false rtc_include_ilbc=false`):
121 |
122 | 6024 2023-06-27 09:24 /patches/disable-dtmf-and-comfort-noise.patch
123 | 11843 2023-06-27 09:24 /patches/disable-unused-audio-codecs.patch
124 | 850 2023-06-27 09:24 /patches/dont-leak-video-orientation.patch
125 | 909 2023-06-27 09:24 /patches/dtls-cipher-suites.patch
126 | 942 2023-06-27 09:24 /patches/enable-cbr-by-default.patch
127 | 9564 2023-06-27 09:24 /patches/expose-certificate-fingerprint.patch
128 | 8477 2023-06-27 09:24 /patches/expose-crypto-option-aes-128-sha1-80.patch
129 | 3628 2023-06-27 09:24 /patches/expose-video-capturer-state.patch
130 | 1752 2023-06-27 09:24 /patches/force-dtls-1_2.patch
131 | 101860 2023-06-27 09:24 /patches/group-call-frame-crypto.patch
132 | 2456 2023-06-27 09:24 /patches/only-resolve-uuid-mdns-hostnames.patch
133 | 2574 2023-06-27 09:24 /patches/srtp-cipher-suites.patch
134 |
135 | **v110.0.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false rtc_include_dav1d_in_internal_decoder_factory=false rtc_include_ilbc=false`):
136 |
137 | 6024 2023-02-21 19:59 /patches/disable-dtmf-and-comfort-noise.patch
138 | 11835 2023-02-21 19:59 /patches/disable-unused-audio-codecs.patch
139 | 815 2021-04-08 19:16 /patches/dont-leak-video-orientation.patch
140 | 687 2022-08-08 09:22 /patches/dtls-cipher-suites.patch
141 | 818 2021-04-08 19:16 /patches/enable-cbr-by-default.patch
142 | 8831 2021-04-08 19:16 /patches/expose-crypto-option-aes-128-sha1-80.patch
143 | 3628 2021-04-12 13:32 /patches/expose-video-capturer-state.patch
144 | 1750 2021-04-08 19:16 /patches/force-dtls-1_2.patch
145 | 80250 2023-02-21 19:59 /patches/group-call-frame-crypto.patch
146 | 2461 2022-12-15 22:49 /patches/only-resolve-uuid-mdns-hostnames.patch
147 | 2574 2022-03-30 21:26 /patches/srtp-cipher-suites.patch
148 |
149 | **v108.0.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`):
150 |
151 | 5872 2022-12-15 22:49 /patches/disable-dtmf-and-comfort-noise.patch
152 | 16587 2022-12-15 22:49 /patches/disable-unused-audio-codecs.patch
153 | 815 2021-04-08 19:16 /patches/dont-leak-video-orientation.patch
154 | 687 2022-08-08 09:22 /patches/dtls-cipher-suites.patch
155 | 818 2021-04-08 19:16 /patches/enable-cbr-by-default.patch
156 | 8831 2021-04-08 19:16 /patches/expose-crypto-option-aes-128-sha1-80.patch
157 | 3628 2021-04-12 13:32 /patches/expose-video-capturer-state.patch
158 | 1750 2021-04-08 19:16 /patches/force-dtls-1_2.patch
159 | 80867 2022-12-15 22:49 /patches/group-call-frame-crypto.patch
160 | 2461 2022-12-15 22:49 /patches/only-resolve-uuid-mdns-hostnames.patch
161 | 2574 2022-03-30 21:26 /patches/srtp-cipher-suites.patch
162 |
163 | **v100.0.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`):
164 |
165 | 5934 2022-04-07 04:42 patches/disable-dtmf-and-comfort-noise.patch
166 | 16331 2022-04-07 04:42 patches/disable-unused-audio-codecs.patch
167 | 815 2022-04-06 13:45 patches/dont-leak-video-orientation.patch
168 | 687 2022-04-07 04:42 patches/dtls-cipher-suites.patch
169 | 818 2022-04-06 13:45 patches/enable-cbr-by-default.patch
170 | 8831 2022-04-06 13:45 patches/expose-crypto-option-aes-128-sha1-80.patch
171 | 3628 2022-04-06 13:45 patches/expose-video-capturer-state.patch
172 | 1750 2022-04-06 13:45 patches/force-dtls-1_2.patch
173 | 2453 2022-04-06 13:45 patches/only-resolve-uuid-mdns-hostnames.patch
174 | 2574 2022-04-06 13:45 patches/srtp-cipher-suites.patch
175 |
176 | **v94.0.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`):
177 |
178 | 5162 2021-04-09 13:22 patches/disable-dtmf-and-comfort-noise.patch
179 | 15479 2021-04-09 13:00 patches/disable-unused-audio-codecs.patch
180 | 815 2021-04-09 13:00 patches/dont-leak-video-orientation.patch
181 | 743 2021-04-09 13:00 patches/dtls-cipher-suites.patch
182 | 818 2021-04-09 13:00 patches/enable-cbr-by-default.patch
183 | 8831 2021-04-09 13:00 patches/expose-crypto-option-aes-128-sha1-80.patch
184 | 3628 2021-04-09 13:00 patches/expose-video-capturer-state.patch
185 | 1750 2021-04-09 13:00 patches/force-dtls-1_2.patch
186 | 2453 2021-10-04 09:20 patches/only-resolve-uuid-mdns-hostnames.patch
187 | 2574 2021-10-04 09:31 patches/srtp-cipher-suites.patch
188 | 2156 2021-10-04 09:48 patches/unreachable-code-warnings.patch
189 |
190 | **v91.0.1** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`):
191 |
192 | Like v91.0.0, but packaging was upgraded to Gradle 6.8 and the maven-publish plugin.
193 | Starting with this release, the library will only be published to Maven Central.
194 |
195 | **v91.0.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`):
196 |
197 | 5162 2021-04-09 13:22 patches/disable-dtmf-and-comfort-noise.patch
198 | 15479 2021-04-09 13:00 patches/disable-unused-audio-codecs.patch
199 | 815 2021-04-09 13:00 patches/dont-leak-video-orientation.patch
200 | 743 2021-04-09 13:00 patches/dtls-cipher-suites.patch
201 | 818 2021-04-09 13:00 patches/enable-cbr-by-default.patch
202 | 8831 2021-04-09 13:00 patches/expose-crypto-option-aes-128-sha1-80.patch
203 | 3628 2021-04-09 13:00 patches/expose-video-capturer-state.patch
204 | 49010 2021-04-09 13:00 patches/fix-rtp-header-extension-encryption.patch
205 | 1750 2021-04-09 13:00 patches/force-dtls-1_2.patch
206 | 2439 2021-04-09 13:00 patches/only-resolve-uuid-mdns-hostnames.patch
207 | 2615 2021-04-09 13:00 patches/srtp-cipher-suites.patch
208 |
209 | **v84.2.1** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`):
210 |
211 | Like v84.2.0, but released to Maven Central for easier backwards compatibility.
212 |
213 | **v84.2.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`):
214 |
215 | Like v84.1.0, but with the following additional patch:
216 |
217 | 3636 Nov 10 16:37 patches/expose-video-capturer-state.patch
218 |
219 | **v84.1.1** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`):
220 |
221 | Like v84.1.0, but based on commit `963cc1ef1336b52ca27742beb28bfbc211ed54d0`.
222 |
223 | **v84.1.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`):
224 |
225 | Like v84.0.0, but with the following additional patch:
226 |
227 | 12394 Jun 22 15:23 patches/fix-data-channel-message-integrity.patch
228 |
229 | **v84.0.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`):
230 |
231 | 3603 May 26 13:53 patches/disable-dtmf-and-comfort-noise.patch
232 | 15479 May 26 13:53 patches/disable-unused-audio-codecs.patch
233 | 815 May 26 13:53 patches/dont-leak-video-orientation.patch
234 | 743 May 7 15:55 patches/dtls-cipher-suites.patch
235 | 818 May 26 13:53 patches/enable-cbr-by-default.patch
236 | 8831 Jun 15 15:18 patches/expose-crypto-option-aes-128-sha1-80.patch
237 | 4718 Jun 15 15:17 patches/expose-offer-extmap-allow-mixed.patch
238 | 34276 May 26 13:53 patches/fix-rtp-header-extension-encryption.patch
239 | 1750 May 26 13:53 patches/force-dtls-1_2.patch
240 | 614 May 26 16:02 patches/libsrtp-two-byte-rtp-header-extension-crypto.patch
241 | 2439 May 26 13:53 patches/only-resolve-uuid-mdns-hostnames.patch
242 | 2615 May 28 10:26 patches/srtp-cipher-suites.patch
243 |
244 | **v83.1.1** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`):
245 |
246 | 3.6K May 26 13:53 patches/disable-dtmf-and-comfort-noise.patch
247 | 16K May 26 13:53 patches/disable-unused-audio-codecs.patch
248 | 815 May 26 13:53 patches/dont-leak-video-orientation.patch
249 | 743 May 7 15:55 patches/dtls-cipher-suites.patch
250 | 818 May 26 13:53 patches/enable-cbr-by-default.patch
251 | 5.0K May 7 15:55 patches/expose-crypto-option-aes-128-sha1-80.patch
252 | 2.3K May 7 15:55 patches/expose-offer-extmap-allow-mixed.patch
253 | 34K May 26 13:53 patches/fix-rtp-header-extension-encryption.patch
254 | 1.8K May 26 13:53 patches/force-dtls-1_2.patch
255 | 614 May 26 16:02 patches/libsrtp-two-byte-rtp-header-extension-crypto.patch
256 | 864 May 26 15:39 patches/objc-rtcstats-export.patch
257 | 2.4K May 26 13:53 patches/only-resolve-uuid-mdns-hostnames.patch
258 | 2.6K May 28 10:26 patches/srtp-cipher-suites.patch
259 |
260 | **v83.1.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`):
261 |
262 | 3.6K May 26 13:53 patches/disable-dtmf-and-comfort-noise.patch
263 | 16K May 26 13:53 patches/disable-unused-audio-codecs.patch
264 | 815 May 26 13:53 patches/dont-leak-video-orientation.patch
265 | 743 May 7 15:55 patches/dtls-cipher-suites.patch
266 | 818 May 26 13:53 patches/enable-cbr-by-default.patch
267 | 5.0K May 7 15:55 patches/expose-crypto-option-aes-128-sha1-80.patch
268 | 2.3K May 7 15:55 patches/expose-offer-extmap-allow-mixed.patch
269 | 34K May 26 13:53 patches/fix-rtp-header-extension-encryption.patch
270 | 1.8K May 26 13:53 patches/force-dtls-1_2.patch
271 | 614 May 26 16:02 patches/libsrtp-two-byte-rtp-header-extension-crypto.patch
272 | 864 May 26 15:39 patches/objc-rtcstats-export.patch
273 | 2.4K May 26 13:53 patches/only-resolve-uuid-mdns-hostnames.patch
274 | 817 May 13 10:23 patches/srtp-cipher-suites.patch
275 |
276 | **v83.0.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1`)
277 |
278 | - `dtls-cipher-suites.patch`
279 | - `expose-crypto-option-aes-128-sha1-80.patch`
280 | - `expose-offer-extmap-allow-mixed.patch`
281 | - `srtp-cipher-suites.patch`
282 |
283 | **v81.1.0** (`WEBRTC_COMPILE_ARGS: symbol_level=1 enable_libaom=false`)
284 |
285 | 12392 Jun 23 09:01 patches/fix-data-channel-message-integrity.patch
286 | 8201 Jun 23 09:01 patches/fix-sctp-pointer-leak.patch
287 |
288 |
289 | ## Signatures
290 |
291 | Releases to Maven Central are signed with the following PGP key:
292 |
293 | pub rsa4096 2016-09-06 [SC] [expires: 2026-09-04]
294 | E7AD D991 4E26 0E8B 35DF B506 65FD E935 573A CDA6
295 | uid Threema Signing Key
296 |
297 |
298 | ## Local testing
299 |
300 | Create a local publication (usually at `$HOME/.m2/repository/`):
301 |
302 | ./gradlew publishToMavenLocal
303 |
304 | Include it in your project like this:
305 |
306 | repositories {
307 | ...
308 | mavenLocal()
309 | }
310 |
311 |
312 | ## License
313 |
314 | Copyright (c) 2019-2024 Threema GmbH
315 |
316 | Licensed under the Apache License, Version 2.0,
317 | or the MIT license , at your option. This file may not be
318 | copied, modified, or distributed except according to those terms.
319 |
--------------------------------------------------------------------------------
/RELEASING.md:
--------------------------------------------------------------------------------
1 | # Releasing
2 |
3 | Set variables:
4 |
5 | export VERSION=X.Y.Z
6 | export GPG_KEY=E7ADD9914E260E8B35DFB50665FDE935573ACDA6
7 |
8 | Ensure that `ossrhUsername` and `ossrhPassword` are defined in your
9 | `~/.gradle/gradle.properties` file. This **must not** be the OSSRH username but
10 | a generated access token (confusingly also having a username)!
11 |
12 | Align SDK versions and bump versions:
13 |
14 | vim -p build.gradle README.md
15 |
16 | Build:
17 |
18 | ./gradlew clean build
19 |
20 | Add and commit:
21 |
22 | git commit -S${GPG_KEY} -m "Release v${VERSION}"
23 |
24 | Publish the library to Sonatype OSS / Maven Central:
25 |
26 | ./gradlew publish
27 |
28 | Afterwards, go to and:
29 |
30 | - Close the repository
31 | - Release the repository
32 |
33 | *Note: It may take a while until the release is visible!*
34 |
35 | Tag and push:
36 |
37 | git tag -s -u ${GPG_KEY} v${VERSION} -m "Version ${VERSION}"
38 | git push && git push --tags
39 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | }
5 |
6 | dependencies {
7 | classpath 'com.android.tools.build:gradle:8.9.0'
8 | }
9 | }
10 |
11 | plugins {
12 | id 'maven-publish'
13 | id 'signing'
14 | }
15 |
16 | ext {
17 | groupId = 'ch.threema'
18 | webrtcVersion = '134'
19 | libraryVersion = '134.0.0'
20 | }
21 |
22 | apply plugin: 'com.android.library'
23 |
24 | android {
25 | namespace = 'ch.threema.webrtc'
26 |
27 | compileSdkVersion 35
28 | buildToolsVersion '35.0.0'
29 |
30 | defaultConfig {
31 | minSdkVersion 21
32 | }
33 |
34 | buildTypes {
35 | release {
36 | minifyEnabled false
37 | }
38 | }
39 |
40 | sourceSets {
41 | main {
42 | jniLibs.srcDirs = ['libs']
43 | }
44 | }
45 |
46 | packagingOptions {
47 | exclude 'META-INF/NOTICE'
48 | exclude 'META-INF/LICENSE'
49 | }
50 |
51 | compileOptions {
52 | sourceCompatibility JavaVersion.VERSION_11
53 | targetCompatibility JavaVersion.VERSION_11
54 | }
55 |
56 | publishing {
57 | singleVariant('release')
58 | }
59 | }
60 |
61 | repositories {
62 | google()
63 | mavenCentral()
64 | }
65 |
66 | dependencies {
67 | implementation files('libs/libwebrtc.jar')
68 | }
69 |
70 | afterEvaluate {
71 | publishing {
72 | publications {
73 | release(MavenPublication) {
74 | from components.findByName('release')
75 |
76 | groupId = project.ext.groupId
77 | artifactId = project.name
78 | version = project.ext.libraryVersion
79 |
80 | pom {
81 | name = 'WebRTC for Android'
82 | description = "WebRTC m${project.ext.webrtcVersion} builds for Android, with some custom patches applied"
83 | url = 'https://github.com/threema-ch/webrtc-android'
84 |
85 | scm {
86 | url = 'https://github.com/threema-ch/webrtc-android'
87 | }
88 |
89 | licenses {
90 | license {
91 | name = 'The Apache License, Version 2.0'
92 | url = 'LICENSE-APACHE'
93 | }
94 | license {
95 | name = 'The MIT License'
96 | url = 'LICENSE-MIT'
97 | }
98 | }
99 |
100 | developers {
101 | developer {
102 | id = 'db'
103 | name = 'Danilo Bargen'
104 | email = 'danilo.bargen@threema.ch'
105 | }
106 | }
107 | }
108 | }
109 | }
110 |
111 | repositories {
112 | maven {
113 | def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
114 | def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots'
115 | url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
116 | if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
117 | credentials {
118 | username = ossrhUsername
119 | password = ossrhPassword
120 | }
121 | }
122 | }
123 | }
124 | }
125 |
126 | signing {
127 | useGpgCmd() // Use gpg-agent. For config options, see `gradle.properties`.
128 | sign publishing.publications.release
129 | }
130 | }
131 |
--------------------------------------------------------------------------------
/copy-webrtc.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -euo pipefail
3 |
4 | if [ "$#" -ne 1 ]; then
5 | echo "Usage: $0 "
6 | exit 1
7 | fi
8 |
9 | source=${1%/}
10 | destination=./libs
11 | architectures=("arm:armeabi-v7a" "arm64:arm64-v8a" "x86:x86" "x64:x86_64")
12 |
13 | echo "Copying..."
14 | mkdir -p "$destination"
15 | cp -v "$source/libwebrtc.jar" "$destination/"
16 | for architecture in "${architectures[@]}"; do
17 | IFS=: read -ra parts <<< "$architecture"
18 | mkdir -p "$destination/${parts[1]}"
19 | cp -v "$source/${parts[0]}/libjingle_peerconnection_so.so" "$destination/${parts[1]}/libjingle_peerconnection_so.so"
20 | done
21 |
22 | echo "Done."
23 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
2 | android.useAndroidX=true
3 | android.nonTransitiveRClass=true
4 |
5 | # GnuPG config for signing
6 | signing.gnupg.keyName=E7ADD9914E260E8B35DFB50665FDE935573ACDA6
7 | signing.gnupg.useLegacyGpg=false
8 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/threema-ch/webrtc-android/802e935f0636337747e5f6058773441f41ab55d4/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
6 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/libs/arm64-v8a/libjingle_peerconnection_so.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/threema-ch/webrtc-android/802e935f0636337747e5f6058773441f41ab55d4/libs/arm64-v8a/libjingle_peerconnection_so.so
--------------------------------------------------------------------------------
/libs/armeabi-v7a/libjingle_peerconnection_so.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/threema-ch/webrtc-android/802e935f0636337747e5f6058773441f41ab55d4/libs/armeabi-v7a/libjingle_peerconnection_so.so
--------------------------------------------------------------------------------
/libs/libwebrtc.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/threema-ch/webrtc-android/802e935f0636337747e5f6058773441f41ab55d4/libs/libwebrtc.jar
--------------------------------------------------------------------------------
/libs/x86/libjingle_peerconnection_so.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/threema-ch/webrtc-android/802e935f0636337747e5f6058773441f41ab55d4/libs/x86/libjingle_peerconnection_so.so
--------------------------------------------------------------------------------
/libs/x86_64/libjingle_peerconnection_so.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/threema-ch/webrtc-android/802e935f0636337747e5f6058773441f41ab55d4/libs/x86_64/libjingle_peerconnection_so.so
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'webrtc-android'
2 |
--------------------------------------------------------------------------------
/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/main/java/ch/threema/webrtc/NothingToSeeHere.java:
--------------------------------------------------------------------------------
1 | package ch.threema.webrtc;
2 |
3 | /**
4 | * Empty class, just so that this Java library is not empty.
5 | * This library only has the purpose of packaging the WebRTC build.
6 | */
7 | public class NothingToSeeHere { }
8 |
--------------------------------------------------------------------------------