TVIRoom Class Reference

Inherits from NSObject
Declared in TVIRoom.h

Overview

TVIRoom represents a media session with zero or more Remote Participants. Media shared by any one Participant is distributed equally to all other Participants.

  delegate

The TVIRoomDelegate. Set this property to be notified about Room events such as connection status, and Remote Participants joining and leaving.

@property (nonatomic, weak, readonly, nullable) id<TVIRoomDelegate> delegate

Declared In

TVIRoom.h

  localParticipant

A representation of your local Client in the Room.

@property (nonatomic, strong, readonly, nullable) TVILocalParticipant *localParticipant

Discussion

TVILocalParticipant is available once the delegate method didConnectToRoom is called. If you have not yet connected to the Room, or your attempt fails then this property will return nil.

Declared In

TVIRoom.h

  name

The name of the Room.

@property (nonatomic, copy, readonly, nonnull) NSString *name

Discussion

name will return the sid if the Room was created without a name.

Declared In

TVIRoom.h

  remoteParticipants

A collection of connected Remote Participants to TVIRoom.

@property (nonatomic, copy, readonly, nonnull) NSArray<TVIRemoteParticipant*> *remoteParticipants

Declared In

TVIRoom.h

  recording

Indicates if the Room is being recorded.

@property (nonatomic, assign, readonly, getter=isRecording) BOOL recording

Declared In

TVIRoom.h

  sid

The sid of the Room.

@property (nonatomic, copy, readonly, nonnull) NSString *sid

Declared In

TVIRoom.h

  state

The Room’s current state. Use TVIRoomDelegate to know about changes in TVIRoomState.

@property (nonatomic, assign, readonly) TVIRoomState state

Declared In

TVIRoom.h

– init

Developers shouldn’t initialize this class directly.

- (null_unspecified instancetype)init

Discussion

TVIRoom can not be created with init

Declared In

TVIRoom.h

– getRemoteParticipantWithSid:

Utility method which gets a Remote Participant using its sid.

- (nullable TVIRemoteParticipant *)getRemoteParticipantWithSid:(nonnull NSString *)sid

Parameters

sid

The sid.

Return Value

An instance of TVIRemoteParticipant if successful, or nil if not.

Declared In

TVIRoom.h

– disconnect

Disconnects from the Room.

- (void)disconnect

Declared In

TVIRoom.h

– getStatsWithBlock:

Retrieve stats for all media tracks.

- (void)getStatsWithBlock:(nonnull TVIRoomGetStatsBlock)block

Parameters

block

The block to be invoked when the stats are available.

Discussion

Stats are retrieved asynchronously. In the case where the room is the TVIRoomStateDisconnected state, reports won’t be delivered.

Declared In

TVIRoom.h