Consumer constructor
Consumer({
- required String id,
- required String localId,
- required String producerId,
- RTCRtpReceiver? rtpReceiver,
- required MediaStreamTrack track,
- required RtpParameters rtpParameters,
- required Map<
String, dynamic> appData, - required MediaStream stream,
- String? peerId,
- bool closed = false,
@emits transportclose @emits trackended @emits @getstats @emits @close
Implementation
Consumer({
required this.id,
required this.localId,
required this.producerId,
this.rtpReceiver,
required this.track,
required this.rtpParameters,
required this.appData,
required this.stream,
this.peerId,
this.closed = false,
}) : observer = EnhancedEventEmitter(),
super() {
_logger.debug('constructor()');
paused = !track.enabled;
_handleTrack();
}