createSendTransport method

Transport createSendTransport({
  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? producerCallback,
  12. Function? dataProducerCallback,
})

Creates a Transport for sending media.

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

Implementation

Transport createSendTransport({
  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? producerCallback,
  Function? dataProducerCallback,
}) {
  _logger.debug('createSendTransport()');

  return _createTransport(
    direction: Direction.send,
    id: id,
    iceParameters: iceParameters,
    iceCandidates: iceCandidates,
    dtlsParameters: dtlsParameters,
    sctpParameters: sctpParameters,
    iceServers: iceServers,
    iceTransportPolicy: iceTransportPolicy,
    additionalSettings: additionalSettings,
    proprietaryConstraints: proprietaryConstraints,
    appData: appData,
    producerCallback: producerCallback,
    dataProducerCallback: dataProducerCallback,
  );
}