MediaConnection constructor
MediaConnection(
- String peerId,
- Peer? provider,
- PeerConnectOption? options
Implementation
MediaConnection(super.peerId, super.provider, super.options) {
_localStream = options?.stream;
connectionId = options?.connectionId ?? _idPrefix + util.randomToken();
_negotiator = Negotiator(this);
if (_localStream != null) {
_negotiator?.startConnection(
options!.copyWith(originator: true, stream: _localStream));
}
}