TVIRoomDelegate Protocol Reference

Conforms to NSObject
Declared in TVIRoom.h

Overview

TVIRoomDelegate provides callbacks when important changes to a TVIRoom occur.

– didConnectToRoom:

This method is invoked when connecting to the Room succeeds.

- (void)didConnectToRoom:(nonnull TVIRoom *)room

Parameters

room

The Room for which connection succeeded.

Declared In

TVIRoom.h

– room:didFailToConnectWithError:

This method is invoked when connecting to the Room fails.

- (void)room:(nonnull TVIRoom *)room didFailToConnectWithError:(nonnull NSError *)error

Parameters

room

The Room for which connection failed.

error

The error encountered during the connection attempt.

Declared In

TVIRoom.h

– room:didDisconnectWithError:

This method is invoked when the Client disconnects from a Room.

- (void)room:(nonnull TVIRoom *)room didDisconnectWithError:(nullable NSError *)error

Parameters

room

The Room from which the Client disconnected.

error

An NSError describing why disconnect occurred, or nil if the disconnect was initiated locally.

Declared In

TVIRoom.h

– room:isReconnectingWithError:

This method is invoked when the Client is attempting to reconnect to a Room due to a network disruption.

- (void)room:(nonnull TVIRoom *)room isReconnectingWithError:(nonnull NSError *)error

Parameters

room

The Room for which the Client is attempting to reconnect.

error

An NSError describing why the Client is reconnecting.

Discussion

This method is invoked when the Client is attempting to reconnect to a Room due to a network disruption. The possible errors which could occur are TVIErrorSignalingConnectionDisconnectedError and TVIErrorMediaConnectionError. During a media reconnection signaling related methods may continue to be invoked.

There are certain instances when an application is put into the background that both the signaling and media connection are closed which will cause this delegate method to be invoked.

  • When connected to a Peer-to-Peer Room with no Remote Participants.
  • When connected to a Peer-to-Peer Room with other Remote Participants and no shared audio tracks.
  • When connected to a Group Room with no shared audio tracks.

Declared In

TVIRoom.h

– didReconnectToRoom:

This method is invoked after the Client has reconnected to a Room following a network disruption.

- (void)didReconnectToRoom:(nonnull TVIRoom *)room

Parameters

room

The Room which the Client has been reconnected.

Declared In

TVIRoom.h

– room:participantDidConnect:

This method is invoked when a Remote Participant connects to the Room.

- (void)room:(nonnull TVIRoom *)room participantDidConnect:(nonnull TVIRemoteParticipant *)participant

Parameters

room

The Room to which a Remote Participant connected.

participant

The Remote Participant who connected to the Room.

Declared In

TVIRoom.h

– room:participantDidDisconnect:

This method is invoked when a Remote Participant disconnects from the Room.

- (void)room:(nonnull TVIRoom *)room participantDidDisconnect:(nonnull TVIRemoteParticipant *)participant

Parameters

room

The Room from which a Remote Participant got disconnected.

participant

The Remote Participant who disconnected from the Room.

Declared In

TVIRoom.h

– room:participantIsReconnecting:

This method is invoked when a Remote Participant is reconnecting to the Room after a signaling connection disruption.

- (void)room:(nonnull TVIRoom *)room participantIsReconnecting:(nonnull TVIRemoteParticipant *)participant

Parameters

room

The Room to which a Remote Participant is reconnecting.

participant

The Remote Participant who is reconnecting to the Room.

Discussion

It can take up to 15 seconds for our signaling backend to detect that a RemoteParticipant’s connection has been disrupted due to a network degradation or handoff.

Declared In

TVIRoom.h

– room:participantDidReconnect:

This method is invoked when a Remote Participant has reconnected to the Room after a signaling connection disruption.

- (void)room:(nonnull TVIRoom *)room participantDidReconnect:(nonnull TVIRemoteParticipant *)participant

Parameters

room

The Room to which a Remote Participant has reconnected.

participant

The Remote Participant who has reconnected to the Room.

Declared In

TVIRoom.h

– roomDidStartRecording:

This method is invoked when recording of media being shared to a Room has started.

- (void)roomDidStartRecording:(nonnull TVIRoom *)room

Parameters

room

The Room for which recording has been started.

Discussion

This method is only called when a Room which was not previously recording starts recording. If you’ve joined a Room which is already recording this event will not be fired.

Declared In

TVIRoom.h

– roomDidStopRecording:

This method is invoked when the recording of media shared to a Room has stopped.

- (void)roomDidStopRecording:(nonnull TVIRoom *)room

Parameters

room

The Room for which recording has been stopped.

Discussion

This method is only called when a Room which was previously recording stops recording. If you’ve joined a Room which is not recording this event will not be fired.

Declared In

TVIRoom.h

– room:dominantSpeakerDidChange:

This method is invoked when the dominant speaker in the Room changes.

- (void)room:(nonnull TVIRoom *)room dominantSpeakerDidChange:(nullable TVIRemoteParticipant *)participant

Parameters

room

The Room in which the dominant speaker changed.

participant

The Remote Participant who is now the dominant speaker. If there is currently no dominant speaker, nil will be sent.

Discussion

This method is invoked when the dominant speaker in the Room changes. Either there is a new dominant speaker, in which case the Room’s dominantSpeaker property equals the RemoteParticipant included in the event; or, there is no longer a dominant speaker, in which case the Room’s dominantSpeaker property equals nil.

Declared In

TVIRoom.h