JanusPlugin class

Implementers

Constructors

JanusPlugin({int? handleId, required JanusClient context, required JanusTransport transport, required JanusSession session, String? plugin})

Properties

data Stream<RTCDataChannelMessage>?
getter/setter pair
handleId int?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
localStream Stream<MediaStream?>?
getter/setter pair
messages Stream<EventMessage>?
getter/setter pair
onData Stream<RTCDataChannelState>?
getter/setter pair
peerConnection → RTCPeerConnection?
no setter
plugin String?
getter/setter pair
pollingActive bool
getter/setter pair
remoteStream Stream<MediaStream>?
getter/setter pair
remoteTrack Stream<RemoteTrack>?
getter/setter pair
renegotiationNeeded Stream?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typedMessages Stream<TypedEvent<JanusEvent>>?
getter/setter pair
webRTCHandle JanusWebRTCHandle?
getter/setter pair

Methods

createAnswer() Future<RTCSessionDescription>
This method is used to create webrtc answer, sets local description on internal PeerConnection object It supports both style of answer creation that is plan-b and unified.
createOffer({bool audioRecv = true, bool videoRecv = true}) Future<RTCSessionDescription>
This method is used to create webrtc offer, sets local description on internal PeerConnection object It supports both style of offer creation that is plan-b and unified.
dispose() Future<void>
This function takes care of cleaning up all the internal stream controller and timers used to make janus_client compatible with streams and polling support
exists(int roomId) Future
You can check whether a room exists using the exists
getAudioInputDevices() Future<List<MediaDeviceInfo>>
getVideoInputDevices() Future<List<MediaDeviceInfo>>
handleRemoteJsep(RTCSessionDescription? data) Future<void>
It allows you to set Remote Description on internal peer connection, Received from janus server
hangup() Future<void>
initDataChannel({RTCDataChannelInit? rtcDataChannelInit}) Future<void>
this method Initialize data channel on handle's internal peer connection object. It is mainly used for Janus TextRoom and can be used for other plugins with data channel support
initializeMediaDevices({Map<String, dynamic>? mediaConstraints, bool useDisplayMediaDevices = false, TransceiverDirection? transceiverDirection = TransceiverDirection.SendOnly, List<RTCRtpEncoding>? simulcastSendEncodings}) Future<MediaStream?>
Helper method that generates MediaStream from your device camera that will be automatically added to peer connection instance internally used by janus client
initializeWebRTCStack() Future<void>
used to initialize/reinitialize entire webrtc stack if it is required for your application purpose
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCreate() → void
send({dynamic data, RTCSessionDescription? jsep}) Future
This method is crucial for communicating with Janus Server's APIs it takes in data and optionally jsep for negotiating with webrtc peers
sendData(String message) Future<void>
Send text message on existing text room using data channel with same label as specified during initDataChannel() method call.
switchCamera({String? deviceId}) Future<bool>
a utility method which can be used to switch camera of user device if it has more than one camera deviceId : device id of the camera you want to switch to deviceId is important for switchCamera to work in browsers.
toString() String
A string representation of this object.
inherited

Operators

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