IrisRtcVideoSession Class Reference

Inherits from IrisRtcJingleSession : NSObject
Declared in IrisRtcVideoSession.h

Overview

The IrisRtcVideoSession is a class used to create and manage the video 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

IrisRtcVideoSession.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

IrisRtcVideoSession.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

IrisRtcVideoSession.h

– createWithRoomName:sessionConfig:stream:delegate:error:

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

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

Parameters

roomName

anonymous room name.

sessionConfig

IrisRtcSessionConfig object for setting additional optional session configuaration parameters.

stream

local stream.

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

IrisRtcVideoSession.h

– createWithRoomId:notificationData: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 delegate:(id<IrisRtcVideoSessionDelegate>)delegate error:(NSError **)outError

Parameters

roomId

Room Id of the room allocated for the participants invalved.

notificationData

notification data.

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

IrisRtcVideoSession.h

– createWithRoomId:notificationData: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 sessionConfig:(IrisRtcSessionConfig *)sessionConfig delegate:(id<IrisRtcVideoSessionDelegate>)delegate error:(NSError **)outError

Parameters

roomId

Room Id of the room allocated for the participants invalved.

notificationData

notification data.

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

IrisRtcVideoSession.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<IrisRtcVideoSessionDelegate>)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

IrisRtcVideoSession.h

– createWithRoomId:notificationData:stream:delegate:error:

  • Creating and starting a video session using the room id for the room which has been already allocated for the invloved participants. *
  • @param roomId Room Id of the room allocated for the participants invalved.
  • @param notificationData notification data.
  • @param stream local stream.
  • @param delegate delegate to receive the callbacks.
  • @param outError Provides error code and basic error description when any exception occured in api call.
- (BOOL)createWithRoomId:(NSString *)roomId notificationData:(NSString *)notificationData stream:(IrisRtcStream *)stream delegate:(id<IrisRtcVideoSessionDelegate>)delegate error:(NSError **)outError

Discussion

  • Creating and starting a video session using the room id for the room which has been already allocated for the invloved participants. *
  • @param roomId Room Id of the room allocated for the participants invalved.
  • @param notificationData notification data.
  • @param stream local stream.
  • @param delegate delegate to receive the callbacks.
  • @param outError Provides error code and basic error description when any exception occured in api call.

Declared In

IrisRtcVideoSession.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<IrisRtcVideoSessionDelegate>)delegate error:(NSError **)outError

Parameters

sessionId

room id

roomToken

rooomtoken which is received in notification.

roomTokenExpiry

rommtokenexpiry 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.

Discussion

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

Declared In

IrisRtcVideoSession.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<IrisRtcVideoSessionDelegate>)delegate error:(NSError **)outError

Parameters

sessionId

room id

roomToken

rooomtoken which is received in notification.

roomTokenExpiry

rommtokenexpiry 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.

Discussion

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

Declared In

IrisRtcVideoSession.h

– setUserProfile:

setting up user profile information.

- (void)setUserProfile:(IrisRtcUserProfile *)userProfile

Parameters

userProfile

userprofile information.

Discussion

setting up user profile information.

Declared In

IrisRtcVideoSession.h

– setMaxNumberOfRemoteStream:

setting up maximum number of streams for session.

- (void)setMaxNumberOfRemoteStream:(int)value

Parameters

value

maximum number of streams to be viewed in session.

Discussion

setting up maximum number of streams for session.

Declared In

IrisRtcVideoSession.h

– activateRemoteStream:

This method is used to select stream from a particular participant in case we have restricted max number of streams to receive. This API needs be called only after ‘onSessionConnected’ callback.

- (BOOL)activateRemoteStream:(NSString *_Nonnull)participantId

Parameters

participantId

Id for a participant received in onSessionParticipantJoined callback.

Discussion

This method is used to select stream from a particular participant in case we have restricted max number of streams to receive. This API needs be called only after ‘onSessionConnected’ callback.

Declared In

IrisRtcVideoSession.h

– muteVideo:

This method is used for Muting remote video.

- (void)muteVideo:(NSString *_Nonnull)participantId

Parameters

participantId

participantId which needs to be muted

Discussion

This method is used for Muting remote video.

Declared In

IrisRtcVideoSession.h

Unmute remote video

– unmuteVideo:

This method is used for unmuting remote video.

- (void)unmuteVideo:(NSString *_Nonnull)participantId

Parameters

participantId

participantId which needs to be unmuted

Discussion

This method is used for unmuting remote video.

Declared In

IrisRtcVideoSession.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

IrisRtcVideoSession.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

IrisRtcVideoSession.h