Producer class

Constructors

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

Properties

appData Map<String, dynamic>
App custom data.
final
closed bool
Closed flag.
getter/setter pair
disableTrackOnPause bool
Whether the Producer should set track.enabled = false when paused.
final
hashCode int
The hash code for this object.
no setteroverride
id String
Id.
final
kind String
Producer kind.
getter/setter pair
localId String
Local id.
final
maxSpatialLayer int?
Video max spatial layer.
latefinal
observer → EnhancedEventEmitter
Observer.
final
paused bool
Paused flag.
getter/setter pair
rtpParameters RtpParameters
RTP parameters.
final
rtpSender RTCRtpSender?
Associated RTCRtpSender.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source String
Source
final
stopTracks bool
Whether the Producer should call stop() in given tracks.
final
stream MediaStream
Stream
final
track MediaStreamTrack
Local track.
final
zeroRtpOnPause bool
Whether we should replace the RTCRtpSender.track with null when paused.
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() → void
Closes the Producer.
closeCopy() Producer
Closes the Producer and return new Instance of same Producer.
copyWith({String? id, String? localId, bool? closed, RTCRtpSender? rtpSender, MediaStreamTrack? track, String? kind, RtpParameters? rtpParameters, bool? paused, int? maxSpatialLayer, bool? stopTracks, bool? disableTrackOnPause, bool? zeroRtpOnPause, Map<String, dynamic>? appData, EnhancedEventEmitter? observer, MediaStream? stream, String? source}) Producer
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 RTCRtpSender 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 sending media.
pauseCopy() Producer
Pauses sending media and return new Instance of same Producer.
remove(String event, Function handler) → void
This function attempts to unbind the handler from the event
inherited
replaceTrack(MediaStreamTrack track) Future<void>
Replaces the current track with a new one.
resume() → void
Resumes sending media.
resumeCopy() Producer
Resumes sending media and return new Instance of same Producer.
safeEmit(String event, [Map<String, dynamic>? args]) → void
inherited
safeEmitAsFuture(String event, [Map<String, dynamic>? args]) Future
inherited
setMaxSpatialLayer(int spatialLayer) Future<void>
Sets the video max spatial layer to be sent.
setRtpEncodingParameters(RtpEncodingParameters params) Future<void>
Sets the DSCP value.
toString() String
A string representation of this object.
inherited
transportClosed() → void
Transport was closed.

Operators

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