-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #370 from dyte-io/flutter-core-docs-revamp
Flutter core docs revamp
- Loading branch information
Showing
23 changed files
with
878 additions
and
331 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: Introduction | ||
sidebar_position: 3 | ||
sidebar_class_name: module-seperation | ||
--- | ||
|
||
import ProductSection from '/docs/partials/_product-section.mdx'; | ||
|
||
# Introduction | ||
|
||
The Dyte Core SDK is designed to provide you with an easy way to incorporate live video, voice, livestream and chat capabilities into your Android apps. The Core SDK acts as a data-only layer. It provides simple APIs offering high-level primitives and abstracting away complex media and networking optimizations. | ||
|
||
## Why Core SDK? | ||
|
||
The Core SDK was developed with a user-friendly approach to eliminate the complexity of managing streams. Unlike traditional | ||
SDKs that require knowledge of WebRTC functioning, Dyte's Core SDK provides a simple API that abstracts out the complexity, | ||
making it easier for developers to use. For instance, enabling video with Dyte's Core SDK is as easy as calling | ||
`dyteMobileClient.localUser.enableVideo()`. | ||
|
||
## Utility Modules | ||
|
||
The Core SDK includes various modules for in-call utilities like chat, polls, and recording that enable building a UI on top of | ||
it. The following are the core SDK modules: | ||
|
||
- **meeting.localUser**: This consists of properties and methods corresponding to the current (local) user, such as enabling or disabling their audio and video, getting a list of media devices or changing the device, or sharing your mobile screen. | ||
- **meeting.participants**: Use this module to get useful information about the other participants that are present in the meeting. A host can use this module for access control. For example, the host can mute or kick a participant. | ||
- **meeting.chat**: It provides the methods to integrate chat features such as sending/receiving text, images, and files. | ||
- **meeting.polls**: Meetings can have polls. This module lets you perform actions related to polls, that is create and manage | ||
a poll within a meeting. | ||
- **meeting.recording**: When a meeting needs to be recorded, this module can be used. It lets you start or stop a recording, | ||
and get the current status of an ongoing recording. | ||
- **meeting.meta**: This object consists of all the metadata related to the current meeting, such as the title, the timestamp | ||
of when it started, and more. | ||
- **meeting.plugins**: Provides the list of available plugins and active plugins. Use this module to enable or disable plugins as needed. | ||
|
||
<head> | ||
<title>Flutter Core Introduction</title> | ||
</head> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
title: Media Permissions | ||
description: >- | ||
Learn how to manage permissions in your Flutter application for a secure and | ||
controlled user experience with Dyte Docs. | ||
sidebar_position: 5 | ||
tags: | ||
- flutter-core | ||
- local-user | ||
- self | ||
- self events | ||
--- | ||
|
||
# Media Permissions | ||
|
||
To get media permissions (audio/video) for localUser we can do as follows | ||
|
||
```dart | ||
final isCameraPermissionGranted | ||
= dyteMobileClient.localUser.permissions.isCameraPermissionGranted; | ||
final isMicrophonePermissionGranted | ||
= dyteMobileClient.localUser.permissions.isMicrophonePermissionGranted; | ||
``` | ||
|
||
Similarly to listen to callbacks regarding media permissions once user joins | ||
the meeting | ||
|
||
```dart | ||
class LocalUserNotifier implements DyteSelfEventsListener { | ||
... | ||
@override | ||
void onMeetingRoomJoinedWithoutCameraPermission() { | ||
// when meeting room is joined without camera permission | ||
} | ||
override | ||
void onMeetingRoomJoinedWithoutMicPermission() { | ||
// when meeting room is joined without microphone permission | ||
} | ||
... | ||
} | ||
``` | ||
|
||
<head> | ||
<title>Flutter Core Media Permissions</title> | ||
<meta | ||
name="description" | ||
content="Learn how to manage permissions in your Flutter application for a secure and controlled user experience with Dyte Docs." | ||
/> | ||
</head> |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"position": 5, | ||
"label": "Participants", | ||
"position": 7, | ||
"label": "Remote Participants", | ||
"collapsible": true | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Participant Types | ||
description: 'Events, methods and data pertaining to meeting participants.' | ||
sidebar_position: 1 | ||
slug: /participants/ | ||
tags: | ||
- flutter-core | ||
- participants | ||
--- | ||
|
||
# Participant Types | ||
|
||
The data regarding all meeting participants is stored under `meeting.participants`. These **does not** include the local user. Use the methods and events to consume the participants data. For example, to get all the participants who joined the meeting: | ||
|
||
```kotlin | ||
// get all joined participants | ||
final List<DyteJoinedMeetingParticipant> joined = dyteMobileClient.participants.active; | ||
|
||
// get active participants | ||
final List<DyteJoinedMeetingParticipant> active = dyteMobileClient.participants.active; | ||
``` | ||
|
||
The `dyteMobileClient.participants` object has the following **lists** of participants | ||
|
||
- **joined**: A list that contains all the participants who are currently in the meeting | ||
except the local user | ||
- **waitlisted**: A list that contains all the participants waiting to join the | ||
meeting. | ||
- **active**: A list that contains all the participants, **including** the local user whose media is subscribed to i.e participants who are supposed to be on the screen at the moment, including the local user. | ||
- **pinned**: A list that contains all the pinned participants of the meeting. | ||
- **screenShares**: A list that contains all the participants who are sharing their screen. | ||
|
||
Therefore if you were to make a video / audio grid of participants, you'd use the `active` list, but to display the list of all participants in the meeting you'd use the `joined` list. | ||
|
||
Each participant in each of the `joined`, `active`, `pinned` and `screenShares` list are of type `DyteJoinedMeetingParticipant`, `waitlisted` list is of type `DyteWaitlistedParticipant`. | ||
|
||
<head> | ||
<title>Flutter Core Participants</title> | ||
</head> |
Oops, something went wrong.