Producer constructor

Producer({
  1. required String id,
  2. required String localId,
  3. RTCRtpSender? rtpSender,
  4. required MediaStreamTrack track,
  5. required RtpParameters rtpParameters,
  6. required bool stopTracks,
  7. required bool disableTrackOnPause,
  8. required bool zeroRtpOnPause,
  9. required Map<String, dynamic> appData,
  10. required MediaStream stream,
  11. required String source,
  12. bool closed = false,
})

@emits transportclose @emits trackended @emits @replacetrack - (track: MediaStreamTrack | null) @emits @setmaxspatiallayer - (spatialLayer: string) @emits @setrtpencodingparameters - (params: any) @emits @getstats @emits @close

Implementation

Producer({
  required this.id,
  required this.localId,
  this.rtpSender,
  required this.track,
  required this.rtpParameters,
  required this.stopTracks,
  required this.disableTrackOnPause,
  required this.zeroRtpOnPause,
  required this.appData,
  required this.stream,
  required this.source,
  this.closed = false,
})  : observer = EnhancedEventEmitter(),
      super() {
  _logger.debug('constructor()');

  kind = track.kind!;

  paused = disableTrackOnPause ? !track.enabled : false;
  maxSpatialLayer = null;
}