new IrisRtcStream()
Constructor for IrisRtcStream
This class maintains Iris APIs used to create local video and audio tracks. When new IrisRtcSession is created
Iris streams are associated with the session.
Methods
(static) getMediaDevices()
Get the media devices
createStream(streamConfig)
This API is called to create local streams based on the streamConfig set by the user streamConfig
is a json object.
Client can either set the Media Constraints with streamConfig.constraints
or just
set the type of the strem he wants streamConfig.streamType
as "audio" or "video".
Client can also set few other parameters if streamType is used like resloution, bandwidth and fps.
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
streamConfig |
json | Stream config json example as mentioned Properties
|
onLocalStream(stream)
Called when a local stream is created.
Parameters:
Name | Type | Description |
---|---|---|
stream |
object | local stream |
onStreamError()
This callback is called if stream creation is failed
requestMediaPermission(deviceType)
This API is allow user to acquire permission for microphone and camera for loca media access
Parameters:
Name | Type | Description |
---|---|---|
deviceType |
string | Media access type required |
stopMediaStream(mediaStream)
This API stops the given media stream
Parameters:
Name | Type | Description |
---|---|---|
mediaStream |
object | Stream to be stopped |