|
1 | 1 | [](https://github.com/devopvoid/webrtc-java/actions) |
2 | 2 | [](https://search.maven.org/artifact/dev.onvoid.webrtc/webrtc-java) |
3 | 3 |
|
4 | | -## webrtc-java |
| 4 | +# webrtc-java |
5 | 5 |
|
6 | | -Java native interface implementation based on the free, open [WebRTC](https://webrtc.org) project. The goal of this project is to enable development of RTC applications for desktop platforms running Java. This project wraps the [WebRTC Native API](https://webrtc.github.io/webrtc-org/native-code/native-apis) and is similar to the [JS API](https://w3c.github.io/webrtc-pc). |
| 6 | +webrtc-java is a Java wrapper for the [WebRTC Native API](https://webrtc.github.io/webrtc-org/native-code/native-apis), providing similar functionality to the [W3C JavaScript API](https://w3c.github.io/webrtc-pc). It allows Java developers to build real-time communication applications for desktop platforms without having to work directly with native code. |
7 | 7 |
|
8 | | -### Maven |
| 8 | +The library provides a comprehensive set of Java classes that map to the WebRTC C++ API, making it possible to establish peer-to-peer connections, transmit audio and video, share screens, and exchange arbitrary data between applications. |
9 | 9 |
|
10 | | -```xml |
11 | | -<dependency> |
12 | | - <groupId>dev.onvoid.webrtc</groupId> |
13 | | - <artifactId>webrtc-java</artifactId> |
14 | | - <version>0.12.0</version> |
15 | | -</dependency> |
16 | | -``` |
| 10 | +## Features |
17 | 11 |
|
18 | | -### Gradle |
| 12 | +- **Complete WebRTC API implementation** - Includes peer connections, media devices, data channels, and more |
| 13 | +- **Cross-platform support** - Works on Windows, macOS, and Linux (x64, ARM, ARM64) |
| 14 | +- **Media capabilities** - Audio and video capture from cameras and microphones |
| 15 | +- **Desktop capture** - Screen and application window sharing |
| 16 | +- **Data channels** - Bidirectional peer-to-peer data exchange |
| 17 | +- **Statistics API** - Detailed metrics for monitoring connection quality |
| 18 | +- **Simple integration** - Available as a Maven dependency |
| 19 | +- **Native performance** - Thin JNI layer with minimal overhead |
19 | 20 |
|
20 | | -```groovy |
21 | | -implementation "dev.onvoid.webrtc:webrtc-java:0.12.0" |
22 | | -implementation group: "dev.onvoid.webrtc", name: "webrtc-java", version: "0.12.0", classifier: "windows-x86_64" |
23 | | -implementation group: "dev.onvoid.webrtc", name: "webrtc-java", version: "0.12.0", classifier: "macos-x86_64" |
24 | | -implementation group: "dev.onvoid.webrtc", name: "webrtc-java", version: "0.12.0", classifier: "macos-aarch64" |
25 | | -implementation group: "dev.onvoid.webrtc", name: "webrtc-java", version: "0.12.0", classifier: "linux-x86_64" |
26 | | -implementation group: "dev.onvoid.webrtc", name: "webrtc-java", version: "0.12.0", classifier: "linux-aarch64" |
27 | | -implementation group: "dev.onvoid.webrtc", name: "webrtc-java", version: "0.12.0", classifier: "linux-aarch32" |
28 | | -``` |
| 21 | +## Getting Started |
29 | 22 |
|
30 | | -### Supported Platforms |
31 | | -Maven Central artifacts contain native libraries that can be loaded on the following platforms: |
| 23 | +For more detailed examples and guides, check out the [quickstart guide](quickstart.md) and the specific examples in the project repository. |
32 | 24 |
|
33 | | -<table> |
34 | | - <tr> |
35 | | - <td></td> |
36 | | - <td>x64</td> |
37 | | - <td>arm</td> |
38 | | - <td>arm64</td> |
39 | | - </tr> |
40 | | - <tr align="center"> |
41 | | - <th>Linux</th> |
42 | | - <td>✔</td> |
43 | | - <td>✔ armeabi-v7a</td> |
44 | | - <td>✔ arm64-v8a</td> |
45 | | - </tr> |
46 | | - <tr align="center"> |
47 | | - <th>macOS</th> |
48 | | - <td>✔</td> |
49 | | - <td>-</td> |
50 | | - <td>✔</td> |
51 | | - </tr> |
52 | | - <tr align="center"> |
53 | | - <th>Windows</th> |
54 | | - <td>✔</td> |
55 | | - <td>-</td> |
56 | | - <td>-</td> |
57 | | - </tr> |
58 | | -</table> |
| 25 | +## License |
59 | 26 |
|
60 | | -The native libraries were built using the m138 (7204) WebRTC branch as the stable release, dated June 24, 2025. |
61 | | -### Build Notes |
| 27 | +Copyright (c) 2019 Alex Andres |
62 | 28 |
|
63 | | -To build the native code, be sure to install the prerequisite software (follow the links): |
| 29 | +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at |
64 | 30 |
|
65 | | -**Note**: You don't have to install the Depot Tools, the build script will do that for you. |
| 31 | +[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
66 | 32 |
|
67 | | -<table> |
68 | | - <tr> |
69 | | - <td>Linux</td> |
70 | | - <td><a href="https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md#system-requirements">Ubuntu</a>, <a href="https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md#Notes-for-other-distros">other distros</a></td> |
71 | | - </tr> |
72 | | - <tr> |
73 | | - <td>macOS</td> |
74 | | - <td>Xcode 9 or higher</td> |
75 | | - </tr> |
76 | | - <tr> |
77 | | - <td>Windows</td> |
78 | | - <td><a href="https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#visual-studio">Visual Studio</a></td> |
79 | | - </tr> |
80 | | -</table> |
81 | | - |
82 | | -Assuming you have all the prerequisites installed for your OS, run: |
83 | | - |
84 | | -``` |
85 | | -mvn install |
86 | | -``` |
87 | | - |
88 | | -On the first run, the WebRTC source tree will be loaded into the `/<user home>/webrtc` directory. This will take a while and require about 20 GB of disk space. |
89 | | - |
90 | | -#### Build Parameters |
91 | | - |
92 | | -| Parameter | Description | Default Value | |
93 | | -| ------------------ | ------------------------------------------------------ |-----------------------------| |
94 | | -| webrtc.branch | The WebRTC branch to checkout. | branch-heads/7204 | |
95 | | -| webrtc.src.dir | The absolute checkout path for the WebRTC source tree. | /\<user_home\>/webrtc | |
96 | | -| webrtc.install.dir | The install path for the compiled WebRTC library. Is also used to link against a pre-compiled WebRTC library to reduce build time. | /\<user_home\>/webrtc/build | |
| 33 | +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
0 commit comments