-
- All Implemented Interfaces:
-
com.twilio.video.AudioProcessorSupportCheck
public class Room implements AudioProcessorSupportCheck
A Room represents a media session with zero or more remote Participants. Media shared by any one RemoteParticipant is distributed equally to all other Participants.
A subset of Android devices provide an OpenSLES implementation. Although more efficient, the use of OpenSLES occasionally results in echo. As a result, the Video SDK disables OpenSLES by default unless explicitly enabled. To enable OpenSLES, execute the following before invoking
{@code Video.connect(...)}{@code tvi.webrtc.voiceengine.WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(false)}
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceRoom.ListenerListener definition of room related events.
public enumRoom.StateRepresents the current state of a Room.
-
Field Summary
Fields Modifier and Type Field Description private Stringnameprivate Stringsidprivate StringmediaRegionprivate Room.Statestateprivate LocalParticipantlocalParticipantprivate RemoteParticipantdominantSpeaker
-
Method Summary
Modifier and Type Method Description StringgetName()Returns the name of the current room. StringgetSid()Returns the SID of the current room. StringgetMediaRegion()Returns the region where media is processed. synchronized Room.StategetState()Returns the current room state. synchronized LocalParticipantgetLocalParticipant()Returns the current local participant. RemoteParticipantgetDominantSpeaker()Returns the dominant speaker of the Room. synchronized booleanisRecording()Returns whether any media in the Room is being recorded. synchronized List<RemoteParticipant>getRemoteParticipants()Returns all currently connected participants. synchronized voidgetStats(@NonNull() StatsListener statsListener)Retrieve stats for all media tracks and notify StatsListener via calling thread. synchronized voiddisconnect()Disconnects from the room. booleanisAudioProcessorSupported(String audioProcessorName)DO NOT USE, For internal use only, verifies if audio processor is supported. -
-
Method Detail
-
getName
@NonNull() String getName()
Returns the name of the current room. This method will return the SID if the room was createdwithout a name.
-
getMediaRegion
@Nullable() String getMediaRegion()
-
getState
@NonNull() synchronized Room.State getState()
Returns the current room state.
-
getLocalParticipant
@Nullable() synchronized LocalParticipant getLocalParticipant()
Returns the current local participant. If the room has not reached then this method will return null.
-
getDominantSpeaker
@Nullable() RemoteParticipant getDominantSpeaker()
Returns the dominant speaker of the Room.
To enable this feature, add an invocation of with
{@code true}when building your . This method returns{@code null}when one of the following conditions aretrue:- The Room topology is P2P.
- The dominant speaker feature was not enabled via .
- There is currently no dominant speaker.
-
isRecording
synchronized boolean isRecording()
Returns whether any media in the Room is being recorded.
-
getRemoteParticipants
@NonNull() synchronized List<RemoteParticipant> getRemoteParticipants()
Returns all currently connected participants.
-
getStats
synchronized void getStats(@NonNull() StatsListener statsListener)
Retrieve stats for all media tracks and notify StatsListener via calling thread. Incase where room is in DISCONNECTED state, reports won't be delivered.
- Parameters:
statsListener- listener that receives stats reports for all media tracks.
-
disconnect
synchronized void disconnect()
Disconnects from the room.
-
isAudioProcessorSupported
boolean isAudioProcessorSupported(String audioProcessorName)
DO NOT USE, For internal use only, verifies if audio processor is supported.
-
-
-
-