Skip to content

Commit 1a98446

Browse files
committed
feat: update react-native-core docs
1 parent fb05d5f commit 1a98446

18 files changed

+431
-238
lines changed

docs/react-web-core/pre-call/4-meeting-meta.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ await meeting.self.setName('New Name');
1313
Before joining the meeting, you can get a list of people current in the meeting by using the method
1414

1515
```ts
16-
meeting.participants.getJoinedPeersInRoom()
16+
meeting.participants.getParticipantsInMeetingPreJoin()
1717
```

docs/react-web-core/reference/DyteClient.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,21 @@ named `meeting`.
2626
* [.connectedMeetings](#module_DyteClient+connectedMeetings)
2727
* [.join()](#module_DyteClient+join)
2828
* [.leave()](#module_DyteClient+leave)
29-
* _static_
30-
* [.init(options)](#module_DyteClient.init)
29+
30+
<a name="module_DyteClient.init"></a>
31+
32+
### initMeeting(options)
33+
The `initMeeting` method can be used to instantiate the DyteClient class.
34+
This returns an instance of DyteClient, which can be used to perform
35+
actions on the meeting.
36+
37+
38+
| Param | Description |
39+
| --- | --- |
40+
| options | The options object. |
41+
| options.authToken | The authorization token received using the API. |
42+
| options.apiBase | The base URL of the API. |
43+
| options.defaults | The default audio and video settings. |
3144

3245
<a name="module_DyteClient+participants"></a>
3346

@@ -99,21 +112,6 @@ is emitted on `self` when the room is joined successfully.
99112
### meeting.leave()
100113
The `leave()` method can be used to leave a meeting.
101114

102-
<a name="module_DyteClient.init"></a>
103-
104-
### DyteClient.init(options)
105-
The `init` method can be used to instantiate the DyteClient class.
106-
This returns an instance of DyteClient, which can be used to perform
107-
actions on the meeting.
108-
109-
110-
| Param | Description |
111-
| --- | --- |
112-
| options | The options object. |
113-
| options.authToken | The authorization token received using the API. |
114-
| options.apiBase | The base URL of the API. |
115-
| options.defaults | The default audio and video settings. |
116-
117115
<a name="module_DyteClient+joinRoom"></a>
118116

119117
### ~~meeting.joinRoom()~~
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"position": 3,
2+
"position": 4,
33
"label": "Local User",
4-
"collapsible": true
4+
"collapsible": true,
5+
"className":"module-seperation"
56
}

docs/rn-core/local-user/events.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tags:
99
- self events
1010
---
1111

12-
# Local User - Events
12+
# Events
1313

1414
You can subscribe to various events on the local user by calling
1515
`meeting.self.on(EVENT_NAME)`.

docs/rn-core/local-user/extras.mdx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,6 @@ meeting.self.pin();
5050
meeting.self.unpin();
5151
```
5252

53-
## Webinar
54-
55-
The Dyte Webinar revolves around the concept of a stage. The stage is directly
56-
accessible for hosts, while participants can request to join the stage. Here's
57-
how you can interact with stage APIs.
58-
59-
Read more about Dyte Webinars
60-
[here](https://dyte.io/blog/introducing-dyte-webinar/).
61-
62-
```ts
63-
// Request to join stage
64-
await meeting.self.requestToJoinStage();
65-
66-
// Leave stage
67-
await meeting.self.leaveStage();
68-
```
6953

7054
<head>
7155
<title>React Native Core Other Methods</title>

docs/rn-core/local-user/introduction.mdx

Lines changed: 65 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,76 +8,69 @@ tags:
88
- self
99
---
1010

11-
# Introduction - Local User
1211

13-
The local user has the methods and properties on the local user media controls.
14-
Accessible via `self` key within the `meeting` object, the local user also
15-
contains the access control (permissions) and theming-related properties that
16-
will help to render the meeting state.
12+
# Introduction
13+
14+
Accessible via `self` key within the `meeting` object, the local user object consists of all the information related to the current participant and methods to configure media and other states.
1715

1816
## Properties
1917

2018
Here is a list of properties that local user provides:
2119

22-
- `id`: The ID of the participant pertaining to local user.
23-
- `userId`: The User ID of the participant pertaining to local user.
20+
**Metadata**
21+
22+
- `userId`: User ID of the local user.
23+
- `customParticipantId`: Identifier provided by the developer while adding the
24+
participant.
2425
- `organizationId`: The ID of the organization the meeting is created from.
2526
- `name`: Contains Name of the local user.
26-
- `isPinned`: A boolean value indicating if the local user is pinned or not.
27-
- `supportsRemoteControl`: A boolean value indicating if the meeting can
28-
supports remote control.
29-
- `device`: Information like browser and OS details.
3027
- `picture`: Display picture URL for the local user.
31-
- `waitlistStatus`: Indicates if the local user has been waitlisted or not. It
32-
can take the following values: `accepted` | `waiting` | `rejected` | `none`;
33-
- `clientSpecificId`: Identifier provided by the developer while adding the
34-
participant.
35-
- `roomJoined`: A boolean value indicating if the local user has joined the
36-
meeting.
37-
- `roomState`: Indicates the state of the user in the meeting. It
38-
can take the following values: `init` | `joined` | `waitlisted` | `rejected` | `kicked` | `left` | `ended`;
39-
- `permissions`: The permissions related to various capabilities within a
40-
meeting context for the local user
28+
- `permissions`: The permissions related to various capabilities for the local user defined by the preset
29+
30+
**Media**:
31+
4132
- `mediaPermissions`: The current audio and video permissions given by the local
4233
user.
4334
- `audioTrack`: The audio track for the local user.
44-
- `rawAudioTrack`: The audio track for the local user without any middleware applied on it.
4535
- `videoTrack`: The video track for the local user.
46-
- `rawVideoTrack`: The video track for the local user without any middleware applied on it.
4736
- `screenShareTracks`: The screen share video and audio tracks for the local
4837
user.
4938
- `audioEnabled`: A boolean value indicating if the audio currently enabled.
5039
- `videoEnabled`: A boolean value indicating if the video currently enabled.
5140
- `screenShareEnabled`: A boolean value indicating if the screen share is
5241
currently enabled.
53-
- `config`: The suggested theme for building the user interface.
54-
- ~~`suggestedTheme`: The suggested theme for building the user interface.~~
55-
- ~~`preview`: The local audio and video stream for the preview purpose (it will be populated after calling `enablePreview`).~~
56-
57-
## Change default audio / video settings
58-
59-
By default as soon as you join the meeting the SDK will produce your video and
60-
audio streams. To change this behaviour use the `default` parameter
61-
62-
```ts {5}
63-
const meeting = await DyteClient.init({
64-
authToken,
65-
defaults: {
66-
audio: false, // Disable user's audio by default
67-
video: true, // Enable user's video by default
68-
},
69-
});
42+
43+
**States**:
44+
45+
- `isPinned`: A <span className="tag-orange">boolean</span> value indicating if the local user is pinned or not.
46+
- `roomJoined`: A <span className="tag-orange">boolean</span> value indicating if the local user is in the meeting
47+
- `roomState`: Indicates the state of the user in the meeting. It
48+
can take the following values:
49+
50+
```ts
51+
"init" | "joined" | "waitlisted" | "rejected" | "kicked" | "left" | "ended"
52+
```
53+
54+
```mermaid
55+
stateDiagram-v2
56+
direction LR
57+
classDef END fill:#ef4444,color:#fff,stroke:#ef4444;
58+
59+
[*] --> init
60+
init --> joined
61+
init --> waitlisted
62+
waitlisted --> joined
63+
waitlisted --> rejected
64+
joined --> kicked
65+
joined --> left
66+
joined --> ended
67+
68+
class kicked,left,ended,rejected END
7069
```
7170

72-
## Setup tracks
71+
<br />
7372

74-
If audio and video tracks are disabled during the `DyteClient` initialization
75-
process. You can setup the audio and video tracks by simply calling setup tracks
76-
method like below:
7773

78-
```ts
79-
meeting.self.setupTracks({ audio: true, video: true });
80-
```
8174

8275
## Change the name of the local user
8376

@@ -89,7 +82,9 @@ meeting.
8982
await meeting.self.setName('New Name');
9083
```
9184

92-
## Mute/Unmute microphone
85+
## Media
86+
87+
### Mute/Unmute microphone
9388

9489
```ts
9590
// Mute Audio
@@ -102,7 +97,17 @@ await meeting.self.enableAudio();
10297
meeting.self.audioEnabled;
10398
```
10499

105-
## Enable/Disable camera
100+
```mermaid
101+
flowchart LR
102+
classDef basic fill:white;
103+
104+
eam("enableAudio()") --> success("Emits <code>audioUpdate</code> event on <code>self</code>")
105+
eam -. possibly .-> indirect("Update <code>mediaPermissions.audio</code> with <code>mediaPermissionUpdate</code> event")
106+
107+
class eam basic;
108+
```
109+
110+
### Enable/Disable camera
106111

107112
```ts
108113
// Disable Video
@@ -115,7 +120,17 @@ await meeting.self.enableVideo();
115120
meeting.self.videoEnabled;
116121
```
117122

118-
## Enable / Disable Screen share
123+
```mermaid
124+
flowchart LR
125+
classDef basic fill:white;
126+
127+
eam("enableVideo()") --> success("Emits <code>videoUpdate</code> event on <code>self</code>")
128+
eam -. possibly .-> indirect("Update <code>mediaPermissions.video</code> with <code>mediaPermissionUpdate</code> event")
129+
130+
class eam basic;
131+
```
132+
133+
### Enable / Disable Screen share
119134

120135
```ts
121136
// Enable Screenshare
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"position": 5,
3-
"label": "Participants",
3+
"label": "Remote Participants",
44
"collapsible": true
55
}

docs/rn-core/participants/events.mdx

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Participant Events
2+
title: Events
33
description: Event handling for participants.
44
sidebar_position: 3
55
tags:
@@ -182,25 +182,6 @@ meeting.participants.joined.on(
182182
);
183183
```
184184

185-
## Events for specific participant
186-
187-
If you want to subscribe to above events but for a specific participant only,
188-
you can do so by binding event to `meeting.participants.joined.get(peerId).on()`
189-
method. where the `peerId` is the id of the participant that you want to watch.
190-
191-
### Webinar events
192-
193-
Here is a list of events that can are emitted for a participants in a `WEBINAR`
194-
setup.
195-
196-
| **Event** | **Description** |
197-
| ------------------------- | ---------------------------------------------------------------------- |
198-
| `peerRequestToJoinStage` | Emitted when a user has requested to join the webinar meeting. |
199-
| `peerRejectedToJoinStage` | Emitted when the user's request to join the meeting has been rejected. |
200-
| `peerAcceptedToJoinStage` | Emitted when the user's request to join the meeting has been accepted |
201-
| `peerStoppedPresenting` | Emitted when a participant stops presenting in the webinar meeting. |
202-
| `peerStartedPresenting` | Emitted when a participant starts presenting in the webinar meeting. |
203-
204185
<head>
205186
<title>React Native Core Participant Events</title>
206187
</head>

0 commit comments

Comments
 (0)