Audio, video, and data for your desktop applications. The power of WebRTC, with a Java API that feels like home.
// Your media. Connected.
try (WebRtc rtc = WebRtc.create()) {
Peer peer = rtc.createPeer(
PeerOptions.builder()
.polite(true)
.signaling(message ->
socket.send(message.toJson()))
.build());
socket.onText(text -> peer.signal(
SignalMessage.fromJson(text)));
peer.addTrack(rtc.media().microphone());
peer.addTrack(rtc.media().camera());
peer.whenConnected().join();
hangUp.await();
} // Everything closes with the runtime.Install the library, connect two peers, and send your first audio and video.
Capture a camera, share a screen, play an RTSP stream, or record a call.
Publish live audio and video with WHIP, or receive streams with WHEP over HTTP.
Connect microphones, cameras, and custom sources.
From a window to the whole desktop.
Reliable or unreliable messaging and file transfer.
GPU encoding and decoding, with software fallback.
Plug your own Java encoders and decoders into WebRTC.
Transform camera and desktop frames before sending.
Build frame encryption with encoded transforms.
Send encoded frames without encoding them again.
Play media files and live RTSP streams into a call.
Save sent and received media without re-encoding.
Echo cancellation, noise suppression, and gain control.
Track bitrate, packet loss, jitter, and round-trip time.