createRecvTransport method

Transport createRecvTransport({
  1. required String id,
  2. required IceParameters iceParameters,
  3. required List<IceCandidate> iceCandidates,
  4. required DtlsParameters dtlsParameters,
  5. SctpParameters? sctpParameters,
  6. List<RTCIceServer> iceServers = const <RTCIceServer>[],
  7. RTCIceTransportPolicy? iceTransportPolicy,
  8. Map<String, dynamic> additionalSettings = const <String, dynamic>{},
  9. Map<String, dynamic> proprietaryConstraints = const <String, dynamic>{},
  10. Map<String, dynamic> appData = const <String, dynamic>{},
  11. Function? consumerCallback,
  12. Function? dataConsumerCallback,
})

Creates a Transport for receiving media.

@throws {InvalidStateError} if not loaded. @throws {TypeError} if wrong arguments.

Implementation

Transport createRecvTransport({
  required String id,
  required IceParameters iceParameters,
  required List<IceCandidate> iceCandidates,
  required DtlsParameters dtlsParameters,
  SctpParameters? sctpParameters,
  List<RTCIceServer> iceServers = const <RTCIceServer>[],
  RTCIceTransportPolicy? iceTransportPolicy,
  Map<String, dynamic> additionalSettings = const <String, dynamic>{},
  Map<String, dynamic> proprietaryConstraints = const <String, dynamic>{},
  Map<String, dynamic> appData = const <String, dynamic>{},
  Function? consumerCallback,
  Function? dataConsumerCallback,
}) {
  _logger.debug('createRecvTransport()');

  return _createTransport(
    direction: Direction.recv,
    id: id,
    iceParameters: iceParameters,
    iceCandidates: iceCandidates,
    dtlsParameters: dtlsParameters,
    sctpParameters: sctpParameters,
    iceServers: iceServers,
    iceTransportPolicy: iceTransportPolicy,
    additionalSettings: additionalSettings,
    proprietaryConstraints: proprietaryConstraints,
    appData: appData,
    consumerCallback: consumerCallback,
    dataConsumerCallback: dataConsumerCallback,
  );
}