Skip to main content

Type Alias: UsePeersResult<PeerMetadata, ServerMetadata>

UsePeersResult<PeerMetadata, ServerMetadata>: object

Type Parameters

Type ParameterDescription
PeerMetadataType of metadata set by peer while connecting to a room.
ServerMetadataType of metadata set by the server while creating a peer.

Type declaration

localPeer

localPeer: PeerWithTracks<PeerMetadata, ServerMetadata> | null

The local peer with distinguished tracks (camera, microphone, screen share). Will be null if the local peer is not found.

peers

peers: PeerWithTracks<PeerMetadata, ServerMetadata>[]

Deprecated

Use remotePeers instead Legacy array containing remote peers. This property will be removed in future versions.

remotePeers

remotePeers: PeerWithTracks<PeerMetadata, ServerMetadata>[]

Array of remote peers with distinguished tracks (camera, microphone, screen share).

Defined in

packages/react-client/src/hooks/usePeers.ts:67