-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(react-native): UI component - ParticipantView, LocalParticipantV…
…iew (#935) LocalParticipantView has no props right now as per the PR #933, so the props section is removed.
- Loading branch information
Showing
23 changed files
with
216 additions
and
227 deletions.
There are no files selected for viewing
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
32 changes: 0 additions & 32 deletions
32
...aurus/docs/reactnative/04-ui-components/participants/participant-info-badge.mdx
This file was deleted.
Oops, something went wrong.
115 changes: 115 additions & 0 deletions
115
.../docusaurus/docs/reactnative/04-ui-components/participants/participant-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,115 @@ | ||
--- | ||
id: participant-view | ||
title: ParticipantView | ||
--- | ||
|
||
import ImageShowcase from '@site/src/components/ImageShowcase'; | ||
import ParticipantCameraOn from '../../assets/04-ui-components/participant-camera-on.png'; | ||
import ParticipantCameraOff from '../../assets/04-ui-components/participant-camera-off.png'; | ||
|
||
import Participant from '../../common-content/ui-components/participant/participant-view/participant.mdx'; | ||
import VideoMode from '../../common-content/ui-components/participant/participant-view/video-mode.mdx'; | ||
import IsVisible from '../../common-content/ui-components/participant/participant-view/is-visible.mdx'; | ||
import ParticipantViewStyle from '../../common-content/ui-components/participant/participant-view/style.mdx'; | ||
|
||
import ParticipantLabel from '../../common-content/ui-components/call/call-content/participant-label.mdx'; | ||
import ParticipantReaction from '../../common-content/ui-components/call/call-content/participant-reaction.mdx'; | ||
import ParticipantNetworkQualityIndicator from '../../common-content/ui-components/call/call-content/participant-network-quality-indicator.mdx'; | ||
import ParticipantVideoFallback from '../../common-content/ui-components/call/call-content/participant-video-fallback.mdx'; | ||
import VideoRenderer from '../../common-content/ui-components/call/call-content/video-renderer.mdx'; | ||
|
||
The `ParticipantView` component renders a participant's video and displays related information of the participant. It can also be used to display the screen sharing view. | ||
|
||
It displays the participant info such as | ||
|
||
- Name | ||
- Audio/video mute/unmute state | ||
- Reaction | ||
- Network quality indicator | ||
|
||
It can toggle between video and avatar based on the participant's video state. It also provides action buttons (for example, to unpin the participant). | ||
|
||
:::note | ||
It is used as a building block to render individual item of participants in [CallContent](../call/call-content.mdx) and [CallParticipantsList](../call/call-participants-list.mdx). | ||
::: | ||
|
||
<ImageShowcase | ||
items={[ | ||
{ | ||
image: ParticipantCameraOn, | ||
caption: 'Participant Camera On', | ||
alt: 'Participant Camera On', | ||
}, | ||
{ | ||
image: ParticipantCameraOff, | ||
caption: 'Participant Camera Off', | ||
alt: 'Participant Camera Off', | ||
}, | ||
]} | ||
/> | ||
|
||
## General Usage | ||
|
||
In order to use the `ParticipantView` as a standalone component, you should use the following code: | ||
|
||
```tsx | ||
import { | ||
ParticipantView, | ||
useParticipants, | ||
} from '@stream-io/video-react-native-sdk'; | ||
|
||
const App = () => { | ||
const participants = useParticipants(); | ||
|
||
// Here to show the demo, we pass only first participant. You can pass any of the participant. | ||
return <ParticipantView participant={participants[0]} />; | ||
}; | ||
``` | ||
|
||
## Props | ||
|
||
### `participant` | ||
|
||
<Participant /> | ||
|
||
### `videoMode` | ||
|
||
<VideoMode /> | ||
|
||
### `style` | ||
|
||
<ParticipantViewStyle /> | ||
|
||
### `isVisible` | ||
|
||
<IsVisible /> | ||
|
||
### `ParticipantLabel` | ||
|
||
<ParticipantLabel /> | ||
|
||
### `ParticipantReaction` | ||
|
||
<ParticipantReaction /> | ||
|
||
### `ParticipantVideoFallback` | ||
|
||
<ParticipantVideoFallback /> | ||
|
||
### `ParticipantNetworkQualityIndicator` | ||
|
||
<ParticipantNetworkQualityIndicator /> | ||
|
||
### `VideoRenderer` | ||
|
||
<VideoRenderer /> | ||
|
||
## Customization | ||
|
||
Our [UI cookbook](../../../ui-cookbook/overview) tells all the important information about the component customizations. | ||
|
||
- [Video fallback](../../../ui-cookbook/participant-video-fallback) | ||
- [Connection Quality Indicator](../../../ui-cookbook/connection-quality-indicator) | ||
- [Custom Label](../../../ui-cookbook/participant-label) | ||
- [Video Renderer](../../../ui-cookbook/video-renderer) | ||
- [Reaction](../../../ui-cookbook/participant-reaction) |
106 changes: 0 additions & 106 deletions
106
...e-sdk/docusaurus/docs/reactnative/04-ui-components/participants/participant.mdx
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
...aurus/docs/reactnative/04-ui-components/participants/participants-info-list.mdx
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
...dk/docusaurus/docs/reactnative/05-ui-cookbook/07-participant-video-fallback.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,8 @@ | ||
--- | ||
title: Participant Video Fallback | ||
description: How to make your own custom participant video fallback | ||
--- | ||
|
||
:::note | ||
This will be added soon | ||
::: |
8 changes: 8 additions & 0 deletions
8
...act-native-sdk/docusaurus/docs/reactnative/05-ui-cookbook/08-video-renderer.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,8 @@ | ||
--- | ||
title: Participant Video Renderer | ||
description: How to make your own custom participant video renderer | ||
--- | ||
|
||
:::note | ||
This will be added soon | ||
::: |
8 changes: 8 additions & 0 deletions
8
...tive-sdk/docusaurus/docs/reactnative/05-ui-cookbook/09-participant-reaction.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,8 @@ | ||
--- | ||
title: Participant Reaction | ||
description: How to make your own custom participant reaction component | ||
--- | ||
|
||
:::note | ||
This will be added soon | ||
::: |
5 changes: 5 additions & 0 deletions
5
...eactnative/common-content/ui-components/call/call-content/participant-label.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 Label of the participant. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`ParticipantLabel`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Participant/ParticipantView/ParticipantLabel.tsx) | |
5 changes: 5 additions & 0 deletions
5
...ntent/ui-components/call/call-content/participant-network-quality-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 network quality indicator of the participant. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`ParticipantNetworkQualityIndicator`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.tsx) | |
5 changes: 5 additions & 0 deletions
5
...tnative/common-content/ui-components/call/call-content/participant-reaction.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 component that displays the reaction of the participant. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`ParticipantReaction`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Participant/ParticipantView/ParticipantReaction.tsx) | |
Oops, something went wrong.