Consumer class

Constructors

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

Properties

appData Map<String, dynamic>
App custom data.
final
closed bool
Closed flag.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
id String
Id.
final
kind String?
no setter
localId String
Local id.
final
observer → EnhancedEventEmitter
Observer instance.
final
paused bool
Paused flag.
getter/setter pair
peerId String?
Peer id.
getter/setter pair
producerId String
Associated Producer id.
final
rtpParameters RtpParameters
RTP parameters.
final
rtpReceiver RTCRtpReceiver?
Associated RTCRtpReceiver.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream MediaStream
Stream.
final
track MediaStreamTrack
Remote track.
final

Methods

callback(Function func, [dynamic arg0, dynamic arg1, dynamic arg2, dynamic arg3, dynamic arg4, dynamic arg5]) → dynamic
inherited
callbackAsFuture(Function func, [dynamic arg0, dynamic arg1, dynamic arg2, dynamic arg3, dynamic arg4, dynamic arg5]) Future
inherited
clearListeners() → void
This function unbinds all the handlers for all the events
inherited
close() Future<void>
Closes the Consumer.
closeCopy() Future<Consumer>
Closes the Consumer and return new Instance of same Consumer.
copyWith({String? id, String? localId, String? producerId, bool? closed, RTCRtpReceiver? rtpReceiver, MediaStreamTrack? track, RtpParameters? rtpParameters, bool? paused, Map<String, dynamic>? appData, MediaStream? stream, EnhancedEventEmitter? observer, String? peerId}) Consumer
emit(String event, [dynamic arg0, dynamic arg1, dynamic arg2, dynamic arg3, dynamic arg4, dynamic arg5]) → void
This function triggers all the handlers currently listening to event and passes them data.
inherited
emitAsFuture(String event, [dynamic arg0, dynamic arg1, dynamic arg2, dynamic arg3, dynamic arg4, dynamic arg5]) Future
This function triggers all the handlers currently listening to event and passes them data.
inherited
getStats() Future
Get associated RTCRtpReceiver stats.
listeners(dynamic event) List
Return function list named event.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
off(String event) → void
This function attempts to unbind all the handler from the event
inherited
on(String event, Function handler) → void
This function binds the handler as a listener to the event
inherited
once(String event, Function handler) → void
This function binds the handler as a listener to the first occurrence of the event. When handler is called once, it is removed.
inherited
pause() → void
Pauses receiving media.
pauseCopy() Consumer
Pauses receiving media and return new Instance of same Consumer.
remove(String event, Function handler) → void
This function attempts to unbind the handler from the event
inherited
resume() → void
Resumes receiving media.
resumeCopy() Consumer
Resumes receiving media and return new Instance of same Consumer.
safeEmit(String event, [Map<String, dynamic>? args]) → void
inherited
safeEmitAsFuture(String event, [Map<String, dynamic>? args]) Future
inherited
toString() String
A string representation of this object.
inherited
transportClosed() Future<void>
Transport was closed.

Operators

operator ==(Object other) bool
The equality operator.
override