RTCRtpParameters.fromMap constructor

RTCRtpParameters.fromMap(
  1. Map map
)

Implementation

factory RTCRtpParameters.fromMap(Map<dynamic, dynamic> map) {
  var encodings = <RTCRtpEncoding>[];
  dynamic encodingsMap = map['encodings'];
  encodingsMap.forEach((params) {
    encodings.add(RTCRtpEncoding.fromMap(params));
  });
  var headerExtensions = <RTCHeaderExtension>[];
  dynamic headerExtensionsMap = map['headerExtensions'];
  headerExtensionsMap.forEach((params) {
    headerExtensions.add(RTCHeaderExtension.fromMap(params));
  });
  var codecs = <RTCRTPCodec>[];
  dynamic codecsMap = map['codecs'];
  codecsMap.forEach((params) {
    codecs.add(RTCRTPCodec.fromMap(params));
  });
  var rtcp = RTCRTCPParameters.fromMap(map['rtcp']);
  return RTCRtpParameters(
      transactionId: map['transactionId'],
      rtcp: rtcp,
      headerExtensions: headerExtensions,
      encodings: encodings,
      codecs: codecs);
}