Skip to content

Commit

Permalink
fix(flutter): fixing variable decls, wordings, type, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
vi_mi authored and palashgo committed Apr 6, 2022
1 parent e622564 commit 0dbef27
Show file tree
Hide file tree
Showing 36 changed files with 1,348 additions and 90 deletions.
30 changes: 15 additions & 15 deletions flutter_versioned_docs/version-0.1.x/advanced-usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The `DyteMeetingHandler` instance (referenced as `meeting` above) helps you inte
You can get the connection configuration of the meeting in progress using the `connectionConfig` property of `DyteMeetingHandler`.

```dart
let config = meeting.connectionConfig;
var config = meeting.connectionConfig;
```

sets the value of `config` to the following:
Expand All @@ -93,7 +93,7 @@ sets the value of `config` to the following:
You can get the UI configuration of the meeting in progress using the `uiConfig` property of `DyteMeetingHandler`.

```dart
let config = meeting.uiConfig;
var config = meeting.uiConfig;
```

sets the value of `config` to the following:
Expand Down Expand Up @@ -137,7 +137,7 @@ sets the value of `config` to the following:
You can get info about the plugins configured for the meeting in progress using the `plugins` property of `DyteMeetingHandler`.

```dart
let plugins = meeting.plugins;
var plugins = meeting.plugins;
```

sets the value of `plugins` to an array of with elements that are instances of type `DytePlugin`, whose prototype is defined below in the reference section and can be directly used as a type if you prefer using TypeScript bindings.
Expand Down Expand Up @@ -302,7 +302,7 @@ where `message` can be of any type and `peerId` is a string representing the uni
You can get a list of all participants in the meeting using the `participants` property of `meeting`.

```dart
let participantList = meeting.participants;
var participantList = meeting.participants;
```

sets the `participantList` to an array whose elements are instances of type `DyteParticipant`, whose prototype is defined below in the reference section and can be directly used as a type if you prefer using TypeScript bindings. There will be exactly one element of type `DyteSelfParticipant`, which refers to the current participant.
Expand All @@ -319,7 +319,7 @@ Remember that despite the functions being available to every participant via the

### Get participant list

To get a list of all participants, use `meeting.participants`: it returns `Array[DyteParticipant|DyteSelfParticipant]` where all meeting participants are [`DyteParticipant`](./reference/participant) and the current participant is [`DyteSelfParticipant`](./reference/self-participant).
To get a list of all participants, use `meeting.participants`: it returns `List<DyteParticipant>` where all meeting participants are [`DyteParticipant`](./reference/participant).

### Participant info and actions

Expand All @@ -344,7 +344,7 @@ Even if the same participant, using the same auth token, rejoins the meeting, fo
:::

```dart
let peerID = p.id;
var peerID = p.id;
```

sets the value of `peerID` to a UUID string.
Expand All @@ -354,31 +354,31 @@ sets the value of `peerID` to a UUID string.
Get the client specific ID as you have specified in the add participant API call. You may want to decide exposing custom controls or build other business logic based on this identifier, which helps you find the participant info in your system.

```dart
let clientSpecificID = p.clientSpecificId;
var clientSpecificID = p.clientSpecificId;
```

#### Participant name

Get the participant name as you have specified in the add participant API call. The participant may have changed this name, if enabled.

```dart
let name = p.name;
var name = p.name;
```

#### Participant thumbnail photo / avatar

Get the participant photo as you have specified in the add participant API call.

```dart
let name = p.picture;
var name = p.picture;
```

#### Check if participant's audio is on

To check whether a participant's audio is on (mic is turned on), you can use

```dart
let audio = p.audioEnabled;
var audio = p.audioEnabled;
```

which sets the value of `audio` to a boolean specifying if the mic is on or not.
Expand All @@ -388,7 +388,7 @@ which sets the value of `audio` to a boolean specifying if the mic is on or not.
If the participant's audio is on, you can get the associated audio stream using

```dart
let audioStream = p.audioTrack;
var audioStream = p.audioTrack;
```

which sets the value of `audioStream` to a `MediaStreamTrack` that you can use elsewhere such as a custom recording.
Expand All @@ -406,7 +406,7 @@ p.disableAudio();
To check whether a participant's video is on (camera is turned on), you can use

```dart
let video = p.videoEnabled;
var video = p.videoEnabled;
```

which sets the value of `video` to a boolean specifying if the camera is on or not.
Expand All @@ -416,7 +416,7 @@ which sets the value of `video` to a boolean specifying if the camera is on or n
If the participant's video is on, you can get the associated video stream using

```dart
let videoStream = p.videoTrack;
var videoStream = p.videoTrack;
```

which sets the value of `videoStream` to a `MediaStreamTrack` that you can use elsewhere such as a custom recording.
Expand All @@ -434,7 +434,7 @@ p.disableVideo();
To check whether a participant's video is pinned to the meeting grid; by the host, by the user, by the preset, or by any other mechanism; you can use

