IrisRtcSession Class Reference

Inherits from IrisRtcJingleSession : NSObject
Declared in IrisRtcSession.h

Overview

The IrisRtcSession is a class used to create and manage the video and chat session.

This class provides the below apis

1) Creating the session : api’s createWithRoomId:notificationData:delegate:error: and createWithRoomId:notificationData:stream:delegate:error: can be used for creating session.creating session involves in getting the room Id from Iris backend by REST API call and creates session using room id.

2) Joining the session : api’s joinWithSessionId:delegate:error: and joinWithSessionId:stream:delegate:error: can be used for joining session.Joining session involves in joining the room using room id which is recieved in notification.

3) muteVideo api will be used to mute the remote video

4) unmuteVideo api will be used to unmute the remote video

5) close api will be used to close the session

Other Methods

  preferredVideoCodecType

private variable used to set the Video codec preference. Default will be set to VP8.

@property (nonatomic) IrisRtcSdkVideoCodecType preferredVideoCodecType

Discussion

private variable used to set the Video codec preference. Default will be set to VP8.

Declared In

IrisRtcSession.h

  preferredAudioCodecType

private variable used to set the Audio codec preference. Default will be set to OPUS.

@property (nonatomic) IrisRtcSdkAudioCodecType preferredAudioCodecType

Discussion

private variable used to set the Audio codec preference. Default will be set to OPUS.

Declared In

IrisRtcSession.h

  isVideoBridgeEnable

private variable set isVideoBridgeEnable as true to make calls using videobridge.

@property BOOL isVideoBridgeEnable

Discussion

private variable set isVideoBridgeEnable as true to make calls using videobridge.

Declared In

IrisRtcSession.h

– createWithRoomName:sessionConfig:delegate:error:

Creating and starting a video session using the anonymous room name.

- (BOOL)createWithRoomName:(NSString *)roomName sessionConfig:(IrisRtcSessionConfig *)sessionConfig delegate:(id<IrisRtcSessionDelegate>)delegate error:(NSError **)outError

Parameters

roomName

anonymous room name.

sessionConfig

IrisRtcSessionConfig object for setting additional optional session configuaration parameters.

delegate

The delegate object for IrisRtcVideoSession used to receive the callbacks.

outError

Provides error code and basic error description when any exception occured in api call.

Discussion

Creating and starting a video session using the anonymous room name.

Declared In

IrisRtcSession.h

– createWithRoomId:delegate:error:

Creating and starting a video session using the room id for the room which has been already allocated for the invloved participants.

- (BOOL)createWithRoomId:(NSString *)roomId delegate:(id<IrisRtcSessionDelegate>)delegate error:(NSError **)outError

Parameters

roomId

Room Id of the room allocated for the participants invalved.

delegate

The delegate object for IrisRtcVideoSession used to receive the callbacks.

outError

Provides error code and basic error description when any exception occured in api call.

Discussion

Creating and starting a video session using the room id for the room which has been already allocated for the invloved participants.

Declared In

IrisRtcSession.h

– createWithRoomId:sessionConfig:delegate:error:

Creating and starting a video session using the room id for the room which has been already allocated for the invloved participants.

- (BOOL)createWithRoomId:(NSString *)roomId sessionConfig:(IrisRtcSessionConfig *)sessionConfig delegate:(id<IrisRtcSessionDelegate>)delegate error:(NSError **)outError

Parameters

roomId

Room Id of the room allocated for the participants invalved.

sessionConfig

IrisRtcSessionConfig object for setting additional optional session configuaration parameters.

delegate

The delegate object for IrisRtcVideoSession used to receive the callbacks.

outError

Provides error code and basic error description when any exception occured in api call.

Discussion

Creating and starting a video session using the room id for the room which has been already allocated for the invloved participants.

Declared In

IrisRtcSession.h

– createWithRoomId:notificationData:stream:sessionConfig:delegate:error:

Creating and starting a video session using the room id for the room which has been already allocated for the invloved participants.

- (BOOL)createWithRoomId:(NSString *)roomId notificationData:(NSString *)notificationData stream:(IrisRtcStream *)stream sessionConfig:(IrisRtcSessionConfig *)sessionConfig delegate:(id<IrisRtcSessionDelegate>)delegate error:(NSError **)outError

Parameters

roomId

Room Id of the room allocated for the participants invalved.

notificationData

notification data.

stream

local stream.

sessionConfig

IrisRtcSessionConfig object for setting additional optional session configuaration parameters.

delegate

delegate to receive the callbacks.

outError

Provides error code and basic error description when any exception occured in api call.

Discussion

Creating and starting a video session using the room id for the room which has been already allocated for the invloved participants.

Declared In

IrisRtcSession.h

– joinWithSessionId:roomToken:roomTokenExpiryTime:rtcServer:delegate:error:

Joining a video session which involves starting a session and joining the room with room id which is received in notification

