Skip to content

Commit

Permalink
Merge branch 'staging' of github.com:AgoraIO/Docs-Source into 1371-ro…
Browse files Browse the repository at this point in the history
…utine-document-optimization-for-agora-chat
  • Loading branch information
billy-the-fish committed Sep 11, 2023
2 parents b1f6a4a + 3520f51 commit c1c0b26
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 32 deletions.
36 changes: 16 additions & 20 deletions extensions-marketplace/develop/integrate/byteplus.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The BytePlus Effects extension encapsulates the core APIs of the BytePlus Effect
Taking `setExtensionProperty` as an example, the `key` is named after the BytePlus API, and the `value` wraps either certain or all of the parameters of that API in JSON. When you call `setExtensionProperty` and pass in the pair of `key` and `value`, it is equivalent to calling the corresponding BytePlus API. The case is the same for `setExtensionPropertyWithVendor`.


<div class="alert note">Currently, the extension encapsulates part of the APIs of the BytePlus Effects SDK. For details, see the <a href="byteplus#key-value">key-value overview</a>.</div>
<div class="alert note">Currently, the extension encapsulates part of the APIs of the BytePlus Effects SDK. For details, see the [key-value overview](#key-value).</div>

## Prerequisites

Expand Down Expand Up @@ -185,15 +185,6 @@ private void initExtension() {
Log.e(TAG, e.toString());
}
// Set whether the overlay effects can coexist with stickers
try {
JSONObject jsonObject = new JSONObject();
jsonObject.put("mode", 1);
jsonObject.put("orderType", 0);
setExtensionProperty("bef_effect_ai_composer_set_mode", jsonObject.toString());
} catch (JSONException e) {
Log.e(TAG, e.toString());
}
});
}
Expand All @@ -217,7 +208,8 @@ Call `setExtensionPropertyWithVendor`, and pass in the corresponding keys and va
- Set stickers
- Set filters and their intensity

