Skip to content

Commit

Permalink
review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
saudsami committed Jul 11, 2024
1 parent 930e8dc commit c516d23
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ private String token = "<#Your token#>";
Call `create` to initialize an `RtcEngine` instance.

<Admonition type="caution" title="Note">
Before initializing the SDK, make sure that the end-user is fully aware of and agrees to the privacy policy.
Before initializing the SDK, ensure that the end-user is fully aware of and agrees to the privacy policy.
</Admonition>

<ProductWrapper notAllowed="voice-calling">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Add variables to create an engine instance and join a channel.
### Initialize RTC engine​

<Admonition type="caution" title="Note">
Before initializing the SDK, make sure that the end-user is fully aware of and agrees to the privacy policy.
Before initializing the SDK, ensure that the end-user is fully aware of and agrees to the privacy policy.
</Admonition>

1. If your target platform is Android, check whether system permissions have been granted before initializing the RTC engine. Refer to the following figure to create nodes for adding permissions to access the microphone and camera in the **CheckPermission** function.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ If your target platform is iOS or macOS, add the microphone permission declarati
Call `createAgoraRtcEngine` to create an `RtcEngine` instance, then `initialize` the engine and set the channel profile.

<Admonition type="caution" title="Note">
Before initializing the SDK, make sure that the end-user is fully aware of and agrees to the privacy policy.
Before initializing the SDK, ensure that the end-user is fully aware of and agrees to the privacy policy.
</Admonition>

<ProductWrapper notAllowed="[voice-calling, video-calling]">
Expand Down Expand Up @@ -790,9 +790,10 @@ await _engine.joinChannel(
### Join a channel and publish the audio stream​
Configure `ChannelMediaOptions` and call `joinChannel` to join a channel.
In `ChannelMediaOptions`:
- Set the `clientRoleType` to `clientRoleBroadcaster` to act as a host or `clientRoleAudience` for audience.
- Set `publishMicrophoneTrack` to `true` to publish the audio captured by the microphone.
- Set `autoSubscribeAudio` to `true` to automatically subscribe to all audio streams.

- Set the `clientRoleType` to `clientRoleBroadcaster` to act as a host or `clientRoleAudience` for audience.
- Set `publishMicrophoneTrack` to `true` to publish the audio captured by the microphone.
- Set `autoSubscribeAudio` to `true` to automatically subscribe to all audio streams.

```dart
await _engine.joinChannel(
Expand Down Expand Up @@ -869,13 +870,9 @@ Widget _remoteVideo() {
</ProductWrapper>

### Leave the channel and release resources​
When a user closes the <Vpl k="CLIENT"/>, or switches the <Vpl k="CLIENT"/> to the background, follow the steps below to end an audio/video interaction:
When a user closes the <Vpl k="CLIENT"/>, or switches the <Vpl k="CLIENT"/> to the background:
1. Call `leaveChannel` to leave the current channel and release all session-related resources.
1. Call `release` to destroy the engine and release all resources used in the <Vg k="COMPANY"/> SDK.

<Admonition type="danger" title="Warning">
After calling `release`, you will no longer be able to use all methods and callbacks of the SDK. To use real-time audio/video interaction again, you must create a new engine.
</Admonition>
1. Call `release` to destroy the engine and release all resources used by the SDK.

```dart
Future<void> _dispose() async {
Expand All @@ -884,4 +881,8 @@ Future<void> _dispose() async {
}
```

<Admonition type="info" title="Warning">
After you call `release`, you longer have access to the methods and callbacks of the SDK. To use <Vpd k="NAME" /> features again, create a new engine instance.
</Admonition>

</PlatformWrapper>
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ const getPermission = async () => {
Call `createAgoraRtcEngine` to create an `RtcEngine` instance, and then `initialize` the engine.

<Admonition type="caution" title="Note">
Before initializing the SDK, make sure that the end-user is fully aware of and agrees to the privacy policy.
Before initializing the SDK, ensure that the end-user is fully aware of and agrees to the privacy policy.
</Admonition>

```jsx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ Add the `AndroidPermission` library to obtain device and network permissions:
### Initialize the engine

<Admonition type="caution" title="Note">
Before initializing the SDK, make sure that the end-user is fully aware of and agrees to the privacy policy.
Before initializing the SDK, ensure that the end-user is fully aware of and agrees to the privacy policy.
</Admonition>

<ProductWrapper notAllowed="voice-calling">
Expand Down
2 changes: 1 addition & 1 deletion shared/video-sdk/reference/_error-codes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ErrorCodes from '@docs/shared/video-sdk/reference/error-codes/index.mdx';

When interacting with the Agora API, the <Vpd k="SDK" /> may return an error code. Receiving an error code indicates that the SDK has encountered an unrecoverable error that necessitates intervention from your <Vpl k="CLIENT" />.

This page provides descriptions for common error codes along with the associated reasons and their corresponding solutions. For error codes without predefined solutions, <Vg k="COMPANY" /> recommends reaching out to [Technical Support](mailto:[email protected]) for assistance.
This page provides descriptions for common error codes along with the associated reasons and their corresponding solutions. For error codes without predefined solutions, reach out to [Technical Support](mailto:[email protected]) for assistance.

<PlatformWrapper notAllowed="web">
The error codes listed in this section apply to Agora RTC v4.x SDK on the following platforms:
Expand Down

0 comments on commit c516d23

Please sign in to comment.