Call layout

The SDK comes with two built-in call layouts.

The PaginatedGridLayout displays participants in a grid that is paginated.

Preview of the PaginatedGridLayout component.

The SpeakerLayout displays participants in a configuration where the dominant speaker/shared screen is in focus and other participants are displayed in a smaller bar.

Preview of the SpeakerLayout component.

The LivestreamLayout is suitable for livestreaming and displays the dominant speaker/shared screen in a large video.

Preview of the LivestreamLayout component.

General usage

Both layouts gather all necessary state information via hooks, so you don’t need to provide state-related props:

import "@stream-io/video-react-sdk/dist/css/styles.css";
import {
  CallControls,
  StreamCall,
  StreamTheme,
  StreamVideo,
  SpeakerLayout,
} from "@stream-io/video-react-sdk";

const MyApp = () => {
  return (
    <StreamVideo client={client}>
      <StreamTheme>
        <StreamCall call={call}>
          <SpeakerLayout />
          <CallControls />
        </StreamCall>
      </StreamTheme>
    </StreamVideo>
  );
};
import "@stream-io/video-react-sdk/dist/css/styles.css";
import {
  CallControls,
  StreamCall,
  StreamTheme,
  StreamVideo,
  PaginatedGridLayout,
} from "@stream-io/video-react-sdk";

const MyApp = () => {
  return (
    <StreamVideo client={client}>
      <StreamTheme>
        <StreamCall call={call}>
          <PaginatedGridLayout />
          <CallControls />
        </StreamCall>
      </StreamTheme>
    </StreamVideo>
  );
};

Built-in Layouts

PaginatedGridLayout

Props

NameDescriptionType
groupSizeThe number of participants to display per pagenumber | undefined
excludeLocalParticipantWhether to exclude the local participant from the gridboolean | undefined
mirrorLocalParticipantVideoWhether to mirror the user’s own video (default true)boolean | undefined
pageArrowsVisibleTurns on/off the pagination arrowsboolean | undefined
ParticipantViewUISee ParticipantView documentationSee ParticipantView documentation
VideoPlaceholderSee ParticipantView documentationSee ParticipantView documentation
PictureInPicturePlaceholderSee ParticipantView documentationSee ParticipantView documentation

SpeakerLayout

Props

NameDescriptionType
participantsBarPositionThe position of the participants who are not in focus, the default is bottom. Providing null will hide the bartop | bottom | left | right | null
excludeLocalParticipantWhether to exclude the local participant from the layoutboolean | undefined
mirrorLocalParticipantVideoWhether to mirror the user’s own video (default true)boolean | undefined
pageArrowsVisibleTurns on/off the pagination arrowsboolean | undefined
ParticipantViewUISpotlightThe participant UI for the spotlight view, see ParticipantView documentationSee ParticipantView documentation
ParticipantViewUIBarThe participant UI for the participants in the bar, see ParticipantView documentationSee ParticipantView documentation
VideoPlaceholderSee ParticipantView documentationSee ParticipantView documentation
PictureInPicturePlaceholderSee ParticipantView documentationSee ParticipantView documentation

LivestreamLayout

Props

NameDescriptionType
mutedMutes all audioboolean
enableFullscreenWill render a button to enable fullscreen modeboolean
showParticipantCountWill show the number of participantsboolean
showDurationWill show the duration of the livestreamboolean
showLiveBadgeWill show a badge whether the livestream is live or notboolean
showSpeakerNameWill show the name of the speakerboolean
mirrorLocalParticipantVideoWhether to mirror the user’s own video (default true)boolean
floatingParticipantPropsProps to pass to the floating participant viewobject
floatingParticipantProps.positionPosition of the floating participant viewstring

Customization

If the built-in layouts aren’t what you’re looking for, it’s also possible to create your own layout, see our Custom Call Layout guide for more information.

© Getstream.io, Inc. All Rights Reserved.