- (BOOL)joinWithSessionId:(NSString *)sessionId roomToken:(NSString *)roomToken roomTokenExpiryTime:(NSInteger)roomTokenExpiry rtcServer:(NSString *)rtcServer delegate:(id<IrisRtcSessionDelegate>)delegate error:(NSError **)outError

Parameters

sessionId

room id

roomToken

rooomtoken which is received in notification.

rtcServer

rtcServerURL.

delegate

The delegate object for IrisRtcVideoSession,used to receive the callbacks.

outError

Provides error code and basic error description when any exception occured in api call.

roomTokenExpiryTime

rommtokenexpiry which is received in notification.

Discussion

Joining a video session which involves starting a session and joining the room with room id which is received in notification

Declared In

IrisRtcSession.h

– joinWithSessionId:delegate:error:

Joining a video session which involves starting a session and joining the room with room id which is received in notification

- (BOOL)joinWithSessionId:(NSString *)sessionId delegate:(id<IrisRtcSessionDelegate>)delegate error:(NSError **)outError

Parameters

sessionId

room id

delegate

The delegate object for IrisRtcVideoSession,used to receive the callbacks.

outError

Provides error code and basic error description when any exception occured in api call.

Discussion

Joining a video session which involves starting a session and joining the room with room id which is received in notification

Declared In

IrisRtcSession.h

– joinWithSessionId:roomToken:roomTokenExpiryTime:stream:rtcServer:sessionConfig:delegate:error:

Joining a video session which involves starting a session and joining the room with room id which is received in notification

- (BOOL)joinWithSessionId:(NSString *)sessionId roomToken:(NSString *)roomToken roomTokenExpiryTime:(NSInteger)roomTokenExpiry stream:(IrisRtcStream *)stream rtcServer:(NSString *)rtcServer sessionConfig:(IrisRtcSessionConfig *)sessionConfig delegate:(id<IrisRtcSessionDelegate>)delegate error:(NSError **)outError

Parameters

sessionId

room id

roomToken

rooomtoken which is received in notification.

stream

local stream

rtcServer

rtcServerURL.

sessionConfig

IrisRtcSessionConfig object for setting additional optional session configuaration parameters.

delegate

The delegate object for IrisRtcVideoSession,used to receive the callbacks.

outError

Provides error code and basic error description when any exception occured in api call.

roomTokenExpiryTime

rommtokenexpiry which is received in notification.

Discussion

Joining a video session which involves starting a session and joining the room with room id which is received in notification

Declared In

IrisRtcSession.h

– setUserProfile:

setting up user profile information.

- (void)setUserProfile:(IrisRtcUserProfile *)userProfile

Parameters

userProfile

userprofile information.

Discussion

setting up user profile information.

Declared In

IrisRtcSession.h

Mute remote video

– muteVideo:

This method is used for Muting remote video.

- (void)muteVideo:(NSString *)participantId

Parameters

participantId

participantId which needs to be muted

Discussion

This method is used for Muting remote video.

Declared In

IrisRtcSession.h

Unmute remote video

– unmuteVideo:

This method is used for unmuting remote video.

- (void)unmuteVideo:(NSString *)participantId

Parameters

participantId

participantId which needs to be unmuted

Discussion

This method is used for unmuting remote video.

Declared In

IrisRtcSession.h

upgradeToVideo

– upgradeToVideo:notificationData:

This method is used to upgrade to video sesssion from chat session.

- (void)upgradeToVideo:(IrisRtcStream *)stream notificationData:(NSString *)notificationData

Parameters

stream

Stream object

notificationData

Notification data

Discussion

This method is used to upgrade to video sesssion from chat session.

Declared In

IrisRtcSession.h

downgradeToChat

– downgradeToChat

This method is used to downgrade from chat sesssion to video session.

- (void)downgradeToChat

Discussion

This method is used to downgrade from chat sesssion to video session.

Declared In

IrisRtcSession.h

Sending chat messages

– sendChatMessage:error:

This method is used for sending chat message.

- (BOOL)sendChatMessage:(IrisChatMessage *)message error:(NSError **)outError

Parameters

message

Chat message that need to be send.

outError

Provides error code and basic error description when any exception occured in api call.

Discussion

This method is used for sending chat message.

Declared In

IrisRtcSession.h

Sending chat state

– sendChatState:

This method is used for sending chat state.

- (void)sendChatState:(IrisChatState)state

Parameters

state

Chat state

Discussion

This method is used for sending chat state.

Declared In

IrisRtcSession.h

Closing the Session

– close

This method is used for Closing the session.

- (void)close

Discussion

This method is used for Closing the session.

Declared In

IrisRtcSession.h

– getstats

This api is used to collect stats of session.

- (NSArray *)getstats

Discussion

This api is used to collect stats of session.

Declared In

IrisRtcSession.h