FloatingParticipantView

Draggable floating view displaying local participant's video stream.

Floating Participant View Camera Enabled

Floating Participant View Camera Disabled

When the video is muted, the video muted icon is shown in a disabled background.

General Usage

Standalone usage:

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

const App = () => {
  const { useLocalParticipant } = useCallStateHooks();
  const localParticipant = useLocalParticipant();
  return <FloatingParticipantView participant={localParticipant} />;
};

Props

alignment

Determines where the floating participant video will be placed initially.

TypeDefault value
top-left |top-right|bottom-left|bottom-righttop-right

participant

The participant to be rendered in the FloatingParticipantView.

onPressHandler

Handler used to handle actions on click of the participant view in FloatingParticipantView.

Type
() => void | undefined

style

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

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

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

ParticipantNetworkQualityIndicator

Component to customize the network quality indicator of the participant.

TypeDefault Value
ComponentType| undefinedParticipantNetworkQualityIndicator

ParticipantVideoFallback

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

TypeDefault Value
ComponentType| undefinedParticipantVideoFallback

ParticipantView

Prop to customize the ParticipantView component entirely.

TypeDefault Value
ComponentType| undefinedParticipantView

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.