JanusSipPlugin class

Inheritance

Constructors

JanusSipPlugin({dynamic handleId, dynamic context, dynamic transport, dynamic session})

Properties

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

Methods

accept({String? srtp, Map<String, dynamic>? headers, bool? autoAcceptReInvites, RTCSessionDescription? sessionDescription}) Future<void>
Accept Incoming Call
call(String uri, {String? callId, String? referId, String? srtp, String? secret, String? ha1Secret, String? authuser, Map<String, dynamic>? headers, String? srtpProfile, bool? autoAcceptReInvites, RTCSessionDescription? offer}) Future<void>
initiate sip call invite to provided sip uri. uri : SIP URI to call; mandatory callId : user-defined value of Call-ID SIP header used in all SIP requests throughout the call; optional referId : in case this is the result of a REFER, the unique identifier that addresses it; optional headers : object with key/value mappings (header name/value), to specify custom headers to add to the SIP INVITE; optional srtp : whether to mandate (sdes_mandatory) or offer (sdes_optional) SRTP support; optional srtpProfile : SRTP profile to negotiate, in case SRTP is offered; optional autoAcceptReInvites : whether we should blindly accept re-INVITEs with a 200 OK instead of relaying the SDP to the application; optional, TRUE by default offer : note it by default sends only audio sendrecv offer
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.
inherited
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.
inherited
decline({int? code, Map<String, dynamic>? headers}) Future<void>
decline sip call code : SIP code to be sent, if not set, 486 is used; optional headers : object with key/value mappings (header name/value), to specify custom headers to add to the SIP request; optional
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
inherited
exists(int roomId) Future
You can check whether a room exists using the exists
inherited
getAudioInputDevices() Future<List<MediaDeviceInfo>>
inherited
getVideoInputDevices() Future<List<MediaDeviceInfo>>
inherited
handleRemoteJsep(RTCSessionDescription? data) Future<void>
It allows you to set Remote Description on internal peer connection, Received from janus server
inherited
hangup({Map<String, dynamic>? headers}) Future<void>
hangup the call headers: object with key/value mappings (header name/value), to specify custom headers to add to the SIP BYE; optional
override
hold(SipHoldState direction) Future<void>
hold sip call direction : specify SipHoldState for direction of call flow
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
inherited
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
inherited
initializeWebRTCStack() Future<void>
used to initialize/reinitialize entire webrtc stack if it is required for your application purpose
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCreate() → void
override
recording(bool state, {bool? audio, bool? video, bool? peerAudio, bool? peerVideo, String? filename}) Future<void>
record on-going call state : true|false, depending on whether you want to start or stop recording something audio: true|false; whether or not our audio should be recorded video: true|false; whether or not our video should be recorded peerAudio: true|false; whether or not our peer's audio should be recorded peerVideo: true|false; whether or not our peer's video should be recorded filename: base path/filename to use for all the recordings
register(String username, {String? type, bool? sendRegister, bool? forceUdp, bool? forceTcp, bool? sips, bool? rfc2543Cancel, bool? refresh, String? secret, String? ha1Secret, String? authuser, String? displayName, String? userAgent, String? proxy, String? outboundProxy, Map<String, dynamic>? headers, List<Map<String, dynamic>>? contactParams, List<String>? incomingHeaderPrefixes, String? masterId, int? registerTtl}) Future<void>
Register client to sip server username : SIP URI to register type : if guest or helper, no SIP REGISTER is actually sent; optional sendRegister : true|false; if false, no SIP REGISTER is actually sent; optional
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
inherited
sendData(String message) Future<void>
Send text message on existing text room using data channel with same label as specified during initDataChannel() method call.
inherited
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.
inherited
toString() String
A string representation of this object.
inherited
transfer(String uri, {String? replace}) Future<void>
transfer on-going call to another sip uri uri : SIP URI to send the transferee too replace: call-ID of the call this attended transfer is supposed to replace; default is none, which means blind/unattended transfer
unhold() Future<void>
unhold sip call
unregister() Future<void>
unregister from the SIP server.
update() Future<void>
update sip session

Operators

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