The unique identifier for the peer.
Retrieves the audio track associated with the peer.
This getter method attempts to obtain the audio track of the peer. It first tries to get this information from the HMS peers cache. If the audio track information is not available in the cache, it falls back to fetching the audio track directly from the native layer using the peer's ID. This allows for real-time access to the peer's audio track, which can be used for various audio-related functionalities within the application.
The audio track of the peer if available, otherwise undefined
.
Retrieves the auxiliary tracks associated with the peer.
This getter method attempts to obtain the auxiliary tracks of the peer, which can include tracks like screen shares or additional media streams. It first tries to get this information from the HMS peers cache. If the auxiliary track information is not available in the cache, it falls back to fetching the auxiliary tracks directly from the native layer using the peer's ID. This allows for real-time access to the peer's auxiliary tracks, which can be used for various functionalities within the application, such as displaying a screen share or additional video feeds.
The auxiliary tracks of the peer if available, otherwise undefined
.
Retrieves the custom user ID of the peer.
This getter method attempts to obtain the custom user ID of the peer, which is an optional identifier that can be set by the application.
It first tries to get this information from the HMS peers cache. If the information is not available in the cache,
it falls back to fetching the custom user ID directly from the native layer using the peer's ID.
Once a value is retrieved, it updates the local _customerUserID
property to ensure the value is current and consistent.
The custom user ID of the peer if available, otherwise undefined
.
Checks if the peer has raised their hand.
This getter method determines whether the peer has their hand raised in the session. It first attempts to retrieve the 'isHandRaised' property value
from the HMS peers cache. If the value is not found in the cache, it falls back to fetching the property directly from the native layer using the peer's ID.
Once a value is retrieved, it updates the local _isHandRaised
property to ensure the value is current and consistent.
True if the peer has their hand raised, false otherwise. Defaults to false if the information is not available.
Determines if the peer is the local user.
This getter method checks if the peer is the local user by first attempting to retrieve the 'isLocal' property value from the HMS peers cache.
If the value is not found in the cache, it falls back to fetching the property directly from the native layer using the peer's ID.
Once a value is retrieved, it updates the local _isLocal
property to ensure the value is current.
True if the peer is the local user, false otherwise. Returns undefined
if the information is not available.
Retrieves the metadata associated with the peer.
This getter method attempts to obtain the metadata of the peer, which can include any additional information set by the application.
It first tries to get this information from the HMS peers cache. If the information is not available in the cache,
it falls back to fetching the metadata directly from the native layer using the peer's ID.
Once a value is retrieved, it updates the local _metadata
property to ensure the value is current and consistent.
The metadata of the peer if available, otherwise undefined
.
Gets the name of the peer.
This getter method retrieves the name of the peer. If the name has already been set locally, it returns that value.
Otherwise, it attempts to retrieve the name from the HMS peers cache. If the cache does not contain the name,
it falls back to fetching the name directly from the native layer using the peer's ID.
Once a value is retrieved, it updates the local _name
property to ensure consistency.
The name of the peer if available, otherwise undefined
.
Retrieves the network quality of the peer.
This getter method attempts to obtain the network quality of the peer, which is an indicator of the current network conditions affecting the peer's connection.
It first tries to get this information from the HMS peers cache. If the information is not available in the cache,
it falls back to fetching the network quality directly from the native layer using the peer's ID.
The network quality is represented by the HMSNetworkQuality
type, which may include values such as 'good', 'poor', etc., depending on the implementation.
The network quality of the peer if available, otherwise undefined
.
Retrieves the role of the peer.
This getter method attempts to obtain the role assigned to the peer within the session. The role can define permissions and capabilities
within the session context. It first tries to get this information from the HMS peers cache. If the role information is not available in the cache,
it falls back to fetching the role directly from the native layer using the peer's ID. Once a value is retrieved, it updates the local _role
property to ensure the value is current and consistent.
The role of the peer if available, otherwise undefined
.
Retrieves the type of the peer.
This getter method attempts to obtain the type of the peer, which can indicate whether the peer is a regular participant,
a screen share, or another type defined within the HMSPeerType
enum. It first tries to get this information from the HMS peers cache.
If the type information is not available in the cache, it falls back to fetching the type directly from the native layer using the peer's ID.
This ensures that the application has real-time access to the peer's type, which can be crucial for handling different peer types differently,
such as displaying a screen share in a distinct manner. Once a value is retrieved, it updates the local _type
property to ensure the value is current.
The type of the peer, defaulting to the value stored in _type
if the information is not available.
Retrieves the video track associated with the peer.
This getter method attempts to obtain the video track of the peer. It first tries to get this information from the HMS peers cache. If the video track information is not available in the cache, it falls back to fetching the video track directly from the native layer using the peer's ID. This allows for real-time access to the peer's video track, which can be used for various video-related functionalities within the application.
The video track of the peer if available, otherwise undefined
.
Generated using TypeDoc
Represents a peer in the HMS ecosystem.
This class encapsulates the properties and state of a peer within a session, including their ID, name, role, and various status flags.
Export