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, nullable) id<TVIRoomDelegate> delegate
Discussion
It is recommended that this property is only accessed on the delegateQueue
specified in the TVIConnectOptions
when connecting to the room. If no explicit delegateQueue
was provided, the main dispatch queue should be used.
Declared In
TVIRoom.h
dominantSpeaker
The dominant speaker in the Room.
@property (nonatomic, strong, readonly, nullable) TVIRemoteParticipant *dominantSpeaker
Discussion
Indicates the dominant speaker in the Room, if any; in some Rooms (Peer-to-Peer), this cannot be
computed, and so is always nil
. This is part of the Dominant Speaker API and must be enabled by enabling
the dominantSpeakerEnabled
option in TVIConnectOptions
.
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
mediaRegion
The region where media is being processed.
@property (nonatomic, copy, readonly, nullable) NSString *mediaRegion
Discussion
This property is set in a Group Room by the time the Room reaches \ref TVIRoomStateConnected. The property is not set for Peer-to-Peer Rooms, because they do not use a central media server for routing and/or recording.
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
– 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