copy static method

Implementation

static RtpParameters copy(
  RtpParameters old, {
  String? mid,
  List<RtpCodecParameters>? codecs,
  List<RtpHeaderExtensionParameters>? headerExtensions,
  List<RtpEncodingParameters>? encodings,
  RtcpParameters? rtcp,
}) {
  return RtpParameters(
    codecs: codecs ?? List<RtpCodecParameters>.from(old.codecs),
    encodings: encodings ?? List<RtpEncodingParameters>.from(old.encodings),
    headerExtensions: headerExtensions ??
        List<RtpHeaderExtensionParameters>.from(old.headerExtensions),
    mid: mid ?? old.mid,
    rtcp: rtcp ?? (old.rtcp != null ? RtcpParameters.copy(old.rtcp!) : null),
  );
}