StreamPeerConnection
constructor(coroutineScope: CoroutineScope, type: StreamPeerType, mediaConstraints: MediaConstraints, onStreamAdded: (MediaStream) -> Unit?, onNegotiationNeeded: (StreamPeerConnection, StreamPeerType) -> Unit?, onIceCandidate: (IceCandidate, StreamPeerType) -> Unit?, onRejoinNeeded: () -> Unit, maxBitRate: Int, traceCreateAnswer: Boolean = true, tracer: Tracer)
Parameters
coroutineScope
The scope used to listen to stats events.
type
The internal type of the PeerConnection. Check StreamPeerType.
mediaConstraints
Constraints used for the connections.
onStreamAdded
Handler when a new MediaStream gets added.
onNegotiationNeeded
Handler when there's a new negotiation.
onIceCandidate
Handler whenever we receive IceCandidates.
maxBitRate
The maximum bitrate for the connection.
traceCreateAnswer
Whether to trace the create answer event or not.
tracer
The tracer used to trace the connection.