StreamPeerConnection
constructor(coroutineScope: CoroutineScope, type: StreamPeerType, mediaConstraints: MediaConstraints, onStreamAdded: (MediaStream) -> Unit?, onNegotiationNeeded: (StreamPeerConnection, StreamPeerType) -> Unit?, onIceCandidate: (IceCandidate, StreamPeerType) -> Unit?, maxBitRate: Int)
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.