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
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.