You can call the method as needed. For a full list of keys and values, see the [API reference](#api-ref).
If you want to use superimposed special effects in an environment that does not use stickers, initialize the composer first.
If you want to remove an effect, remove the composer node. See the [key-value overview](#key-value) for details.

## Reference

Expand Down Expand Up @@ -283,16 +275,21 @@ See [Special effects handle license](https://docs.byteplus.com/effects/docs/c-ap

See [Initialize special effects handle](https://docs.byteplus.com/effects/docs/c-api#3-initialize-special-effects-handle).

##### Set coexistence of stickers and superimposed effects
##### Initialize composer

- key: `bef_effect_ai_composer_set_mode`
- key: `bef_effect_ai_set_composer`
- value: `strPath`. String. The path to composer resource files.

See [Initialize composer](https://docs.byteplus.com/effects/docs/c-api#19.%20Initialize%20composer).

##### Remove composer

- key: `bef_effect_ai_composer_remove_nodes`
- value: The value includes:
- `mode`: Int.
- `0`: Do not allow such coexistence.
- `1`: Allow such coexistence.
- `orderType`: Int. The rendering order of effects and stickers. For now you need to set it as `0`.
- `nodePaths`: String. The array containing effect resource paths.
- `nodeNum`: Integer. The length of the array containing effect resource paths.

See [Set whether the overlay effects may coexist with stickers](https://docs.byteplus.com/effects/docs/c-api#18-set-whether-the-overlay-effects-may-coexist-with-stickers).
See [Remove composer](https://docs.byteplus.com/effects/docs/c-api#51d8ae75).

##### Set the phone orientation

Expand All @@ -304,7 +301,7 @@ See [Set the phone angle](https://docs.byteplus.com/effects/docs/c-api#5-set-the
##### Set superimposed effects

- key: `bef_effect_ai_composer_set_nodes`
- value: `nodePaths`. A string array containing the paths of each effect resource.
- value: `nodePaths`. String. The array containing effect resource paths.

See [Set superimposed effects](https://docs.byteplus.com/effects/docs/c-api#16-set-superimposed-special-effects-face-beautification-shape-beautification-and-beauty-makeup).

Expand All @@ -316,7 +313,6 @@ See [Set superimposed effects](https://docs.byteplus.com/effects/docs/c-api#16-s
- `nodeTag`: String. The key of the effect. See [Functions of Resource Keys](https://docs.byteplus.com/effects/docs/functions-of-resource-keys-v421-and-later).
- `value`: Float. The intensity of a single node for the combined effects.


See [Set the intensity of superimposed effects](https://docs.byteplus.com/effects/docs/c-api#17-set-the-intensity-of-special-effects-face-beautification-shape-beautification-and-beautify-makeup).

##### Set stickers
Expand Down
16 changes: 16 additions & 0 deletions shared/chat-sdk/reference/release-notes/unity.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<PlatformWrapper platform="unity">

## v1.1.2

v1.1.2 was released on August 24, 2023.

#### Issues fixed

- Fixed the issue that the `messageReactionDidChange` callback leads to Unity suspend.
- Fixed the issue that the `startMessageId` parameter does not work in the `LoadMessages` API.
- Fixed a rare crash where Chat SDK cannot find the callback handler.

#### New features

- You can now set `SDKDatapath` in Chat SDK options. The default value is `Application.persistentDataPath`; to
enable the app user to retrieve their history locally, set `SDKDatapath` to ".".
- The new `IsInit` API helps you to check if you need to clear a resource in Chat SDK.

## v1.1.1

v1.1.1 was released on June 8, 2023.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<PlatformWrapper platform="android">

2. **Initialise the `ContentInspectConfig`**
2. **Initialise `ContentInspectConfig`**

Setup the inspect config inside a `ContentInspectModule`. For example, the following config monitors the images
in a video feed, taking one frame every 5 seconds.
Set up the inspect config inside `ContentInspectModule`. If you use a string UID to join the channel and want to receive it in the webhook callback, pass the string UID to `YourExtraInfo` inside `ContentInspectConfig`.

For example, the following config monitors the images in a video feed, taking one frame every 5 seconds:

```kotlin
val contentInspectModule = ContentInspectModule()
contentInspectModule.type = ContentInspectConfig.CONTENT_INSPECT_TYPE_IMAGE_MODERATION
contentInspectModule.interval = 2
contentInspectModule.interval = 5
val contentInspectConfig = ContentInspectConfig()
contentInspectConfig.modules[0] = contentInspectModule
contentInspectConfig.moduleCount = 1
contentInspectConfig.extraInfo = "YourExtraInfo"
```

1. **Apply `ContentInspectConfig` to your <Vg k="ENGINE"/> instance**.

Enable content inspect after joining a channel.
Enable content inspect after joining a channel and after the local video is published and played.

```kotlin
val returnVal = agoraEngine?.enableContentInspect(true, contentInspectConfig)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<PlatformWrapper platform="ios">

2. **Initialise an `AgoraContentInspectConfig`**
2. **Initialise `AgoraContentInspectConfig`**

Setup the inspect config inside a `ContentInspectManager`. For example, the following config monitors the images
in a video feed, taking one frame every 5 seconds.
Set up the inspect config inside `ContentInspectManager`. If you use a string UID to join the channel and want to receive it in the webhook callback, pass the string UID to `YourExtraInfo` inside `AgoraContentInspectConfig`. For example, the following config monitors the images
in a video feed, taking one frame every 5 seconds:

```swift
var inspectConfig: AgoraContentInspectConfig = {
Expand All @@ -13,15 +13,15 @@

let config = AgoraContentInspectConfig()
config.modules = [module]

config.extraInfo="YourExtraInfo"
return config
}()
```


1. **Apply `AgoraContentInspectConfig` to your <Vg k="ENGINE"/> instance**

Enable content inspect after joining a channel.
Enable content inspect after joining a channel and after the local video is published and played.

```swift
self.agoraEngine.enableContentInspect(true, config: self.inspectConfig)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<PlatformWrapper platform="web">


2. **Setup an event listener to check status**
2. **Set up an event listener to check status**

In your <Vpl k="CLIENT" />, add the following event listener to `agoraEngine`:

Expand All @@ -13,7 +13,7 @@

1. **Enable image moderation**

To enable `ImageModeration` in your <Vpl k="CLIENT" />, call `setImageModeration` after the user joins a channel:
To enable `ImageModeration` in your app, call `setImageModeration` after the user joins a channel and the local video is published and played:

```javascript
agoraEngine
Expand Down

0 comments on commit c1c0b26

Please sign in to comment.