JvmWebRtcEngine

class JvmWebRtcEngine(val config: JvmWebRtcEngineConfig, mediaTrackFactory: MediaTrackFactory = config.mediaTrackFactory ?: JvmMediaDevices()) : WebRtcEngineBase, MediaTrackFactory(source)

JVM WebRTC engine implementation that handles peer connection creation and management using dev.onvoid.webrtc bindings.

Report a problem

Parameters

config

The JVM-specific WebRTC engine configuration

mediaTrackFactory

Factory for creating media tracks, defaults to JvmMediaDevices if not specified in config

Constructors

Link copied to clipboard
constructor(config: JvmWebRtcEngineConfig, mediaTrackFactory: MediaTrackFactory = config.mediaTrackFactory ?: JvmMediaDevices())

Properties

Link copied to clipboard
open override val config: JvmWebRtcEngineConfig

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open suspend override fun createAudioTrack(constraints: WebRtcMedia.AudioTrackConstraints.() -> Unit = {}): WebRtcMedia.AudioTrack
Link copied to clipboard

Creates a new peer connection with the configured settings.

open suspend fun createPeerConnection(config: WebRtcConnectionConfig.() -> Unit = this.config.defaultConnectionConfig): WebRtcPeerConnection

Creates a new peer connection with the configured settings. If no configuration is provided, the default configuration from WebRtcConfig.defaultConnectionConfig will be used.

Link copied to clipboard
open suspend override fun createVideoTrack(constraints: WebRtcMedia.VideoTrackConstraints.() -> Unit = {}): WebRtcMedia.VideoTrack