HostLivestream

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

  • Full livestream UI - Host and stream video content
  • Duration display - Real-time duration with live indicator
  • Viewer count - Live status and active viewer count
  • Controls - Start/end stream, pause/resume audio/video

Host Livestream Start

Host Livestream End

General usage

Show HostLivestream UI:

import {
  Call,
  StreamCall,
  HostLivestream,
} 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}>
      <HostLivestream />
    </StreamCall>
  );
};

Props

hls

Enable HTTP livestreaming

TypeDefault
booleanfalse

HostLivestreamTopView

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

TypeDefault Value
ComponentType| undefinedHostLiveStreamTopView

LivestreamLayout

Component to customize the live stream video layout.

TypeDefault Value
ComponentType| undefinedLiveStreamLayout

HostLivestreamControls

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

TypeDefault Value
ComponentType| undefinedHostLiveStreamControls

To add screen-sharing to livestream, include the exported LivestreamScreenShareButton in your custom HostLiveStreamControls component.

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

HostStartStreamButton

Component to customize the host's start/end live stream button.

TypeDefault Value
ComponentType| undefinedHostStartStreamButton

LivestreamMediaControls

Component to customize the host's media control(audio/video) buttons.

TypeDefault Value
ComponentType| undefinedLiveStreamMediaControls

onStartStreamHandler

Handler to be called when the Start Stream button is pressed.

Type
() => void | undefined

onEndStreamHandler

Handler to be called when the End Stream button is pressed.

Type
() => void | undefined

ScreenShareOverlay

Component to customize the screen share overlay, when the screen is shared by a user.

TypeDefault Value
ComponentType| undefinedScreenShareOverlay