Producer constructor
Producer({
- required String id,
- required String localId,
- RTCRtpSender? rtpSender,
- required MediaStreamTrack track,
- required RtpParameters rtpParameters,
- required bool stopTracks,
- required bool disableTrackOnPause,
- required bool zeroRtpOnPause,
- required Map<
String, dynamic> appData, - required MediaStream stream,
- required String source,
- 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;
}