@tencent-rtc/mcp 1.7.3 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +22 -23
- package/knowledge/path-meta.js +23 -1
- package/package.json +1 -1
- package/resource/index/manifest.json +1 -1
- package/resource/knowledge/callkit/best-practice/android/video-chat-dating.md +497 -0
- package/resource/knowledge/callkit/best-practice/flutter/android-keep-call-alive-background.md +79 -0
- package/resource/knowledge/callkit/best-practice/flutter/background-incoming-call-no-notification.md +99 -0
- package/resource/knowledge/callkit/best-practice/flutter/ios-keep-call-alive-background.md +93 -0
- package/resource/knowledge/callkit/best-practice/flutter/ios-startup-crash-version-voip.md +68 -0
- package/resource/knowledge/callkit/core-sdk/miniprogram/call-engine.md +386 -0
- package/resource/knowledge/callkit/core-sdk/miniprogram/call-event.md +315 -0
- package/resource/knowledge/callkit/faq/uniapp-miniprogram.md +204 -0
- package/resource/knowledge/callkit/preset/harmonyos/api.md +362 -0
- package/resource/knowledge/callkit/preset/harmonyos/integration.md +318 -0
- package/resource/knowledge/callkit/preset/miniprogram/api-uniapp.md +430 -0
- package/resource/knowledge/callkit/preset/miniprogram/api.md +293 -0
- package/resource/knowledge/callkit/preset/miniprogram/integration.md +294 -0
- package/resource/knowledge/callkit/preset/miniprogram/uniapp-integration.md +224 -0
- package/resource/knowledge/callkit/preset/uni-app/api.md +339 -0
- package/resource/knowledge/callkit/preset/uni-app/integration.md +243 -0
- package/resource/knowledge/chat/preset/react/h5/integration.md +964 -0
- package/resource/knowledge/chat/preset/vue/h5/integration.md +717 -0
- package/resource/knowledge/rtcengine/web/plugin/23-advanced-support-detection.md +6 -6
- package/resource/knowledge/rtcengine/web/plugin/31-advanced-plugins-overview.md +8 -6
- package/resource/knowledge/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +30 -10
- package/server.js +1 -1
- package/utils/preflight-route.js +203 -185
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
package/resource/knowledge/callkit/best-practice/flutter/background-incoming-call-no-notification.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TUICallKit Flutter — No System Notification, No Answer/Decline Buttons, App Not Launched on Background/Lock-Screen Incoming Calls (Notification / VoIP / Permission Troubleshooting)
|
|
3
|
+
product: call
|
|
4
|
+
frameworks: [flutter, android, ios]
|
|
5
|
+
scope: platform_specific
|
|
6
|
+
tags: [TUICallKit, Flutter, Android, iOS, background incoming call, lock screen, TIMPush, VoIP, CallKit, Notification, enableIncomingBanner, overlay permission]
|
|
7
|
+
version_range: ">=2.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TUICallKit Flutter — No System Notification, No Answer/Decline Buttons, App Not Launched on Background/Lock-Screen Incoming Calls (Notification / VoIP / Permission Troubleshooting)
|
|
11
|
+
|
|
12
|
+
## 1. Key Takeaway
|
|
13
|
+
|
|
14
|
+
- Android: To fully support **system notification + answer/decline buttons + auto-launch the app** for background/lock-screen incoming calls, you need TIMPush (FCM or vendor push channels) + the `enableIncomingBanner` switch + **overlay permission** and **background launch permission**. Missing any one of these will degrade the experience (e.g., ringtone only without notification/buttons, or app not launched).
|
|
15
|
+
- iOS: **TIMPush currently does not support iOS VoIP push** (explicitly stated in the official documentation, updated 2026-08-12). The Flutter iOS side can only use **APNs regular push**. It cannot use the system-level CallKit incoming call UI. Therefore, when the app is killed or the screen is locked, iOS **cannot** auto-launch an answer/decline button screen like Android. It can only receive a regular notification; tapping the notification wakes the app.
|
|
16
|
+
- Troubleshooting direction: First determine the platform (Android: permission troubleshooting; iOS: push type capability boundary). The root causes and fixes are entirely different — do not apply the same solution to both.
|
|
17
|
+
- If the app is in the **foreground** and receives a call but shows no buttons / does not launch the call UI: This is unrelated to push. Check whether `enableIncomingBanner` is configured or overlay permission is missing (Android), or whether the `onCallReceived` event listener is missing (iOS/Android common).
|
|
18
|
+
|
|
19
|
+
## 2. Field Reference
|
|
20
|
+
|
|
21
|
+
| Field / Capability | Purpose | Notes |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `TIMPush` (`tencent_cloud_chat_push` plugin) | General offline push solution | Android supports VoIP-type push (via FCM or vendor channels); iOS **currently supports APNs only**, not VoIP |
|
|
24
|
+
| `TUIOfflinePushInfo.iOSPushType` | Specify iOS push type | Can only be set to `TUICallIOSOfflinePushType.APNs`; setting it to VoIP-related values has no effect under current official capabilities |
|
|
25
|
+
| `enableIncomingBanner` | Control callee-side incoming call display mode | `false` (default): directly tries to launch the full-screen call UI; `true`: shows a banner notification first, requires **overlay permission** to display |
|
|
26
|
+
| Overlay permission (display over other apps) | Android system permission | Required for showing custom incoming call banners and call floating windows; missing this prevents banners/answer buttons from appearing |
|
|
27
|
+
| Background launch permission | Android system permission (strictly enforced by some vendors like vivo) | Required for launching the call UI when the app is in the background; missing this prevents auto-launching the app |
|
|
28
|
+
| iOS CallKit / PushKit | iOS native system-level incoming call capability | Flutter TUICallKit **does not provide** official integration docs for this; only the native iOS SDK has related documentation |
|
|
29
|
+
|
|
30
|
+
## 3. Flow
|
|
31
|
+
|
|
32
|
+
User symptom: ringtone heard but no system notification, no answer/decline buttons at the top, app not launched -> Determine platform first:
|
|
33
|
+
|
|
34
|
+
**Android troubleshooting path**: Confirm TIMPush is integrated and push is registered -> Confirm the IM console has the correct FCM certificate uploaded with message type set to "pass-through (data) message" -> Confirm `enableIncomingBanner(true)` has been called -> Confirm the device has granted **overlay permission** and **background launch permission** (permission names vary by vendor; vivo/Redmi may require manual enabling) -> If the UI still does not launch, check whether the main Activity's task root logic (`isTaskRoot()`) is missing, and confirm the Activity launch mode is **not** `singleTask`.
|
|
35
|
+
|
|
36
|
+
**iOS troubleshooting path**: Confirm expectations are realistic — **iOS currently does not officially support VoIP push**, so system-level incoming call UI (answer/decline buttons, auto-launch when app is killed / screen locked) is not achievable -> For APNs regular push scenarios, verify the certificate is correctly uploaded, `iOSPushType` is set to `APNs`, and `TencentCloudChatPush().registerPush` is correctly called -> If the business absolutely requires the system-level incoming call experience, evaluate implementing a native bridge for PushKit + CallKit (beyond the scope of the official standard solution; requires custom implementation and maintenance).
|
|
37
|
+
|
|
38
|
+
## 4. Standard Usage
|
|
39
|
+
|
|
40
|
+
1. Both platforms: Install and register the `tencent_cloud_chat_push` plugin. Immediately call `TencentCloudChatPush().registerPush(...)` after a successful login.
|
|
41
|
+
|
|
42
|
+
2. **Android**:
|
|
43
|
+
- Integrate FCM (or required vendor) push channels. In the IM console, set the message type to "pass-through (data) message".
|
|
44
|
+
- Call `TUICallKit.instance.enableIncomingBanner(true)` to enable the incoming call banner (if banner + button display is desired).
|
|
45
|
+
- Request overlay and background launch permissions:
|
|
46
|
+
|
|
47
|
+
``` kotlin
|
|
48
|
+
PermissionRequester.newInstance(
|
|
49
|
+
PermissionRequester.FLOAT_PERMISSION,
|
|
50
|
+
PermissionRequester.BG_START_PERMISSION
|
|
51
|
+
).request()
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- In the app's default launch Activity (e.g., SplashActivity, and the **launch mode must not be `singleTask`**), add:
|
|
55
|
+
|
|
56
|
+
``` java
|
|
57
|
+
if (!isTaskRoot() && getIntent() != null
|
|
58
|
+
&& getIntent().hasCategory(Intent.CATEGORY_LAUNCHER)
|
|
59
|
+
&& Intent.ACTION_MAIN.equals(getIntent().getAction())) {
|
|
60
|
+
finish();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
3. **iOS**:
|
|
66
|
+
- For APNs regular push only: Apply for and upload the APNs certificate. Set `offlinePushInfo.iOSPushType = TUICallIOSOfflinePushType.APNs`.
|
|
67
|
+
- Clearly communicate to the business team: The iOS side **cannot** achieve "auto-launch system-level answer/decline buttons after the app is killed / screen locked" through the official standard solution. Users can only receive a notification and tap it to wake the app and enter the call flow.
|
|
68
|
+
- If this experience is absolutely required, a custom native PushKit + CallKit bridge solution must be developed (not within the official TUICallKit support scope).
|
|
69
|
+
|
|
70
|
+
4. Both platforms: When receiving a call while in the **foreground**, you can listen for the `onCallReceived` event and use plugins like `flutter_local_notifications` to customize the notification appearance (independent of the offline push pipeline).
|
|
71
|
+
|
|
72
|
+
## 5. Verification
|
|
73
|
+
|
|
74
|
+
- Android: App in background / screen locked. After receiving an incoming call, a banner or full-screen UI is displayed with visible answer/decline buttons. Tapping correctly launches/wakes the app.
|
|
75
|
+
- iOS: App in background. An APNs notification is received. Tapping the notification wakes the app and enters the call flow. **Do not** expect a system-level answer/decline incoming call screen when the app is killed or the screen is locked (not supported by current official capabilities).
|
|
76
|
+
- Both platforms: When receiving a call in the foreground, the call invitation UI or custom notification is displayed correctly.
|
|
77
|
+
|
|
78
|
+
## 6. Common Mistakes
|
|
79
|
+
|
|
80
|
+
- Mistake 1: Treating Android and iOS background incoming call issues as the same problem. The root causes are entirely different (Android: permission configuration; iOS: official capability boundary). Applying the same solution (e.g., only checking permissions) will not resolve the iOS issue.
|
|
81
|
+
- Mistake 2: Believing that setting `iOSPushType = VoIP` on iOS will enable the system-level incoming call UI. TIMPush currently **does not support** iOS VoIP; setting this value has no effect. Only `APNs` is the currently supported valid value.
|
|
82
|
+
- Mistake 3: On Android, only configuring the push certificate without enabling overlay permission and background launch permission. Mistakenly thinking push was not received, when in reality the push was received but insufficient system permissions prevented the UI from launching (check logs first to confirm whether `onCallReceived` was triggered, then troubleshoot permissions).
|
|
83
|
+
|
|
84
|
+
## 7. Problem Definition (Search Anchor)
|
|
85
|
+
|
|
86
|
+
Flutter TUICallKit app receives incoming calls in background/lock screen but only hears a ringtone — no system notification, no answer/decline buttons, and app does not auto-launch. What configurations are needed for Android and iOS respectively (Notification, CallKit, VoIP Push, TIMPush).
|
|
87
|
+
|
|
88
|
+
## 8. Alternative Phrasings (Search Recall)
|
|
89
|
+
|
|
90
|
+
- Flutter TUICallKit no notification on background incoming call?
|
|
91
|
+
- Does TUICallKit Flutter iOS support VoIP incoming calls?
|
|
92
|
+
- Flutter incoming call banner not showing answer/decline buttons?
|
|
93
|
+
- Android background incoming call not launching the app?
|
|
94
|
+
|
|
95
|
+
## 9. References (Optional)
|
|
96
|
+
|
|
97
|
+
- Flutter offline push Notification configuration: `https://cloud.tencent.com/document/product/647/106014`
|
|
98
|
+
- Flutter VoIP configuration (official iOS limitation note): `https://cloud.tencent.com/document/product/647/106015`
|
|
99
|
+
- Android callee-side incoming call display strategy and permission troubleshooting: `https://cloud.tencent.com/document/product/647/78767`
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TUICallKit Flutter iOS — Call Audio Interrupted When App Goes to Background / Screen Locked (Background Modes + AVAudioSession Configuration)
|
|
3
|
+
product: call
|
|
4
|
+
frameworks: [flutter, ios]
|
|
5
|
+
scope: platform_specific
|
|
6
|
+
tags: [TUICallKit, Flutter, iOS, VoIP, AVAudioSession, Background Modes, UIBackgroundModes, playAndRecord, keep alive, background, CallKit, MethodChannel]
|
|
7
|
+
version_range: ">=2.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TUICallKit Flutter iOS — Call Audio Interrupted When App Goes to Background / Screen Locked (Background Modes + AVAudioSession Configuration)
|
|
11
|
+
|
|
12
|
+
## 1. Key Takeaway
|
|
13
|
+
|
|
14
|
+
- Required: iOS restricts background apps from accessing the microphone/speaker. If not configured correctly, audio capture/playback will be interrupted by the system when the app goes to background or the screen is locked.
|
|
15
|
+
- Root cause: Background Modes not declared, or `AVAudioSession` not manually configured to the `.playAndRecord` category. TUICallKit **does not automatically configure** `AVAudioSession`; developers must set it up in the native layer.
|
|
16
|
+
- Fix: Enable three Background Modes items in Xcode (this is **not** iOS-version-specific — all versions require this) + configure `AVAudioSession` in the native layer before the call starts via Flutter `MethodChannel`.
|
|
17
|
+
- No CallKit integration required: This solution does not depend on the iOS `CallKit` framework. Background audio keep-alive for voice/video calls is achieved purely through Background Modes + `AVAudioSession`.
|
|
18
|
+
- Clarification (avoid misuse): Apple's `com.apple.developer.avfoundation.multitasking-camera-access` entitlement is exclusively for **camera background capture in Picture-in-Picture (PiP) scenarios**. It is unrelated to this problem (audio call background keep-alive) — do not confuse the two.
|
|
19
|
+
|
|
20
|
+
## 2. Field Reference
|
|
21
|
+
|
|
22
|
+
| Field / Capability | Purpose | Notes |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `Audio, AirPlay, and Picture in Picture` | Background Modes capability | Maintains background audio capture/playback capability; must be enabled for all iOS versions |
|
|
25
|
+
| `Voice over IP` | Background Modes capability | Supports VoIP background execution; must be enabled for **all versions**, not just iOS 18+ |
|
|
26
|
+
| `Remote notifications` (optional) | Background Modes capability | For receiving offline push notifications; not required for audio keep-alive |
|
|
27
|
+
| `AVAudioSession.Category.playAndRecord` | Audio session category | Supports simultaneous playback and recording; must be set **manually** before the call — the SDK does not configure this automatically |
|
|
28
|
+
| `.allowBluetooth` / `.allowBluetoothA2DP` | Audio session options | Enables Bluetooth headset and high-quality Bluetooth audio (A2DP) support |
|
|
29
|
+
| `MethodChannel` | Flutter-native communication bridge | `AVAudioSession` configuration must be done in the native Swift/ObjC layer; Flutter triggers it via MethodChannel |
|
|
30
|
+
|
|
31
|
+
## 3. Flow
|
|
32
|
+
|
|
33
|
+
App goes to background / screen locked -> iOS restricts background microphone/speaker access -> If not configured, call audio is interrupted (remote participant cannot hear local audio) -> Check: verify Background Modes has `Audio, AirPlay, and Picture in Picture` + `Voice over IP` enabled -> Identify: verify `AVAudioSession.setCategory(.playAndRecord)` and `setActive(true)` are called before the call starts -> Fix: declare Background Modes in Xcode + configure `AVAudioSession` in native layer + trigger via Flutter `MethodChannel` -> Verify: call audio continues after going to background / locking screen; `Info.plist` contains `audio` / `voip` in `UIBackgroundModes`.
|
|
34
|
+
|
|
35
|
+
## 4. Standard Usage
|
|
36
|
+
|
|
37
|
+
1. In Xcode, open the project, select `Target` > `Signing & Capabilities` > `+ Capability`, search for and add `Background Modes`. Check `Audio, AirPlay, and Picture in Picture` and `Voice over IP` (`Remote notifications` is optional, for offline push). After configuration, `Info.plist` will automatically contain:
|
|
38
|
+
|
|
39
|
+
``` xml
|
|
40
|
+
<key>UIBackgroundModes</key>
|
|
41
|
+
<array>
|
|
42
|
+
<string>audio</string>
|
|
43
|
+
<string>voip</string>
|
|
44
|
+
</array>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
2. Implement the audio session configuration method in the iOS native layer (Swift). Call it before the call starts (in the call view's `viewDidLoad`, before initiating `calls`, or before accepting `accept`):
|
|
48
|
+
|
|
49
|
+
``` swift
|
|
50
|
+
import AVFoundation
|
|
51
|
+
|
|
52
|
+
func setupAudioSessionForCall() {
|
|
53
|
+
let audioSession = AVAudioSession.sharedInstance()
|
|
54
|
+
do {
|
|
55
|
+
// .playAndRecord: supports simultaneous playback and recording
|
|
56
|
+
// .allowBluetooth / .allowBluetoothA2DP: supports Bluetooth headset and high-quality Bluetooth audio
|
|
57
|
+
try audioSession.setCategory(.playAndRecord, options: [.allowBluetooth, .allowBluetoothA2DP])
|
|
58
|
+
try audioSession.setActive(true)
|
|
59
|
+
} catch {
|
|
60
|
+
// Audio session configuration failed
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
3. Register a `MethodChannel` on the Flutter side. Call the native `setupAudioSessionForCall()` when a call starts (`calls` / `accept` succeeds). When the call ends, you can restore or deactivate `AVAudioSession` to avoid affecting other audio scenarios.
|
|
66
|
+
|
|
67
|
+
4. You do not need to integrate the iOS `CallKit` framework to achieve the above background audio keep-alive. If you later need system incoming call UI / lock-screen answer capabilities, that requires additional `CallKit` integration (a separate capability, not a prerequisite for background keep-alive).
|
|
68
|
+
|
|
69
|
+
## 5. Verification
|
|
70
|
+
|
|
71
|
+
- After going to background or locking the screen, call audio capture/playback is not interrupted; the remote participant can still hear the local audio.
|
|
72
|
+
- `Info.plist` correctly contains `audio` and `voip` in `UIBackgroundModes`.
|
|
73
|
+
- Background audio keep-alive works correctly even without integrating `CallKit`.
|
|
74
|
+
|
|
75
|
+
## 6. Common Mistakes
|
|
76
|
+
|
|
77
|
+
- Mistake 1: Assuming TUICallKit Flutter/iOS SDK has built-in `AVAudioSession` configuration. In reality, the SDK does not configure this automatically; developers must explicitly call `setCategory` / `setActive` in the native layer.
|
|
78
|
+
- Mistake 2: Confusing "call audio background keep-alive" with "Picture-in-Picture (PiP) camera background capture". Applying for the `com.apple.developer.avfoundation.multitasking-camera-access` entitlement for a voice/video call — this entitlement is only for **camera video** background capture in PiP scenarios and is unrelated to audio call keep-alive. Regular calls do not need it.
|
|
79
|
+
- Mistake 3: Thinking `Voice over IP` only needs to be checked on iOS 18+. In fact, the three Background Modes items are not iOS-version-specific — all versions (iOS 15+) require the same configuration.
|
|
80
|
+
|
|
81
|
+
## 7. Problem Definition (Search Anchor)
|
|
82
|
+
|
|
83
|
+
Flutter TUICallKit iOS call audio interrupted when app goes to background or screen is locked. Whether Background Modes and AVAudioSession configuration is required. Whether CallKit integration is needed. Difference from the Picture-in-Picture approach.
|
|
84
|
+
|
|
85
|
+
## 8. Alternative Phrasings (Search Recall)
|
|
86
|
+
|
|
87
|
+
- TUICallKit Flutter iOS no sound after going to background?
|
|
88
|
+
- Flutter iOS call audio stops when screen is locked?
|
|
89
|
+
- Can voice calls stay alive in background without CallKit?
|
|
90
|
+
- How to configure AVAudioSession playAndRecord for background audio capture?
|
|
91
|
+
|
|
92
|
+
## 9. References (Optional)
|
|
93
|
+
- Tencent Cloud TRTC iOS Picture-in-Picture documentation (the actual use case for `multitasking-camera-access` entitlement): `https://cloud.tencent.com/document/product/647/128652`
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TUICallKit Flutter iOS Startup Crash Troubleshooting (Minimum OS Version, Release Symbol Stripping, VoIP PushKit Applicability)
|
|
3
|
+
product: call
|
|
4
|
+
frameworks: [flutter, ios]
|
|
5
|
+
scope: platform_specific
|
|
6
|
+
tags: [TUICallKit, Flutter, iOS, crash, startup crash, tencent_calls_uikit, PushKit, CallKit, VoIP, symbol not found, minimum OS version]
|
|
7
|
+
version_range: ">=2.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TUICallKit Flutter iOS Startup Crash Troubleshooting (Minimum OS Version, Release Symbol Stripping, VoIP PushKit Applicability)
|
|
11
|
+
|
|
12
|
+
## 1. Key Takeaway
|
|
13
|
+
|
|
14
|
+
- Minimum OS version: The Flutter plugin `tencent_calls_uikit` officially requires iOS **12.0** or later. iOS 16 falls within this range and is natively compatible — no additional adaptation is needed.
|
|
15
|
+
- Flutter TUICallKit's **standard offline push solution does not integrate PushKit VoIP**. It only provides APNs regular push (data message). Therefore, the iOS 13+ rule of "app gets killed if a VoIP push is received without reporting to CallKit" **does not apply** to standard integrations that have not been custom-extended.
|
|
16
|
+
- The most common real cause of Flutter TUICallKit iOS startup crashes: **Xcode symbol stripping optimization in Release builds incorrectly removes TRTC C symbols**, resulting in `symbol not found`. This is unrelated to VoIP/PushKit/CallKit.
|
|
17
|
+
- If developers **additionally integrate PushKit VoIP on their own** (beyond the TUICallKit official standard solution), they must comply with Apple's mandatory rule: "after receiving a VoIP push, `reportNewIncomingCall` / `reportNewIncomingConversation` must be called immediately; otherwise the system will kill the app." This is the responsibility of the custom extension, not a built-in TUICallKit behavior.
|
|
18
|
+
|
|
19
|
+
## 2. Field Reference
|
|
20
|
+
|
|
21
|
+
| Field / Capability | Purpose | Notes |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `tencent_calls_uikit` | Flutter TUICallKit plugin package name | Officially requires iOS 12.0+. This is a different dependency level from `TXLiteAVSDK_Professional` (a separate library with podspec declaring iOS 8.0) — do not confuse the two |
|
|
24
|
+
| APNs (remote push) | Official offline push solution for Flutter TUICallKit | Implemented via the `tencent_cloud_chat_push` plugin; iOS side only involves APNs certificate configuration, not PushKit |
|
|
25
|
+
| PushKit VoIP | iOS native system-level incoming call push mechanism | Flutter TUICallKit **official documentation does not provide** this approach; only native iOS (Swift/ObjC) integration docs include it (based on `LiveCommunicationKit` / `CallKit`) |
|
|
26
|
+
| `reportNewIncomingCall` / `reportNewIncomingConversation` | Mandatory reporting interface after receiving VoIP push | Only required when **PushKit VoIP is registered**; failure to report within 5 seconds causes a system kill. Not applicable to standard Flutter solutions that have not integrated PushKit |
|
|
27
|
+
| Deployment Postprocessing / Strip Style | Xcode Build Settings options | Used to prevent Release builds from incorrectly stripping TRTC FFI-related C symbols — this is the known real cause of Flutter TUICallKit crashes |
|
|
28
|
+
|
|
29
|
+
## 3. Flow
|
|
30
|
+
|
|
31
|
+
App launches or receives a call-related event -> Crash / fails to launch -> Troubleshooting direction 1: Check if this is a **Release build** without symbol stripping settings configured -> If so, TRTC C symbols were incorrectly removed causing `symbol not found` -> Fix: set `Deployment Postprocessing = Yes` + `Strip Style = Non-Global Symbols` -> Verify: Release build runs normally without crashes.
|
|
32
|
+
|
|
33
|
+
Troubleshooting direction 2 (only applicable when the project has **additionally self-integrated PushKit VoIP**): VoIP push received -> `reportNewIncomingCall` / `reportNewIncomingConversation` not called within 5 seconds -> System forcefully kills the app -> Fix: report immediately in the `PKPushRegistryDelegate`'s `didReceiveIncomingPushWith` callback.
|
|
34
|
+
|
|
35
|
+
## 4. Standard Usage
|
|
36
|
+
|
|
37
|
+
1. Confirm the project's `tencent_calls_uikit` dependency version and target device OS version: iOS 12.0 and above are officially supported. iOS 16 requires no special adaptation.
|
|
38
|
+
2. If a `symbol not found` crash occurs when running the iOS Release build, in Xcode's `Build Settings`:
|
|
39
|
+
- Set **Deployment Postprocessing** to **Yes**.
|
|
40
|
+
- Set **Strip Style** (Release configuration) to **Non-Global Symbols**.
|
|
41
|
+
3. If the business only needs standard offline incoming call notification capability, integrate the **APNs** solution following the official Flutter `tencent_cloud_chat_push` plugin documentation. There is **no need** to additionally integrate PushKit VoIP (the official Flutter solution does not provide this capability).
|
|
42
|
+
4. If the business has a strong requirement to achieve system-level VoIP incoming call experience on Flutter iOS (e.g., system incoming call UI when the screen is locked / process is killed), developers must implement a custom native bridge (`MethodChannel` + native Swift layer referencing the iOS native CallKit/PushKit integration guide) and strictly comply with the "report within 5 seconds" rule to avoid crashes. This is a custom extension, not a built-in TUICallKit Flutter capability.
|
|
43
|
+
|
|
44
|
+
## 5. Verification
|
|
45
|
+
|
|
46
|
+
- On iOS 16 (and other versions above 12.0), TUICallKit Flutter starts, logs in, and makes/receives calls normally with no OS compatibility issues.
|
|
47
|
+
- No `symbol not found` crash occurs when running the Release build.
|
|
48
|
+
- Standard projects that have not additionally integrated PushKit will not be killed by the system due to the "VoIP push not reported" rule (because the standard solution has not registered PushKit VoIP, this rule is not triggered).
|
|
49
|
+
|
|
50
|
+
## 6. Common Mistakes
|
|
51
|
+
|
|
52
|
+
- Mistake 1: Confusing the version requirements of the underlying library `TXLiteAVSDK_Professional` with the Flutter plugin `tencent_calls_uikit`. They are different dependency levels and should be verified separately.
|
|
53
|
+
- Mistake 2: Believing the most common cause of Flutter TUICallKit iOS startup crashes is "PushKit VoIP not reported to CallKit". The official Flutter standard solution has not integrated PushKit VoIP, so this rule does not apply to standard integrations. The actual most common cause is `symbol not found` due to Release symbol stripping.
|
|
54
|
+
- Mistake 3: Thinking you can directly call native iOS `CXProvider.reportNewIncomingCall` or `LiveCommunicationKit` APIs from the Flutter side. These are native Swift/ObjC APIs that cannot be called directly from Flutter — they must be implemented through a native bridge layer (and TUICallKit does not officially provide this bridge).
|
|
55
|
+
|
|
56
|
+
## 7. Problem Definition (Search Anchor)
|
|
57
|
+
|
|
58
|
+
Flutter TUICallKit iOS startup crash troubleshooting: minimum OS version requirement, iOS 16 compatibility, and whether PushKit VoIP CallKit reporting rules apply to standard Flutter integrations.
|
|
59
|
+
|
|
60
|
+
## 8. Alternative Phrasings (Search Recall)
|
|
61
|
+
|
|
62
|
+
- Flutter TUICallKit iOS won't open / crashes on startup — how to troubleshoot?
|
|
63
|
+
- Does tencent_calls_uikit support iOS 16?
|
|
64
|
+
- Does TUICallKit Flutter need PushKit VoIP integration?
|
|
65
|
+
- Flutter iOS Release build symbol not found — how to fix?
|
|
66
|
+
|
|
67
|
+
## 9. References (Optional)
|
|
68
|
+
- `tencent_calls_uikit` official minimum version requirement (iOS 12.0+): `https://pub.dev/packages/tencent_calls_uikit`
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
TUICallEngine API is the **No-UI interface** for the audio/video calling component. If TUICallKit's built-in interaction does not meet your needs, you can use this API to build a custom calling experience.
|
|
2
|
+
|
|
3
|
+
Due to mini program development limitations, you need to bindevents to `live-pusher` first. See [TUICallKit](https://cloud.tencent.com/document/product/647/78760) for details.
|
|
4
|
+
|
|
5
|
+
> **Note:**
|
|
6
|
+
> - To provide better audio/video communication capabilities, the original `@trtc/call-engine-lite-wx` package has been officially deprecated. Developers are advised to migrate to the new [@trtc/call-engine-lite-wx](https://www.npmjs.com/package/@trtc/call-engine-lite-wx) package.
|
|
7
|
+
> - The new package includes optimized API adjustments. Some legacy interfaces are no longer compatible, and cleaner, more stable new interfaces are provided.
|
|
8
|
+
|
|
9
|
+
## API Overview
|
|
10
|
+
|
|
11
|
+
### Instance Creation and Event Callbacks
|
|
12
|
+
|
|
13
|
+
| API | Description |
|
|
14
|
+
|---------|---------|
|
|
15
|
+
| [createInstance](#createInstance) | Create a TUICallEngine instance (static method) |
|
|
16
|
+
| [destroyInstance](#destroyInstance) | Destroy a TUICallEngine instance (static method) |
|
|
17
|
+
| [on](#on) | Register an event listener |
|
|
18
|
+
| [off](#off) | Unregister an event listener |
|
|
19
|
+
|
|
20
|
+
### Call Operation APIs
|
|
21
|
+
|
|
22
|
+
| API | Description |
|
|
23
|
+
|---------|---------|
|
|
24
|
+
| [calls](#calls) | Initiate a 1v1 call |
|
|
25
|
+
| [inviteUser](#inviteUser) | Invite other users to join a group call |
|
|
26
|
+
| [join](#join) | Actively join an ongoing group call |
|
|
27
|
+
| [accept](#accept) | Accept a call |
|
|
28
|
+
| [reject](#reject) | Reject a call |
|
|
29
|
+
| [hangup](#hangup) | Hang up a call |
|
|
30
|
+
|
|
31
|
+
### Device Control APIs
|
|
32
|
+
|
|
33
|
+
| API | Description |
|
|
34
|
+
|---------|---------|
|
|
35
|
+
| [openCamera](#openCamera) | Enable camera |
|
|
36
|
+
| [closeCamera](#closeCamera) | Disable camera |
|
|
37
|
+
| [switchCamera](#switchCamera) | Switch between front/rear camera |
|
|
38
|
+
| [openMicrophone](#openMicrophone) | Enable microphone |
|
|
39
|
+
| [closeMicrophone](#closeMicrophone) | Disable microphone |
|
|
40
|
+
| [selectAudioPlaybackDevice](#selectAudioPlaybackDevice) | Select audio playback device (earpiece/speaker) |
|
|
41
|
+
|
|
42
|
+
### Other APIs
|
|
43
|
+
|
|
44
|
+
| API | Description |
|
|
45
|
+
|---------|---------|
|
|
46
|
+
| [setSelfInfo](#setSelfInfo) | Set user avatar and nickname |
|
|
47
|
+
| [setLogLevel](#setLogLevel) | Set log level |
|
|
48
|
+
| [setBeautyLevel](#setBeautyLevel) | Set beauty filter level, supports disabling default beauty |
|
|
49
|
+
|
|
50
|
+
## API Details
|
|
51
|
+
``` javascript
|
|
52
|
+
import TUICallEngine, { TUICallEvent } from '@trtc/call-engine-lite-wx ';
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### createInstance
|
|
56
|
+
|
|
57
|
+
Create a TUICallEngine singleton instance.
|
|
58
|
+
``` javascript
|
|
59
|
+
wx.$TUICallEngine = TUICallEngine.createInstance({
|
|
60
|
+
tim,
|
|
61
|
+
sdkAppID,
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Parameters**
|
|
66
|
+
|
|
67
|
+
| Parameter | Type | Description | Required |
|
|
68
|
+
|---------|---------|---------|---------|
|
|
69
|
+
| sdkAppID | Number | The SDKAppID used by Tencent Cloud to identify customers | Yes |
|
|
70
|
+
| tim | ChatSDK | TIM instance | No |
|
|
71
|
+
|
|
72
|
+
### destroyInstance
|
|
73
|
+
|
|
74
|
+
Destroy the TUICallEngine singleton instance.
|
|
75
|
+
``` javascript
|
|
76
|
+
TUICallEngine.destroyInstance();
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### on
|
|
80
|
+
|
|
81
|
+
Register an event listener to listen for all TUICallEngine events.
|
|
82
|
+
``` javascript
|
|
83
|
+
let handleNewInvitationReceived = function(event) {
|
|
84
|
+
// Received an invitation
|
|
85
|
+
};
|
|
86
|
+
wx.$TUICallEngine.on(TUICallEvent.ON_CALL_RECEIVED, handleNewInvitationReceived, this);
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Parameters**
|
|
90
|
+
|
|
91
|
+
| Parameter | Type | Description | Required |
|
|
92
|
+
|---------|---------|---------|---------|
|
|
93
|
+
| eventName | TUICallEvent | Event name | Yes |
|
|
94
|
+
| handler | Function | Event callback function | Yes |
|
|
95
|
+
| context | Any | Current execution context (this) | Yes |
|
|
96
|
+
|
|
97
|
+
### off
|
|
98
|
+
|
|
99
|
+
Remove an event listener.
|
|
100
|
+
``` javascript
|
|
101
|
+
let handleNewInvitationReceived = function(event) {
|
|
102
|
+
// Received an invitation
|
|
103
|
+
};
|
|
104
|
+
wx.$TUICallEngine.off(TUICallEvent.ON_CALL_RECEIVED, handleNewInvitationReceived);
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Parameters**
|
|
108
|
+
|
|
109
|
+
| Parameter | Type | Description | Required |
|
|
110
|
+
|---------|---------|---------|---------|
|
|
111
|
+
| eventName | TUICallEvent | Event name | Yes |
|
|
112
|
+
| handler | Function | Event callback function | Yes |
|
|
113
|
+
|
|
114
|
+
### login
|
|
115
|
+
|
|
116
|
+
Login interface.
|
|
117
|
+
``` javascript
|
|
118
|
+
const params = {
|
|
119
|
+
userID: 'john', // Your user ID
|
|
120
|
+
userSig: 'xxxx', // Signature
|
|
121
|
+
};
|
|
122
|
+
let promise = wx.$TUICallEngine.login(params);
|
|
123
|
+
promise.then(() => {
|
|
124
|
+
//success
|
|
125
|
+
}).catch(error => {
|
|
126
|
+
console.warn('login error:', error);
|
|
127
|
+
});
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Parameters:**
|
|
131
|
+
|
|
132
|
+
| Parameter | Type | Description | Required |
|
|
133
|
+
|---------|---------|---------|---------|
|
|
134
|
+
| userID | String | Current user ID. String type, only allows letters (a-z, A-Z), digits (0-9), hyphens (-), and underscores (_) | Yes |
|
|
135
|
+
| userSig | String | Tencent Cloud security signature. See [How to Calculate UserSig](https://cloud.tencent.com/document/product/647/17275) for details. | Yes |
|
|
136
|
+
|
|
137
|
+
### logout
|
|
138
|
+
|
|
139
|
+
Logout interface.
|
|
140
|
+
``` javascript
|
|
141
|
+
let promise = wx.$TUICallEngine.logout();
|
|
142
|
+
promise.then(() => {
|
|
143
|
+
// logout success
|
|
144
|
+
}).catch(error => {
|
|
145
|
+
console.warn('logout error:', error);
|
|
146
|
+
});
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### calls
|
|
150
|
+
|
|
151
|
+
Initiate a single or multi-party call.
|
|
152
|
+
|
|
153
|
+
> **Note**
|
|
154
|
+
> Offline push is only supported on mobile terminals (Android or iOS). Web and WeChat Mini Programs do not support it.
|
|
155
|
+
>
|
|
156
|
+
|
|
157
|
+
``` javascript
|
|
158
|
+
import { CallMediaType } from '@trtc/call-engine-lite-wx';
|
|
159
|
+
let promise = wx.$TUICallEngine.groupCall({
|
|
160
|
+
userIDList: ['user1', 'user2'],
|
|
161
|
+
type: CallMediaType.AUDIO,
|
|
162
|
+
});
|
|
163
|
+
promise.then(() => {
|
|
164
|
+
// groupCall success
|
|
165
|
+
}).catch(error => {
|
|
166
|
+
console.warn('groupCall error:', error);
|
|
167
|
+
});
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Parameters:**
|
|
171
|
+
|
|
172
|
+
| Parameter | Type | Description | Required |
|
|
173
|
+
|---------|---------|---------|---------|
|
|
174
|
+
| userIDList | Array\<String\> | List of callee userIDs | Yes |
|
|
175
|
+
| type | [CallMediaType](https://cloud.tencent.com/document/product/647/78759#CallMediaType) | Call media type | Yes |
|
|
176
|
+
| chatGroupID | String | IM group ID when used with Chat | Yes |
|
|
177
|
+
| timeout | Number | Timeout in seconds | No |
|
|
178
|
+
| roomID | Number | Audio/video room ID for this call. Currently only numeric room IDs are supported; string room IDs will be supported in future versions | No |
|
|
179
|
+
| userData | String | Extension field: used to add extra information in the invitation signaling | No |
|
|
180
|
+
|
|
181
|
+
### inviteUser
|
|
182
|
+
|
|
183
|
+
Invite users to join the current group call.
|
|
184
|
+
|
|
185
|
+
Use case: When a user in an ongoing group call wants to invite others to join.
|
|
186
|
+
``` javascript
|
|
187
|
+
const userIDList = ['jack', 'john'];
|
|
188
|
+
const params = {
|
|
189
|
+
userIDList
|
|
190
|
+
};
|
|
191
|
+
wx.$TUICallEngine.inviteUser(params).then(() => {
|
|
192
|
+
// success
|
|
193
|
+
}).catch(error => {
|
|
194
|
+
console.error('inviteUser error:', error);
|
|
195
|
+
});
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Parameters:**
|
|
199
|
+
|
|
200
|
+
| Parameter | Type | Description | Required |
|
|
201
|
+
|---------|---------|---------|---------|
|
|
202
|
+
| params | Object | Invite parameters | Yes |
|
|
203
|
+
| params.userIDList | Array\<String\> | List of callee userIDs | Yes |
|
|
204
|
+
|
|
205
|
+
### join
|
|
206
|
+
|
|
207
|
+
Actively join an ongoing group call.
|
|
208
|
+
``` javascript
|
|
209
|
+
const params = { callId: xxx };
|
|
210
|
+
wx.$TUICallEngine.join(params).then(() => {
|
|
211
|
+
// success
|
|
212
|
+
}).catch(error => {
|
|
213
|
+
console.error('join error:', error);
|
|
214
|
+
});
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Parameters:**
|
|
218
|
+
|
|
219
|
+
| Parameter | Type | Description | Required |
|
|
220
|
+
|---------|---------|---------|---------|
|
|
221
|
+
| params | Object | Join parameters | Yes |
|
|
222
|
+
| params.callId | String | Unique ID of this call | Yes |
|
|
223
|
+
|
|
224
|
+
### accept
|
|
225
|
+
|
|
226
|
+
Accept the current call. When you receive the `EVENT.ON_CALL_RECEIVED` event callback as the callee, call this method to accept the incoming call.
|
|
227
|
+
``` javascript
|
|
228
|
+
wx.$TUICallEngine.on(TUICallEvent.ON_CALL_RECEIVED, () => {
|
|
229
|
+
wx.$TUICallEngine.accept().promise.then(() => {
|
|
230
|
+
// accept success
|
|
231
|
+
}).catch(error => {
|
|
232
|
+
console.warn('accept error:', error);
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### reject
|
|
238
|
+
|
|
239
|
+
Reject the current call. When you receive the `EVENT.ON_CALL_RECEIVED` callback as the callee, call this method to reject the incoming call.
|
|
240
|
+
``` javascript
|
|
241
|
+
wx.$TUICallEngine.on(TUICallEvent.ON_CALL_RECEIVED, () => {
|
|
242
|
+
wx.$TUICallEngine.reject().then(() => {
|
|
243
|
+
// reject success
|
|
244
|
+
}).catch(error => {
|
|
245
|
+
console.warn('reject error:', error);
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### hangup
|
|
251
|
+
|
|
252
|
+
Hang up the current call. Call this method to end the call when you are in an ongoing call.
|
|
253
|
+
``` javascript
|
|
254
|
+
wx.$TUICallEngine.hangup().then(() => {
|
|
255
|
+
// hangup success
|
|
256
|
+
}).catch(error => {
|
|
257
|
+
console.warn('hangup error:', error);
|
|
258
|
+
});
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### openCamera
|
|
262
|
+
|
|
263
|
+
Enable the camera.
|
|
264
|
+
``` javascript
|
|
265
|
+
wx.$TUICallEngine.openCamera().then(() => {
|
|
266
|
+
// openCamera success
|
|
267
|
+
}).catch(error => {
|
|
268
|
+
console.warn('openCamera error:', error);
|
|
269
|
+
});
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### closeCamera
|
|
273
|
+
|
|
274
|
+
Disable the camera. Other users in the call will receive a callback notification.
|
|
275
|
+
``` javascript
|
|
276
|
+
wx.$TUICallEngine.closeCamera().then(() => {
|
|
277
|
+
// closeCamera success
|
|
278
|
+
}).catch(error => {
|
|
279
|
+
console.warn('closeCamera error:', error);
|
|
280
|
+
});
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### switchCamera
|
|
284
|
+
|
|
285
|
+
Switch between front and rear cameras.
|
|
286
|
+
``` javascript
|
|
287
|
+
wx.$TUICallEngine.switchCamera().then(() => {
|
|
288
|
+
// switchCamera success
|
|
289
|
+
}).catch(error => {
|
|
290
|
+
console.warn('switchCamera error:', error);
|
|
291
|
+
});
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### openMicrophone
|
|
295
|
+
|
|
296
|
+
Enable the microphone. Other users in the call will receive a callback notification.
|
|
297
|
+
``` javascript
|
|
298
|
+
wx.$TUICallEngine.openMicrophone().then(() => {
|
|
299
|
+
// openMicrophone success
|
|
300
|
+
}).catch(error => {
|
|
301
|
+
console.warn('openMicrophone error:', error);
|
|
302
|
+
});
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### closeMicrophone
|
|
306
|
+
|
|
307
|
+
Disable the microphone. Other users in the call will receive a callback notification.
|
|
308
|
+
``` javascript
|
|
309
|
+
wx.$TUICallEngine.closeMicrophone().then(() => {
|
|
310
|
+
// closeMicrophone success
|
|
311
|
+
}).catch(error => {
|
|
312
|
+
console.warn('closeMicrophone error:', error);
|
|
313
|
+
});
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### selectAudioPlaybackDevice
|
|
317
|
+
|
|
318
|
+
Select the audio playback device. Currently supports earpiece and speaker. In a call scenario, use this to enable/disable hands-free mode.
|
|
319
|
+
``` javascript
|
|
320
|
+
wx.$TUICallEngine.selectAudioPlaybackDevice(AUDIO_PLAYBACK_DEVICE.EAR).then(() => {
|
|
321
|
+
// selectAudioPlaybackDevice success
|
|
322
|
+
}).catch(error => {
|
|
323
|
+
console.warn('selectAudioPlaybackDevice error:', error);
|
|
324
|
+
});
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
**Parameters:**
|
|
328
|
+
|
|
329
|
+
| Parameter | Type | Description | Required |
|
|
330
|
+
|---------|---------|---------|---------|
|
|
331
|
+
| type | [AUDIO_PLAYBACK_DEVICE](https://cloud.tencent.com/document/product/647/78759#AUDIO_PLAYBACK_DEVICE) | Speaker: AUDIO_PLAYBACK_DEVICE.SPEAKER<br>Earpiece: AUDIO_PLAYBACK_DEVICE.EAR | Yes |
|
|
332
|
+
|
|
333
|
+
### setSelfInfo
|
|
334
|
+
|
|
335
|
+
Set user avatar and nickname.
|
|
336
|
+
``` javascript
|
|
337
|
+
wx.$TUICallEngine.setSelfInfo("nickname", "avatar URL").then(() => {
|
|
338
|
+
// setSelfInfo success
|
|
339
|
+
}).catch(error => {
|
|
340
|
+
console.warn('setSelfInfo error:', error);
|
|
341
|
+
});
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
**Parameters:**
|
|
345
|
+
|
|
346
|
+
| Parameter | Type | Description |
|
|
347
|
+
|---------|---------|---------|
|
|
348
|
+
| nickName | String | Set nickname |
|
|
349
|
+
| avatar | String | Avatar URL |
|
|
350
|
+
|
|
351
|
+
### setLogLevel
|
|
352
|
+
|
|
353
|
+
Set the log level. Logs below the specified level will not be output.
|
|
354
|
+
``` javascript
|
|
355
|
+
wx.$TUICallEngine.setLogLevel(level)
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
**Parameters:**
|
|
359
|
+
| Parameter | Value | Description |
|
|
360
|
+
| --- | --- | --- |
|
|
361
|
+
| level | 0 | Normal level, verbose logs. Recommended during integration |
|
|
362
|
+
| | 1 | Release level, SDK outputs key information only. Recommended for production |
|
|
363
|
+
| | 2 | Warning level, SDK outputs only warnings and errors |
|
|
364
|
+
| | 3 | Error level, SDK outputs only errors |
|
|
365
|
+
| | 4 | No logs, SDK will not print any logs |
|
|
366
|
+
|
|
367
|
+
### setBeautyLevel
|
|
368
|
+
|
|
369
|
+
Set beauty filter level, supports disabling the default beauty filter.
|
|
370
|
+
``` javascript
|
|
371
|
+
const params = {
|
|
372
|
+
style: 0, // 0-smooth; 1-natural
|
|
373
|
+
beautyLevel: 5,
|
|
374
|
+
whitenessLevel: 6,
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
wx.$TUICallEngine.setBeautyLevel(params);
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
**Parameters:**
|
|
381
|
+
|
|
382
|
+
| Parameter | Type | Description |
|
|
383
|
+
|---------|---------|---------|
|
|
384
|
+
| style | number | Beauty skin smoothing mode. 0-smooth; 1-natural. Default: 0. |
|
|
385
|
+
| beautyLevel | number | Beauty level, range [0 - 9]. 0 means off, 1-9 higher value means stronger effect. |
|
|
386
|
+
| whitenessLevel | number | Whitening level, range [0 - 9]. 0 means off, 1-9 higher value means stronger effect. |
|