JanusVideoRoomPlugin class

Inheritance

Constructors

JanusVideoRoomPlugin({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

configure({int? bitrate, bool? keyframe, bool? record, String? filename, String? display, dynamic audioActivePackets, int? audioLevelAverage, List<Map<String, String>>? descriptions, List<ConfigureStream>? streams, bool? restart, RTCSessionDescription? sessionDescription}) Future<void>
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
createRoom(dynamic roomId, {bool permanent = false, String? pin, Map<String, dynamic>? extras, List<String>? allowed, String? isPrivate, String description = '', String? secret}) Future
Used to create a new video room
destroyRoom(dynamic roomId, {String? secret, bool? permanent}) Future
Used to destroy an existing video room, whether created dynamically or statically
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
editRoom(dynamic roomId, {String? secret, String? newDescription, String? newSecret, String? newPin, String? newIsPrivate, String? newRequirePvtId, String? newBitrate, String? newFirFreq, int? newPublisher, bool? newLockRecord, Map? extras, bool? permanent}) Future
This allows you to modify the room description, secret, pin and whether it's private or not: you won't be able to modify other more static properties, like the room ID, the sampling rate, the extensions-related stuff and so on
exists(int roomId) Future
You can check whether a room exists using the exists
inherited
getAudioInputDevices() Future<List<MediaDeviceInfo>>
inherited
getRoomParticipants(dynamic roomId) Future<VideoRoomListParticipantsResponse?>
get list of participants in a existing video room
getRooms() Future<VideoRoomListResponse?>
get list of all rooms
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() Future<void>
sends hangup request on current active JanusVideoRoomPlugin to tear off active PeerConnection in-effect leaving the room.
override
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
joinPublisher(dynamic roomId, {String? pin, int? id, String? token, String? displayName}) Future<void>
joins the JanusVideoRoom as a media publisher on provided roomId with its name as displayName and optionally can provide your own id.
joinSubscriber(dynamic roomId, {List<PublisherStream>? streams, int? privateId, int? feedId, String? pin, String? token}) Future
joins the JanusVideoRoom as a media publisher on provided roomId with its name as displayName and optionally can provide your own id.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCreate() → void
override
publishMedia({String? audioCodec, String? videCodec, int? bitrate, bool? record, String? filename, String? newDisplayName, int? audioLevelAverage, int? audioActivePackets, List<Map<String, String?>>? descriptions, RTCSessionDescription? offer}) Future<void>
sends the publish request to JanusVideoRoom. It should be called once VideoRoomJoinedEvent is received from server.
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
start(dynamic roomId, {RTCSessionDescription? answer}) Future<void>
subscribeToStreams(List<PublisherStream> streams, {RTCSessionDescription? offer}) Future<void>
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
unpublish() Future<void>
sends unpublish request on current active JanusVideoRoomPlugin to tear off active PeerConnection in-effect leaving the room.
unsubscribe({List<UnsubscribeStreams>? streams}) Future<void>
update({List<SubscriberUpdateStream>? subscribe, List<SubscriberUpdateStream>? unsubscribe}) Future<void>

Operators

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