Package-level declarations

Types

Link copied to clipboard
class HttpStreamSessionFactory(configuration: RtcConfiguration = RtcConfiguration()) : StreamSessionFactory

Registers HTTP(S) endpoints as WHIP for PUBLISH and WHEP for PLAYBACK.

Link copied to clipboard
data class RtcConfiguration(val iceServers: List<String> = emptyList(), val bearerToken: String? = null, val connectionTimeoutMillis: Long, val httpTimeoutMillis: Int, val playbackVideoCodec: RtcVideoCodec = RtcVideoCodec.H264)

Set before creating a session. ICE URLs accept libdatachannel's STUN/TURN URI syntax.

Link copied to clipboard
class RtcDuplexSession(context: Context)

One audio sendrecv peer and a reliable text data channel. No signaling protocol is assumed. run owns the connection until cancellation or failure. The application owns microphone permission, the capture mixer, audio routing, and the coroutine collecting this session. The separate outgoing and incoming streams never feed decoded audio into capture. Create one instance per call; run disposes both streams on exit.

Link copied to clipboard
class RtcSession(context: Context, uri: Uri, mode: StreamSession.Mode = StreamSession.Mode.PUBLISH, configuration: RtcConfiguration = RtcConfiguration()) : StreamSession

WHIP publishing or WHEP playback over HTTP(S), using a non-trickle ICE offer. A session owns one reusable stream. Register its stream with a mixer for publishing or attach a StreamView for playback. Close before reconnecting. Configure settings while closed. Cancellation disconnects the active HTTP request; redirects and response reads share an absolute HTTP deadline before cleanup and reconnection.

Link copied to clipboard

H.264/VP8/VP9 and Opus media stream owned by RtcSession. Uses the existing mixer and output views.

Link copied to clipboard

One codec per RTC video track. VP9 uses profile 0 (8-bit, single spatial layer).

Link copied to clipboard
class RtcWebSocket(caCertificatesPem: String? = null) : Closeable

A single-use libdatachannel WebSocket. TLS verification is always enabled. WSS uses platform trust anchors by default, or an explicitly supplied PEM CA bundle. Receive and send queues are bounded. Cancel/close to release native resources.