```dart
let pinned = p.isPinned;
var pinned = p.isPinned;
```

which sets the value of `pinned` to a boolean specifying whether the video is pinned or not.
Expand Down Expand Up @@ -498,7 +498,7 @@ p.sendMessage(message);
You can check if the participant is the current participant by checking the `isMe` boolean property of the participant. If found to be `true`, you can treat that participant as an instance of type `DyteSelfParticipant`, which is a subclass of type `DyteParticipant`. This unlocks a few additional actions that you can take with that participant.

```dart
let currentParticipant = meeting.participants.find((p) => p.isMe);
var currentParticipant = meeting.participants.find((p) => p.isMe);
```

Now all the methods that you can call on `meeting.self` (as described under [replace meeting control buttons](#replace-the-meeting-control-buttons-with-your-own-buttons)) can be called on `currentParticipant`.
Expand Down
2 changes: 1 addition & 1 deletion flutter_versioned_docs/version-0.1.x/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SizedBox(
)
```

You can use any other constraining widget instead of SizedBox, the parent widget just needs to have a `maxHeight` and `maxWidth`.
You can use any constraining widget (not restricted to SizedBox), the parent widget just needs to have a `maxHeight` and `maxWidth`.

For example, for a full screen meeting you could use the following code.

Expand Down
2 changes: 1 addition & 1 deletion flutter_versioned_docs/version-0.1.x/reference/meeting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 3

| Property name | Data type | Use |
| ------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| participants | Array <[DyteSelfParticipant](./self-participant) \| [DyteParticipant](./participant)> | Array of participants, including the current participant (see [participant controls and actions](./../advanced-usage#controlling-individual-participants-and-actions) for more info) |
| participants | List <[DyteParticipant](./participant)> | List of participants, including the current participant (see [participant controls and actions](./../advanced-usage#controlling-individual-participants-and-actions) for more info) |
| self | [DyteSelfParticipant](./self-participant) | The current participant (see [self participant controls](./../advanced-usage#check-if-the-participant-is-current-participant) for more info) |

## Methods
Expand Down
2 changes: 1 addition & 1 deletion flutter_versioned_docs/version-0.1.x/sample-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ sidebar_position: 7

# Sample app

You can check out an example of this integration by cloning our [React example repo](https://github.com/dyte-in/flutter-sample-app).
You can check out an example of this integration by cloning our [Flutter example repo](https://github.com/dyte-in/flutter-sample-app).
30 changes: 15 additions & 15 deletions flutter_versioned_docs/version-0.3.x/advanced-usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The `DyteMeetingHandler` instance (referenced as `meeting` above) helps you inte
You can get the connection configuration of the meeting in progress using the `connectionConfig` property of `DyteMeetingHandler`.

```dart
let config = meeting.connectionConfig;
var config = meeting.connectionConfig;
```

sets the value of `config` to the following:
Expand All @@ -93,7 +93,7 @@ sets the value of `config` to the following:
You can get the UI configuration of the meeting in progress using the `uiConfig` property of `DyteMeetingHandler`.

```dart
let config = meeting.uiConfig;
var config = meeting.uiConfig;
```

sets the value of `config` to the following:
Expand Down Expand Up @@ -137,7 +137,7 @@ sets the value of `config` to the following:
You can get info about the plugins configured for the meeting in progress using the `plugins` property of `DyteMeetingHandler`.

```dart
let plugins = meeting.plugins;
var plugins = meeting.plugins;
```

sets the value of `plugins` to an array of with elements that are instances of type `DytePlugin`, whose prototype is defined below in the reference section and can be directly used as a type if you prefer using TypeScript bindings.
Expand Down Expand Up @@ -302,7 +302,7 @@ where `message` can be of any type and `peerId` is a string representing the uni
You can get a list of all participants in the meeting using the `participants` property of `meeting`.

```dart
let participantList = meeting.participants;
var participantList = meeting.participants;
```

sets the `participantList` to an array whose elements are instances of type `DyteParticipant`, whose prototype is defined below in the reference section and can be directly used as a type if you prefer using TypeScript bindings. There will be exactly one element of type `DyteSelfParticipant`, which refers to the current participant.
Expand All @@ -319,7 +319,7 @@ Remember that despite the functions being available to every participant via the

### Get participant list

To get a list of all participants, use `meeting.participants`: it returns `Array[DyteParticipant|DyteSelfParticipant]` where all meeting participants are [`DyteParticipant`](./reference/participant) and the current participant is [`DyteSelfParticipant`](./reference/self-participant).
To get a list of all participants, use `meeting.participants`: it returns `List<DyteParticipant>` where all meeting participants are [`DyteParticipant`](./reference/participant).

### Participant info and actions

Expand All @@ -344,7 +344,7 @@ Even if the same participant, using the same auth token, rejoins the meeting, fo
:::

```dart
let peerID = p.id;
var peerID = p.id;
```

sets the value of `peerID` to a UUID string.
Expand All @@ -354,31 +354,31 @@ sets the value of `peerID` to a UUID string.
Get the client specific ID as you have specified in the add participant API call. You may want to decide exposing custom controls or build other business logic based on this identifier, which helps you find the participant info in your system.

```dart
let clientSpecificID = p.clientSpecificId;
var clientSpecificID = p.clientSpecificId;
```

#### Participant name

Get the participant name as you have specified in the add participant API call. The participant may have changed this name, if enabled.

```dart
let name = p.name;
var name = p.name;
```

#### Participant thumbnail photo / avatar

Get the participant photo as you have specified in the add participant API call.

```dart
let name = p.picture;
var name = p.picture;
```

#### Check if participant's audio is on

To check whether a participant's audio is on (mic is turned on), you can use

```dart
let audio = p.audioEnabled;
var audio = p.audioEnabled;
```

which sets the value of `audio` to a boolean specifying if the mic is on or not.
Expand All @@ -388,7 +388,7 @@ which sets the value of `audio` to a boolean specifying if the mic is on or not.
If the participant's audio is on, you can get the associated audio stream using

```dart
let audioStream = p.audioTrack;
var audioStream = p.audioTrack;
```

which sets the value of `audioStream` to a `MediaStreamTrack` that you can use elsewhere such as a custom recording.
Expand All @@ -406,7 +406,7 @@ p.disableAudio();
To check whether a participant's video is on (camera is turned on), you can use

```dart
let video = p.videoEnabled;
var video = p.videoEnabled;
```

which sets the value of `video` to a boolean specifying if the camera is on or not.
Expand All @@ -416,7 +416,7 @@ which sets the value of `video` to a boolean specifying if the camera is on or n
If the participant's video is on, you can get the associated video stream using

```dart
let videoStream = p.videoTrack;
var videoStream = p.videoTrack;
```

which sets the value of `videoStream` to a `MediaStreamTrack` that you can use elsewhere such as a custom recording.
Expand All @@ -434,7 +434,7 @@ p.disableVideo();
To check whether a participant's video is pinned to the meeting grid; by the host, by the user, by the preset, or by any other mechanism; you can use

```dart
let pinned = p.isPinned;
var pinned = p.isPinned;
```

which sets the value of `pinned` to a boolean specifying whether the video is pinned or not.
Expand Down Expand Up @@ -498,7 +498,7 @@ p.sendMessage(message);
You can check if the participant is the current participant by checking the `isMe` boolean property of the participant. If found to be `true`, you can treat that participant as an instance of type `DyteSelfParticipant`, which is a subclass of type `DyteParticipant`. This unlocks a few additional actions that you can take with that participant.

```dart
let currentParticipant = meeting.participants.find((p) => p.isMe);
var currentParticipant = meeting.participants.find((p) => p.isMe);
```

Now all the methods that you can call on `meeting.self` (as described under [replace meeting control buttons](#replace-the-meeting-control-buttons-with-your-own-buttons)) can be called on `currentParticipant`.
Expand Down
2 changes: 1 addition & 1 deletion flutter_versioned_docs/version-0.3.x/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SizedBox(
)
```

You can use any other constraining widget instead of SizedBox, the parent widget just needs to have a `maxHeight` and `maxWidth`.
You can use any constraining widget (not restricted to SizedBox), the parent widget just needs to have a `maxHeight` and `maxWidth`.

For example, for a full screen meeting you could use the following code.

Expand Down
2 changes: 1 addition & 1 deletion flutter_versioned_docs/version-0.3.x/reference/meeting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 3

| Property name | Data type | Use |
| ------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| participants | Array <[DyteSelfParticipant](./self-participant) \| [DyteParticipant](./participant)> | Array of participants, including the current participant (see [participant controls and actions](./../advanced-usage#controlling-individual-participants-and-actions) for more info) |
| participants | List <[DyteParticipant](./participant)> | List of participants, including the current participant (see [participant controls and actions](./../advanced-usage#controlling-individual-participants-and-actions) for more info) |
| self | [DyteSelfParticipant](./self-participant) | The current participant (see [self participant controls](./../advanced-usage#check-if-the-participant-is-current-participant) for more info) |

## Methods
Expand Down
2 changes: 1 addition & 1 deletion flutter_versioned_docs/version-0.3.x/sample-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ sidebar_position: 7

# Sample app

You can check out an example of this integration by cloning our [React example repo](https://github.com/dyte-in/flutter-sample-app).
You can check out an example of this integration by cloning our [Flutter example repo](https://github.com/dyte-in/flutter-sample-app).
Loading

0 comments on commit 0dbef27

Please sign in to comment.