import {
LivestreamPlayer,
StreamVideo,
StreamVideoClient,
} from "@stream-io/video-react-sdk";
export const MyLivestreamScreen = () => {
let client: StreamVideoClient; // init the client
return (
<StreamVideo client={client}>
<LivestreamPlayer callType="livestream" callId="my-call-id" />
</StreamVideo>
);
};
LivestreamPlayer
The LivestreamPlayer
is a UI component that plays a WebRTC livestream given the call ID and the call type.
Under the hood, it uses the LivestreamLayout
component.
General usage
Let’s see how to render the LivestreamPlayer
UI:
Props
callType
The call type. Typically, livestream
.
callId
The call ID.
layoutProps
A list of props that can be passed to the LivestreamLayout
component. You can read more about it here.
Type | Default Value |
---|---|
LivestreamLayoutProps | undefined | undefined |
On this page: