-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
268 additions
and
6 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
.../react-native-sdk/docusaurus/docs/reactnative/04-ui-components/livestream/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Livestream", | ||
"position": 3 | ||
} |
97 changes: 97 additions & 0 deletions
97
...dk/docusaurus/docs/reactnative/04-ui-components/livestream/host-live-stream.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
id: host-live-stream | ||
title: HostLiveStream | ||
--- | ||
|
||
import HostLiveStreamTopView from '../../common-content/ui-components/livestream/host-live-stream/host-live-stream-top-view.mdx'; | ||
import LiveStreamLayout from '../../common-content/ui-components/livestream/live-stream-layout.mdx'; | ||
import HostLiveStreamControls from '../../common-content/ui-components/livestream/host-live-stream/host-live-stream-controls.mdx'; | ||
import DurationBadge from '../../common-content/ui-components/livestream/duration-badge.mdx'; | ||
import FollowerCount from '../../common-content/ui-components/livestream/follower-count.mdx'; | ||
import LiveIndicator from '../../common-content/ui-components/livestream/live-indicator.mdx'; | ||
import HostStartStreamButton from '../../common-content/ui-components/livestream/host-live-stream/host-start-stream-button.mdx'; | ||
import LiveStreamMediaControls from '../../common-content/ui-components/livestream/live-stream-media-controls.mdx'; | ||
import OnStartStreamHandler from '../../common-content/ui-components/livestream/host-live-stream/on-start-stream-handler.mdx'; | ||
import OnEndStreamHandler from '../../common-content/ui-components/livestream/host-live-stream/on-end-stream-handler.mdx'; | ||
|
||
The `HostLiveStream` is the UI component that allows you to show the live stream view in the app on the host's end with minimal efforts. So you don't need to take care much about each feature that you need to build a video live stream call screen with this component. | ||
|
||
Basically what you can do with the `HostLiveStream` is: | ||
|
||
- A complete live stream UI with ability to stream host's video. | ||
- Duration of the live stream with live indicator. | ||
- Whether the stream is live and number of participant's watching the stream. | ||
- Media controls to control publishing and unpublishing of stream. | ||
Check failure on line 24 in packages/react-native-sdk/docusaurus/docs/reactnative/04-ui-components/livestream/host-live-stream.mdx GitHub Actions / vale[vale] packages/react-native-sdk/docusaurus/docs/reactnative/04-ui-components/livestream/host-live-stream.mdx#L24
Raw output
|
||
|
||
## General usage | ||
|
||
Let's see how to show the `ViewerLiveStream` UI: | ||
|
||
```tsx {13} | ||
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 live streaming | ||
|
||
| Type | Default | | ||
| --------- | ------- | | ||
| `boolean` | false | | ||
|
||
### `HostLiveStreamTopView` | ||
|
||
<HostLiveStreamTopView /> | ||
|
||
### `LiveStreamLayout` | ||
|
||
<LiveStreamLayout /> | ||
|
||
### `ViewerLiveStreamControls` | ||
|
||
<HostLiveStreamControls /> | ||
|
||
### `DurationBadge` | ||
|
||
<DurationBadge /> | ||
|
||
### `FollowerCount` | ||
|
||
<FollowerCount /> | ||
|
||
### `LiveIndicator` | ||
|
||
<LiveIndicator /> | ||
|
||
### `HostStartStreamButton` | ||
|
||
<HostStartStreamButton /> | ||
|
||
### `LiveStreamMediaControls` | ||
|
||
<LiveStreamMediaControls /> | ||
|
||
### `OnStartStreamHandler` | ||
|
||
<OnStartStreamHandler /> | ||
|
||
### `OnEndStreamHandler` | ||
|
||
<OnEndStreamHandler /> |
78 changes: 78 additions & 0 deletions
78
.../docusaurus/docs/reactnative/04-ui-components/livestream/viewer-live-stream.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
id: viewer-live-stream | ||
title: ViewerLiveStream | ||
--- | ||
|
||
import ViewerLiveStreamTopView from '../../common-content/ui-components/livestream/viewer-live-stream/viewer-live-stream-top-view.mdx'; | ||
import LiveStreamLayout from '../../common-content/ui-components/livestream/live-stream-layout.mdx'; | ||
import ViewerLiveStreamControls from '../../common-content/ui-components/livestream/viewer-live-stream/viewer-live-stream-controls.mdx'; | ||
import DurationBadge from '../../common-content/ui-components/livestream/duration-badge.mdx'; | ||
import FollowerCount from '../../common-content/ui-components/livestream/follower-count.mdx'; | ||
import LiveIndicator from '../../common-content/ui-components/livestream/live-indicator.mdx'; | ||
import ViewerLeaveStreamButton from '../../common-content/ui-components/livestream/viewer-live-stream/viewer-leave-stream-button.mdx'; | ||
import OnLeaveStreamHandler from '../../common-content/ui-components/livestream/viewer-live-stream/on-leave-stream-handler.mdx'; | ||
|
||
The `ViewerLiveStream` is the UI component that allows you to show the live stream view in the app with minimal efforts. So you don't need to take care much about each feature that you need to build a video live stream call screen with this component. | ||
|
||
Basically what you can do with the `ViewerLiveStream` is: | ||
|
||
- A complete live stream UI with host's video, screen sharing stream. | ||
- Duration of the stream. | ||
- Whether the stream is live and number of participant's watching the stream. | ||
|
||
## General usage | ||
|
||
Let's see how to show the `ViewerLiveStream` UI: | ||
|
||
```tsx {13} | ||
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` | ||
|
||
<ViewerLiveStreamTopView /> | ||
|
||
### `LiveStreamLayout` | ||
|
||
<LiveStreamLayout /> | ||
|
||
### `ViewerLiveStreamControls` | ||
|
||
<ViewerLiveStreamControls /> | ||
|
||
### `DurationBadge` | ||
|
||
<DurationBadge /> | ||
|
||
### `FollowerCount` | ||
|
||
<FollowerCount /> | ||
|
||
### `LiveIndicator` | ||
|
||
<LiveIndicator /> | ||
|
||
### `ViewerLeaveStreamButton` | ||
|
||
<ViewerLeaveStreamButton /> | ||
|
||
### `OnLeaveStreamHandler` | ||
|
||
<OnLeaveStreamHandler /> |
5 changes: 5 additions & 0 deletions
5
...rus/docs/reactnative/common-content/ui-components/livestream/duration-badge.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Component to customize the Duration badge component on the viewer's live stream's top view. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`DurationBadge`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Livestream/LiveStreamTopView/DurationBadge.tsx) | |
5 changes: 5 additions & 0 deletions
5
...rus/docs/reactnative/common-content/ui-components/livestream/follower-count.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Component to customize the Follower count indicator on the viewer's live stream's top view. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`FollowerCount`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Livestream/LiveStreamTopView/FollowerCount.tsx) | |
5 changes: 5 additions & 0 deletions
5
...content/ui-components/livestream/host-live-stream/host-live-stream-controls.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Component to customize the bottom view controls at the host's live stream. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| `ComponentType`\| `undefined` | [`HostLiveStreamControls`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Livestream/LiveStreamControls/HostLiveStreamControls.tsx) | |
5 changes: 5 additions & 0 deletions
5
...content/ui-components/livestream/host-live-stream/host-live-stream-top-view.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Component to customize the top view at the host's live stream. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`HostLiveStreamTopView`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Livestream/LiveStreamTopView/HostLiveStreamTopView.tsx) | |
5 changes: 5 additions & 0 deletions
5
...-content/ui-components/livestream/host-live-stream/host-start-stream-button.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Component to customize the host's start/end live stream button. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`HostStartStreamButton`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Livestream/LiveStreamControls/HostStartStreamButton.tsx) | |
5 changes: 5 additions & 0 deletions
5
...mon-content/ui-components/livestream/host-live-stream/on-end-stream-handler.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Handler to be called when the End Stream button is pressed. | ||
|
||
| Type | | ||
| --------------------------- | | ||
| `() => void` \| `undefined` | |
5 changes: 5 additions & 0 deletions
5
...n-content/ui-components/livestream/host-live-stream/on-start-stream-handler.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Handler to be called when the Start Stream button is pressed. | ||
|
||
| Type | | ||
| --------------------------- | | ||
| `() => void` \| `undefined` | |
5 changes: 5 additions & 0 deletions
5
...rus/docs/reactnative/common-content/ui-components/livestream/live-indicator.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Component to customize the Live indicator on the viewer's live stream's top view. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`LiveIndicator`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Livestream/LiveStreamTopView/LiveIndicator.tsx) | |
5 changes: 5 additions & 0 deletions
5
...docs/reactnative/common-content/ui-components/livestream/live-stream-layout.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Component to customize the live stream video layout. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`LiveStreamLayout`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Livestream/LiveStreamLayout/LiveStreamLayout.tsx) | |
5 changes: 5 additions & 0 deletions
5
...ctnative/common-content/ui-components/livestream/live-stream-media-controls.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Component to customize the host's media control(audio/video) buttons. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`LiveStreamMediaControls`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Livestream/LiveStreamControls/LiveStreamMediaControls.tsx) | |
5 changes: 5 additions & 0 deletions
5
...content/ui-components/livestream/viewer-live-stream/on-leave-stream-handler.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Handler to be called when the viewer's leave stream button is called. | ||
|
||
| Type | | ||
| --------------------------- | | ||
| `() => void` \| `undefined` | |
5 changes: 5 additions & 0 deletions
5
...tent/ui-components/livestream/viewer-live-stream/viewer-leave-stream-button.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Component to customize the leave stream button on the viewer's end live stream. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`ViewerLeaveStreamButton`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Livestream/LiveStreamControls/ViewerLeaveStreamButton.tsx) | |
5 changes: 5 additions & 0 deletions
5
...ent/ui-components/livestream/viewer-live-stream/viewer-live-stream-controls.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Component to customize the bottom view controls at the viewer's live stream. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`ViewerLiveStreamControls`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Livestream/LiveStreamControls/ViewerLiveStreamControls.tsx) | |
5 changes: 5 additions & 0 deletions
5
...ent/ui-components/livestream/viewer-live-stream/viewer-live-stream-top-view.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Component to customize the top view at the viewer's live stream. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`ViewerLiveStreamTopView`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Livestream/LiveStreamTopView/ViewerLiveStreamTopView.tsx) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters