JanusStreamingPlugin class
Constructors
-
JanusStreamingPlugin({dynamic handleId, dynamic context, dynamic transport, dynamic session})
-
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.
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
-
createStream(String type, {String? name, String? description, String? metadata, int? id, String? pin, List<CreateMediaItem>? media, String? secret, bool? isPrivate, bool? permanent, String? adminKey})
→ Future<StreamingMount?>
-
Create a new streaming Mount-point
type = rtp|live|ondemand|rtsp
rtp = stream originated by an external tool (e.g., gstreamer or
ffmpeg) and sent to the plugin via RTP
live = local file streamed live to multiple viewers
(multiple viewers = same streaming context)
ondemand = local file streamed on-demand to a single listener
(multiple viewers = different streaming contexts)
rtsp = stream originated by an external RTSP feed (only
available if libcurl support was compiled)
-
destroyStream(int id, {String? secret, bool? permanent})
→ Future<bool>
-
destroy existing streaming mount-point
setting permanent true will delete from config files as well.
-
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
-
editStream(int id, {String? secret, String? description, String? metadata, String? newSecret, bool? newIsPrivate, bool? permanent, String? newPin})
→ Future<StreamingMountEdited?>
-
edit existing streaming mount-point
-
exists(int roomId)
→ Future
-
You can check whether a room exists using the exists
inherited
-
getAudioInputDevices()
→ Future<List<MediaDeviceInfo>>
-
inherited
-
getStreamInfo(int id, {String? secret})
→ Future<StreamingMountPointInfo?>
-
Get verbose info of a specific mount-point
-
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>
-
inherited
-
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
-
listStreams()
→ Future<List<StreamingMountPoint>>
-
Get list of all streaming mount-point available on server
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onCreate()
→ void
-
override
-
pauseStream()
→ Future<void>
-
temporarily stop media delivery
-
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
-
startStream()
→ Future<void>
-
call this method once watch request is successfully completed
-
stopStream()
→ Future<void>
-
stop the media flow entirely
-
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
-
switchStream(int id)
→ Future<void>
-
switch to different streaming mount point
-
toString()
→ String
-
A string representation of this object.
inherited
-
watchStream(int id, {List<CreateMediaItem>? media, String? pin, bool? offerAudio, bool? offerVideo, bool? offerData})
→ Future<void>
-