ParticipantView

Renders participant video with info (name, mute state, reaction, network quality). Supports screen sharing view.

Features:

  • Participant info - Name, audio/video state, reactions, network quality
  • Video/avatar toggle - Based on participant's video state
  • Action buttons - E.g., unpin participant

It is used as a building block to render individual item of participants in CallContent and CallParticipantsList.

Participant Camera On

Participant Camera Off

General Usage

Standalone usage:

import {
  ParticipantView,
  useCallStateHooks,
} from "@stream-io/video-react-native-sdk";

const App = () => {
  const { useParticipants } = useCallStateHooks();
  const participants = useParticipants();

  // Here to show the demo, we pass only first participant. You can pass any of the participant.
  return <ParticipantView participant={participants[0]} />;
};

Props

participant

The participant to be rendered in the ParticipantView.

trackType

The type of the participant stream to be rendered. Eg: screen sharing or participant's video stream.

TypeDefault Value
videoTrack | screenShareTrackvideoTrack

style

This prop is used to override the root container style of the component.

isVisible

When set to false, the video stream will not be shown even if it is available.

TypeDefault Value
booleantrue

videoZOrder

The zOrder for the video that will be displayed.

TypeDefault Value
number0

objectFit

Represents how the video view fits within the parent view.

TypeDefault Value
'contain' | 'cover' |undefinedcover

mirror

Forces participant's video to be mirrored or unmirrored. By default, video track from the local participant is mirrored, and all other videos are not mirrored.

Type
boolean

supportedReactions

Supported reactions for the call. Default reactions:

  • 🤣 Rolling on the floor laughing
  • 👍 like
  • 👎 Dislike
  • 🎉 fireworks
  • 🙌 Raised hands
  • ✋ Raised hand
Type
StreamReactionType & { icon: string }[]

ParticipantLabel

Component to customize the Label of the participant.

TypeDefault Value
ComponentType| undefinedParticipantLabel

ParticipantReaction

Component to customize the participant reaction display.

TypeDefault Value
ComponentType| undefinedParticipantReaction

ParticipantVideoFallback

Component to customize the video fallback of the participant, when the video is disabled.

TypeDefault Value
ComponentType| undefinedParticipantVideoFallback

ParticipantNetworkQualityIndicator

Component to customize the network quality indicator of the participant.

TypeDefault Value
ComponentType| undefinedParticipantNetworkQualityIndicator

VideoRenderer

Component to customize the participant video. Also displays the ParticipantVideoFallback.

The VideoRenderer accepts a mirror?: boolean prop to force mirroring on or off. When provided, it takes precedence over the default mirroring logic.

TypeDefault Value
ComponentType| undefinedVideoRenderer

Props

PropTypeDefault ValueDescription
participantStreamVideoParticipantThe participant whose video or screenshare should be rendered.
trackTypevideoTrack | screenShareTrackvideoTrackThe track to render.
isVisiblebooleantrueWhen false, the video stream is not shown even if it is available.
objectFit'contain' | 'cover' | undefinedundefinedHow the video fits within its container. When omitted, a default is computed from the track dimensions.
videoZOrdernumber0The z-order to apply to the underlying RTC view.
mirrorboolean | undefinedundefinedForces mirroring on or off. When omitted, the default mirroring logic is used.
ParticipantVideoFallbackComponentType | null | undefinedParticipantVideoFallbackComponent to render when video is unavailable. Use null to disable the fallback.

Customization

UI cookbook guides: