ViewerLivestream

Viewer-side livestream UI component with minimal setup. Features:

  • Full viewer UI - View stream video content
  • Duration display - Real-time duration with live indicator
  • Viewer count - Live status and active viewer count
  • Interactive controls - Play/pause, audio, show/hide controls, leave

Viewer Livestream

Viewer Livestream Screen Share

General usage

Show ViewerLivestream UI:

import {
  Call,
  StreamCall,
  ViewerLivestream,
} from "@stream-io/video-react-native-sdk";

const VideoCallUI = () => {
  let call: Call;
  // your logic to create a new call or get an existing call

  return (
    <StreamCall call={call}>
      <ViewerLivestream />
    </StreamCall>
  );
};

Props

ViewerLivestreamTopView

Component to customize the top view at the viewer's live stream.

TypeDefault Value
ComponentType| undefinedViewerLiveStreamTopView

LivestreamLayout

Component to customize the live stream video layout.

TypeDefault Value
ComponentType| undefinedLiveStreamLayout

ViewerLivestreamControls

Component to customize the bottom view controls at the viewer's live stream.

TypeDefault Value
ComponentType| undefinedViewerLiveStreamControls

DurationBadge

Component to customize the duration badge on the viewer's livestream top view.

TypeDefault Value
ComponentType| undefinedDurationBadge

FollowerCount

Component to customize the follower count indicator on the viewer's livestream top view.

TypeDefault Value
ComponentType| undefinedFollowerCount

LiveIndicator

Component to customize the live indicator on the viewer's livestream top view.

TypeDefault Value
ComponentType| undefinedLiveIndicator

ViewerLeaveStreamButton

Component to customize the leave stream button for the viewer.

TypeDefault Value
ComponentType| undefinedViewerLeaveStreamButton

FloatingParticipantView

Prop to customize the FloatingParticipantView component.

TypeDefault Value
ComponentType| undefinedFloatingParticipantView

Props

PropTypeDefault ValueDescription
participantStreamVideoParticipant | undefinedThe participant to render in the floating view.
alignmenttop-left | top-right | bottom-left | bottom-righttop-rightDetermines where the floating participant video will be placed initially.
onPressHandler() => void | undefinedHandler invoked when the floating participant view is pressed.
participantViewStyleViewStyleStyle override for the participant view container.
draggableContainerStyleViewStyleStyle override for the draggable container.
videoZOrdernumber1The z-order for the video view.
objectFit'contain' | 'cover' | undefinedundefinedHow the video fits within its container.
mirrorboolean | undefinedundefinedForces mirroring on or off. When omitted, the default mirroring logic is used.
supportedReactionsStreamReactionType & { icon: string }[]Reactions to enable for the floating participant view.
ParticipantViewComponentType | undefinedParticipantViewCustom participant view component.
ParticipantLabelComponentType | undefinedParticipantLabelCustom label component.
ParticipantReactionComponentType | undefinedParticipantReactionCustom reaction component.
ParticipantVideoFallbackComponentType | null | undefinedParticipantVideoFallbackFallback when video is unavailable. Use null to disable.
ParticipantNetworkQualityIndicatorComponentType | undefinedParticipantNetworkQualityIndicatorCustom network quality indicator.
VideoRendererComponentType | undefinedVideoRendererCustom video renderer component.

onLeaveStreamHandler

Handler to be called when the leave stream button is pressed by the viewer.

Type
() => void | undefined

joinBehavior

Determines when the viewer joins the call. Can have one of these two values: "asap" (by default) or "live".