Platform

Platform

  • Getting Started
  • API

Callbacks

Responses to any API call from the app is handled by callbacks. For example, on successful creation of audio session, onSessionCreated callback gets invoked or, if there is any error, onSessionError API gets invoked.

Following are the callbacks SDK provides. Session callbacks are common for all session types (audio, video, chat) and each session type has its own specific callbacks. The app can receive these callbacks by implementing appropriate delegates.

Stream Related

Stream related callbacks are provided by IrisRtcStreamDelegate.

onLocalStream

This callback gets invoked when the local preview is available.

(void)onLocalStream:(IrisRtcStream *)stream mediaTrack:(IrisRtcMediaTrack *)mediaTrack;
Parameters
streamPointer to the stream object
mediaTrackMedia track that is associated with the stream

onStreamError

This callback gets invoked when there in an error during stream creation process.

(void)onStreamError:(IrisRtcStream *)stream error:(NSError*)error withAdditionalInfo:(NSDictionary *)info;
Parameters
streamPointer to the stream object
errorError code and basic description
infoAdditional details for debugging

Session Related

Session related callbacks are common for video, audio and chat sessions. By implementing corresponding delegates for each sessions user can access these callbacks

onSessionCreated

This callback gets invoked when the room is created successfully.

(void)onSessionCreated:(NSString *)roomId traceId:(NSString *)traceId;
Parameters
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionJoined

This callback gets invoked when the receiver joins the room successfully.

(void)onSessionJoined:(NSString *)roomId traceId:(NSString *)traceId;
Parameters
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionParticipantJoined

This callback gets invoked at the sender side when the remote participant joins the room.

(void)onSessionParticipantJoined:(NSString *)participantId roomId:(NSString*)roomId traceId:(NSString *)traceId;
Parameters
participantIdParticipant Id
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionConnected

This callback gets invoked when the session is connected.

(void)onSessionConnected:(NSString *)roomId traceId:(NSString *)traceId;
Parameters
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionEnded

This callback gets invoked when the session ends.

(void)onSessionEnded:(NSString*)roomId traceId:(NSString *)traceId;
Parameters
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionParticipantLeft

This callback gets invoked when the participant leaves the room.

(void)onSessionParticipantLeft:(NSString*)participantId roomId:(NSString*)roomId traceId:(NSString *)traceId;
Parameters
participantIdParticipant Id
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionParticipantProfile

This callback gets invoked when the participant profile is changed.

(void)onSessionParticipantProfile:(NSString*)participantId userProfile:(IrisRtcUserProfile*)userprofile roomId:(NSString*)roomid traceId:(NSString *)traceId;
Parameters
participantIdParticipant Id
userprofileIriRtcUserProfile object containing participant's name and image url
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionDominantSpeakerChanged

This callback gets invoked when dominant speaker is changed in multiple stream.

(void)onSessionDominantSpeakerChanged:(NSString*)participantId roomId:(NSString*)roomId traceId:(NSString *)traceId;
Parameters
participantIdParticipant Id
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionRemoteParticipantActivated

This callback gets invoked when stream of particular particiapnt is activated/viewed in multiple stream.

@optional
(void)onSessionRemoteParticipantActivated:(NSString*)participantId roomId:(NSString*)roomId traceId:(NSString *)traceId;
Parameters
participantIdParticipant Id
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionParticipantNotResponding

This callback gets invoked when remote participant is not responding.

(void)onSessionParticipantNotResponding:(NSString*)participantId roomId:(NSString*)roomId traceId:(NSString *)traceId;
Parameters
participantIdParticipant Id
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionTypeChanged

This callback gets invoked when there is change in session type.

@optional
(void)onSessionTypeChanged:(NSString*)sessionType participantId:(NSString*)participantId roomId:(NSString*)roomId traceId:(NSString *)traceId;
Parameters
sessionTypeSession type
participantIdParticipant Id
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionParticipantAudioMuted

This callback gets invoked when audio of remote participant muted or unmuted.

@optional
(void)onSessionParticipantAudioMuted:(BOOL)mute participantId:(NSString*)participantId roomId:(NSString*)roomId traceId:(NSString *)traceId;
Parameters
muteAudio state, mute or unmute
participantIdParticipant Id
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionParticipantVideoMuted

This callback gets invoked when video of remote participant muted or unmuted.

@optional
(void)onSessionParticipantVideoMuted:(BOOL)mute participantId:(NSString*)participantId roomId:(NSString*)roomId traceId:(NSString *)traceId;
Parameters
muteVideo state, mute or unmute
participantIdParticipant Id
roomIdRoom id received from Iris backend
traceIdTrace id

onSessionError

This callback gets invoked when there is error while the session is active.

 (void)onSessionError:(NSError*)error withAdditionalInfo:(NSDictionary *)info roomId:(NSString*)roomId traceId:(NSString *)traceId;
Parameters
errorThe basic error code details
infoAdditional error details including description
roomIdRoom id received from Iris backend
traceIdTrace id

onLogAnalytics

This callback gets invoked when there is any message is to be convey to the app.

(void)onLogAnalytics:(NSString*)log roomId:(NSString*)roomId traceId:(NSString *)traceId;
Parameters
logLog message to the app
roomIdRoom id received from Iris backend
traceIdTrace id
  • Stream Related
    • onLocalStream
    • onStreamError
  • Session Related
    • onSessionCreated
    • onSessionJoined
    • onSessionParticipantJoined
    • onSessionConnected
    • onSessionEnded
    • onSessionParticipantLeft
    • onSessionParticipantProfile
    • onSessionDominantSpeakerChanged
    • onSessionRemoteParticipantActivated
    • onSessionParticipantNotResponding
    • onSessionTypeChanged
    • onSessionParticipantAudioMuted
    • onSessionParticipantVideoMuted
    • onSessionError
    • onLogAnalytics
Docs
Getting StartedGuidesAPI Reference
More
BlogGitHub
555 Platform
Copyright © 2024 555 Platform ™
555docs-v0.0.94