useParticipantHook Properties - React Native
displayName
- type :
string displayNamerepresents the name of the Participant
participant
- type :
Participant | null - The
Participantobject. It isnulluntil the participant is in the room.
webcamStream
- type :
RTCStreamornull - The participant's camera stream. Render it with
new MediaStream([webcamStream.track]).toURL()as thestreamURLofRTCView.
import { MediaStream, RTCView, useParticipant } from "@videosdk.live/react-native-sdk";
function ParticipantView({ participantId }) {
const { webcamStream, webcamOn } = useParticipant(participantId);
return webcamOn && webcamStream ? (
<RTCView
streamURL={new MediaStream([webcamStream.track]).toURL()}
objectFit="cover"
style={{ flex: 1 }}
/>
) : null;
}
micStream
- type :
RTCStreamornull - The participant's microphone stream.
screenShareStream
- type :
RTCStreamornull - The participant's screen-share stream. Render it the same way as
webcamStream.
screenShareAudioStream
- type :
RTCStreamornull screenShareAudioStreamrepresents the stream of the audio shared with the participant's screen share, when that audio is sent as a separate stream.- On Android, the audio of a screen share started with this SDK is mixed into the mic stream, so others receive it in
micStream.
webcamOn
- type :
boolean webcamOnis true if the participant's video is on else false
micOn
- type :
boolean micOnis true if the participant's mic is on else false
screenShareOn
- type :
boolean screenShareOnis true if the participant is presenting screen else false
isLocal
- type :
boolean isLocalis true if the participant is local participant else false.
isActiveSpeaker
- type :
boolean isActiveSpeakeris true if the participant is active speaker else false.
videoQuality
- type :
"low"|"med"|"high"|undefined - The quality layer this device receives for the participant's video. Ask for another layer with
setQuality().
pinState
- type :
{ cam: boolean, share: boolean } pinStateshows whether the participant's camera (cam) and screen share (share) are pinned. Usepin()andunpin()to change it.- The
Participantobject also haspinState.
mode
- type :
"SEND_AND_RECV"|"SIGNALLING_ONLY"|"RECV_ONLY" moderepresents the participant's mode in the room. It changes when the participant callschangeMode().
metaData
-
type:
Object -
It represents the additional information that you have passed in the
metaDataof theRoomProviderconfig.
isAgent()
- type :
() => boolean - Returns
truewhen the participant is an AI agent. UseuseAgentParticipant()for agents.
Participant object
participant here, the values in useRoom().participants, useRoom().localParticipant and the Participant that callbacks such as onParticipantJoined receive are all Participant objects. Their fields read the current value each time. In a component, prefer the properties of useParticipant(), which re-render when they change.
| Member | Description |
|---|---|
id | The participant's id. |
displayName, metaData, isLocal, mode | The same as the properties above. |
isAgent | boolean: true for an AI agent. On this object it is a value, not a function. |
micOn, webcamOn, screenShareOn | The same as the properties above. |
streams | Map<string, RTCStream>: the participant's streams, by stream id. |
pinState | { cam, share }: what is pinned for this participant. It updates with onPinStateChanged. |
setScreenShareQuality(quality) | Sets the quality of this participant's screen share that you receive: "low", "med" or "high". Returns Promise<void>. |
It also has the methods of useParticipant().
Got a Question? Ask us on discord

