# LivestreamPlayer

Play WebRTC livestreams with call ID and type. Uses [`ViewerLivestream`](https://getstream.io/video/docs/react-native/v2/ui-components/livestream/viewer-livestream/) internally.

![Preview of the LivestreamPlayer component.](https://getstream.io/docs-assets/images/9ab866af68d7.jpg)

## General usage

Show `LivestreamPlayer` UI:

```tsx
import {
  StreamVideo,
  LivestreamPlayer,
} from '@stream-io/video-react-native-sdk';

const LivestreamScreen() {
  return (
    <StreamVideo client={client}>
      <LivestreamPlayer callType="livestream" callId={callId} />
    </StreamVideo>
  );
}
```

## Props

### `callType`

The call type. Usually `livestream`.

### `callId`

The call ID.

### `ViewerLivestream`

Component to override the ViewerLivestream component that is used under the hood.

| Type                          | Default Value                                                                                                                                                          |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ComponentType`\| `undefined` | [`ViewerLivestream`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Livestream/ViewerLivestream/ViewerLivestream.tsx) |

### `joinBehavior`

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

---

For the most recent version of this documentation, visit [https://getstream.io/video/docs/react-native/v2/ui-components/livestream/livestream-player/](https://getstream.io/video/docs/react-native/v2/ui-components/livestream/livestream-player/).