addSimulcastTrack method

SimulcastTrackInfo addSimulcastTrack(
  1. String codec,
  2. List<RTCRtpEncoding> encodings
)

Implementation

SimulcastTrackInfo addSimulcastTrack(
    String codec, List<rtc.RTCRtpEncoding> encodings) {
  if (simulcastCodecs[codec] != null) {
    throw Exception('$codec already added');
  }
  SimulcastTrackInfo simulcastCodecInfo = SimulcastTrackInfo(
    codec: codec,
    encodings: encodings,
    mediaStreamTrack: mediaStreamTrack,
  );

  simulcastCodecs[codec] = simulcastCodecInfo;
  return simulcastCodecInfo;
}