IrisRtcStream

IrisRtcStream

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
Name Type Description
streamType string

Type of stream audio or video

resolution string

Resolution for the video

fps string

Frames per second

constraints json

Media constraints for audio and video

Properties
Name Type Description
audio string

Media constraints for audio

video string

Media constraints for video

screenShare string

True if it is a screen share call

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 microphone or camera

stopMediaStream(mediaStream)

This API stops the given media stream

Parameters:
Name Type Description
mediaStream object

Stream to be stopped