@tencent-rtc/mcp 1.3.3 → 1.3.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/package.json +1 -1
- package/resource/doc/chatuikit/android/features/theme.md +363 -0
- package/resource/doc/chatuikit/{android/client_api_Android.md → faq/android_sdk/client-api.md} +0 -2
- package/resource/doc/chatuikit/faq/common/product.md +8 -0
- package/resource/doc/chatuikit/faq/flutter_sdk/faq.md +53 -0
- package/resource/doc/chatuikit/{iOS/client_api_iOS.md → faq/ios_sdk/client-api.md} +0 -2
- package/resource/doc/chatuikit/flutter/features/theme.md +379 -0
- package/resource/doc/chatuikit/flutter/integration.md +413 -0
- package/resource/doc/chatuikit/flutter/workflow.md +941 -0
- package/resource/doc/chatuikit/iOS/features/theme.md +416 -0
- package/resource/doc/chatuikit/iOS/workflow.md +0 -0
- package/resource/doc/chatuikit/react/components/chat-setting.md +86 -0
- package/resource/doc/chatuikit/react/components/contact-list.md +1093 -0
- package/resource/doc/chatuikit/react/components/search.md +745 -0
- package/resource/doc/chatuikit/vue/components/chat-setting.md +64 -0
- package/resource/doc/chatuikit/vue/components/contact-list.md +679 -0
- package/resource/doc/chatuikit/vue/components/search.md +1384 -0
- package/resource/doc/livekit/live/android/workflow.md +137 -6
- package/resource/doc/livekit/live/ios/live-audience-list.md +339 -0
- package/resource/doc/livekit/live/ios/live-audio-effect.md +370 -0
- package/resource/doc/livekit/live/ios/live-barrage.md +517 -0
- package/resource/doc/livekit/live/ios/live-base-beauty.md +247 -0
- package/resource/doc/livekit/live/ios/live-co-guest-interaction.md +518 -0
- package/resource/doc/livekit/live/ios/live-gift.md +783 -0
- package/resource/doc/livekit/live/ios/live-host-interaction.md +815 -0
- package/resource/doc/livekit/live/ios/live-integration.md +931 -0
- package/resource/doc/livekit/live/ios/live-live-list.md +485 -0
- package/resource/doc/livekit/live/ios/workflow.md +454 -0
- package/resource/doc/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +87 -0
- package/resource/doc/rtcengine/web/plugin/21-advanced-auto-play-policy.md +87 -0
- package/resource/doc/rtcengine/web/plugin/22-advanced-audio-mixer.md +175 -0
- package/resource/doc/rtcengine/web/plugin/23-advanced-support-detection.md +221 -0
- package/resource/doc/rtcengine/web/plugin/24-advanced-network-quality.md +140 -0
- package/resource/doc/rtcengine/web/plugin/25-advanced-device-change.md +99 -0
- package/resource/doc/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +451 -0
- package/resource/doc/rtcengine/web/plugin/27-advanced-small-stream.md +151 -0
- package/resource/doc/rtcengine/web/plugin/28-advanced-beauty.md +322 -0
- package/resource/doc/rtcengine/web/plugin/29-advanced-water-mark.md +149 -0
- package/resource/doc/rtcengine/web/plugin/30-advanced-cross-room-link.md +96 -0
- package/resource/doc/rtcengine/web/plugin/31-advanced-plugins-overview.md +330 -0
- package/resource/doc/rtcengine/web/plugin/34-advanced-proxy.md +248 -0
- package/resource/doc/rtcengine/web/plugin/35-advanced-ai-denoiser.md +81 -0
- package/resource/doc/rtcengine/web/plugin/36-advanced-virtual-background.md +242 -0
- package/resource/doc/rtcengine/web/plugin/37-advanced-voice-changer.md +99 -0
- package/resource/doc/rtcengine/web/plugin/39-advanced-video-decoder.md +33 -0
- package/resource/doc/rtcengine/web/plugin/40-advanced-video-mixer.md +379 -0
- package/resource/doc/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +91 -0
- package/resource/doc/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +315 -0
- package/resource/doc/rtcengine/web/plugin/43-advanced-face-detection.md +180 -0
- package/tools/chat/get-native-chat-feature-detail.js +30 -0
- package/tools/chat/get-native-chat-feature-detail.js.map +1 -0
- package/tools/chat/get-native-chat-integration.js +30 -12
- package/tools/chat/get-native-chat-integration.js.map +1 -1
- package/tools/common/get-faq.js +2 -4
- package/tools/common/get-faq.js.map +1 -1
- package/tools/definitions/get_native_chat_feature_detail_def.js +32 -0
- package/tools/definitions/get_native_chat_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_native_chat_uikit_integration_def.js +19 -7
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/{get_native_live_extra_features_def.js → get_native_live_uikit_extra_features_def.js} +3 -3
- package/tools/definitions/get_native_live_uikit_extra_features_def.js.map +1 -0
- package/tools/definitions/{get_native_live_interaction_def.js → get_native_live_uikit_interaction_def.js} +3 -3
- package/tools/definitions/get_native_live_uikit_interaction_def.js.map +1 -0
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js +49 -10
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +1 -1
- package/tools/definitions/record_prompt_def.js +42 -11
- package/tools/definitions/record_prompt_def.js.map +1 -1
- package/tools/definitions/record_result_def.js +1 -1
- package/tools/index.js +6 -4
- package/tools/index.js.map +1 -1
- package/tools/live/{get_native_live_extra_features.js → get_native_live_uikit_extra_features.js} +4 -4
- package/tools/live/get_native_live_uikit_extra_features.js.map +1 -0
- package/tools/live/{get_native_live_interaction.js → get_native_live_uikit_interaction.js} +4 -4
- package/tools/live/get_native_live_uikit_interaction.js.map +1 -0
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js.map +1 -1
- package/tools/rtcengine/get-trtc-sdk-faq.js +32 -0
- package/tools/rtcengine/get-trtc-sdk-faq.js.map +1 -0
- package/tools/rtcengine/get-trtc-web-sdk-faq.js +1 -1
- package/tools/rtcengine/get-trtc-web-sdk-integration.js.map +1 -1
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js +45 -0
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js.map +1 -0
- package/utils/handle-component-name.js +0 -16
- package/utils/handle-component-name.js.map +1 -1
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/doc/chatuikit/android/generate_UserSig.md +0 -306
- package/resource/doc/chatuikit/android/integrarte_only_tuichat_Android.md +0 -290
- package/resource/doc/chatuikit/android/quick_start_Android.md +0 -138
- package/resource/doc/chatuikit/android/show_typing_Android.md +0 -43
- package/resource/doc/chatuikit/flutter/generate_UserSig.md +0 -306
- package/resource/doc/chatuikit/flutter/integrate_tuikit_Flutter.md +0 -133
- package/resource/doc/chatuikit/iOS/generate_UserSig.md +0 -306
- package/resource/doc/chatuikit/iOS/integrate_only_tuichat_iOS.md +0 -748
- package/resource/doc/chatuikit/iOS/quick_start_iOS.md +0 -163
- package/resource/doc/chatuikit/iOS/show_typing_iOS.md +0 -52
- package/tools/definitions/get_native_live_extra_features_def.js.map +0 -1
- package/tools/definitions/get_native_live_interaction_def.js.map +0 -1
- package/tools/live/get_native_live_extra_features.js.map +0 -1
- package/tools/live/get_native_live_interaction.js.map +0 -1
- /package/resource/doc/chatuikit/android/{integrate_tuikit_Android.md → integration.md} +0 -0
- /package/resource/doc/chatuikit/{faq/native_sdk/faq.md → android/workflow.md} +0 -0
- /package/resource/doc/chatuikit/{flutter/client_api_Flutter.md → faq/flutter_sdk/client-api.md} +0 -0
- /package/resource/doc/chatuikit/iOS/{integrate_tuikit_iOS.md → integration.md} +0 -0
- /package/resource/doc/chatuikit/react/components/{chatheader.md → chat-header.md} +0 -0
- /package/resource/doc/chatuikit/vue/components/{chatheader.md → chat-header.md} +0 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
This document provides guidance on integrating audio effect controls into your live streaming application using the `AudioEffectStore` and `DeviceStore` modules from the **AtomicXCore** framework. These modules enable features such as microphone volume control, ear monitoring, and a variety of voice changing and reverb effects.
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Core Features
|
|
7
|
+
|
|
8
|
+
By combining `AudioEffectStore` and `DeviceStore`, you can implement the following core features:
|
|
9
|
+
- **Microphone Volume Adjustment**: Control the local microphone (capture) volume, which determines the volume your audience hears.
|
|
10
|
+
|
|
11
|
+
- **Ear Monitoring**: Allow hosts or co-hosts to hear their own voice in real time through headphones for monitoring and pronunciation correction.
|
|
12
|
+
|
|
13
|
+
- **Voice Effects**: Apply various voice changing effects, such as "Little Girl", "Deep Male", "Naughty Child", and more.
|
|
14
|
+
|
|
15
|
+
- **Reverb Effects**: Simulate different acoustic environments, such as KTV, metallic, deep, bright, and others.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Core Concepts
|
|
19
|
+
<table>
|
|
20
|
+
<tr>
|
|
21
|
+
<td rowspan="1" colSpan="1" >**Core Concept**</td>
|
|
22
|
+
|
|
23
|
+
<td rowspan="1" colSpan="1" >**Type**</td>
|
|
24
|
+
|
|
25
|
+
<td rowspan="1" colSpan="1" >**Core Responsibility & Description**</td>
|
|
26
|
+
</tr>
|
|
27
|
+
|
|
28
|
+
<tr>
|
|
29
|
+
<td rowspan="1" colSpan="1" >`AudioChangerType`</td>
|
|
30
|
+
|
|
31
|
+
<td rowspan="1" colSpan="1" >`enum`</td>
|
|
32
|
+
|
|
33
|
+
<td rowspan="1" colSpan="1" >Enumerates available voice changing effects, such as "child", "man", etc.</td>
|
|
34
|
+
</tr>
|
|
35
|
+
|
|
36
|
+
<tr>
|
|
37
|
+
<td rowspan="1" colSpan="1" >`AudioReverbType`</td>
|
|
38
|
+
|
|
39
|
+
<td rowspan="1" colSpan="1" >`enum`</td>
|
|
40
|
+
|
|
41
|
+
<td rowspan="1" colSpan="1" >Enumerates available reverb effects, such as "ktv", "hall", etc.</td>
|
|
42
|
+
</tr>
|
|
43
|
+
|
|
44
|
+
<tr>
|
|
45
|
+
<td rowspan="1" colSpan="1" >`AudioEffectState`</td>
|
|
46
|
+
|
|
47
|
+
<td rowspan="1" colSpan="1" >`struct`</td>
|
|
48
|
+
|
|
49
|
+
<td rowspan="1" colSpan="1" >Represents the current state of the audio effect module, typically used for UI rendering. Includes voice changing effect state, reverb state, ear monitoring enabled state, and ear monitor volume.</td>
|
|
50
|
+
</tr>
|
|
51
|
+
|
|
52
|
+
<tr>
|
|
53
|
+
<td rowspan="1" colSpan="1" >`AudioEffectStore`</td>
|
|
54
|
+
|
|
55
|
+
<td rowspan="1" colSpan="1" >`class`</td>
|
|
56
|
+
|
|
57
|
+
<td rowspan="1" colSpan="1" >Singleton data management class for audio effects. Use it to invoke audio effect APIs. After calling an API, the corresponding state property is automatically updated. Subscribe to this reactive state to receive and monitor updates.</td>
|
|
58
|
+
</tr>
|
|
59
|
+
|
|
60
|
+
<tr>
|
|
61
|
+
<td rowspan="1" colSpan="1" >`DeviceState`</td>
|
|
62
|
+
|
|
63
|
+
<td rowspan="1" colSpan="1" >`struct`</td>
|
|
64
|
+
|
|
65
|
+
<td rowspan="1" colSpan="1" >Represents the current state of the device module, typically used for UI rendering. Core properties include camera and microphone status.</td>
|
|
66
|
+
</tr>
|
|
67
|
+
|
|
68
|
+
<tr>
|
|
69
|
+
<td rowspan="1" colSpan="1" >`DeviceStore`</td>
|
|
70
|
+
|
|
71
|
+
<td rowspan="1" colSpan="1" >`class`</td>
|
|
72
|
+
|
|
73
|
+
<td rowspan="1" colSpan="1" >Singleton data management class for device operations. Use it to control the camera and microphone. After calling an API, the corresponding state property is automatically updated. Subscribe to this reactive state to receive and monitor updates.</td>
|
|
74
|
+
</tr>
|
|
75
|
+
</table>
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## Implementation
|
|
79
|
+
|
|
80
|
+
### Step 1: Component Integration
|
|
81
|
+
- **Video Live Streaming**: Please refer to [Quick Start](https://write.woa.com/document/194571606121816064) to integrate **AtomicXCore**.
|
|
82
|
+
|
|
83
|
+
- **Voice Chat Room**: Please refer to [Quick Start](https://write.woa.com/document/194571595685527552) to integrate **AtomicXCore**.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Step 2: Obtain Store Instances
|
|
87
|
+
|
|
88
|
+
`AudioEffectStore` and `DeviceStore` are singleton objects. Access their instances via the shared property anywhere in your project. For a complete implementation example, see [AudioEffectView.swift](https://github.com/Tencent-RTC/TUIKit_iOS/blob/main/live/Sources/Component/AudioEffect/AudioEffectView.swift) in the `TUILiveKit` open-source UI demo project.
|
|
89
|
+
``` swift
|
|
90
|
+
import UIKit
|
|
91
|
+
import AtomicXCore
|
|
92
|
+
import Combine
|
|
93
|
+
|
|
94
|
+
let audioEffectStore = AudioEffectStore.shared
|
|
95
|
+
let deviceStore = DeviceStore.shared
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Step 3: Implement In-ear Monitoring
|
|
99
|
+
|
|
100
|
+
In-ear monitoring allows users to hear their microphone audio in real time. Manage in-ear monitoring by calling the interfaces described below.
|
|
101
|
+
|
|
102
|
+
> **Note:**
|
|
103
|
+
>
|
|
104
|
+
|
|
105
|
+
> In-ear monitoring typically requires headphones to function properly.
|
|
106
|
+
>
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
#### Implementation
|
|
110
|
+
1. **Toggle Ear Monitoring**: Use a `UISwitch` control to enable or disable in-ear monitoring.
|
|
111
|
+
|
|
112
|
+
2. **Set Ear Monitor Volume**: Use a `UISlider` control to adjust the volume. Map the `UISlider` value to the range `[0, 150]` and call `setVoiceEarMonitorVolume(_:)`.
|
|
113
|
+
|
|
114
|
+
3. **Subscribe to State Updates**: Listen for real-time ear monitor state changes to update the UI.
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
#### Code Example
|
|
118
|
+
``` swift
|
|
119
|
+
// 1. Enable ear monitoring
|
|
120
|
+
audioEffectStore.setVoiceEarMonitorEnable(enable: true)
|
|
121
|
+
|
|
122
|
+
// 2. Adjust ear monitor volume
|
|
123
|
+
audioEffectStore.setVoiceEarMonitorVolume(volume: 80)
|
|
124
|
+
|
|
125
|
+
// 3. Disable ear monitoring
|
|
126
|
+
audioEffectStore.setVoiceEarMonitorEnable(enable: false)
|
|
127
|
+
|
|
128
|
+
// 4. Listen for state changes
|
|
129
|
+
audioEffectStore.state
|
|
130
|
+
.subscribe(StatePublisherSelector(keyPath: \AudioEffectState.earMonitorVolume))
|
|
131
|
+
.removeDuplicates()
|
|
132
|
+
.sink { currentVolume in
|
|
133
|
+
print("Ear monitor volume: \(currentVolume)")
|
|
134
|
+
valueLabel.text = "\(currentVolume)" // Update UILabel to display the value
|
|
135
|
+
}
|
|
136
|
+
.store(in: &cancellables)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
#### setVoiceEarMonitorEnable Parameters
|
|
140
|
+
<table>
|
|
141
|
+
<tr>
|
|
142
|
+
<td rowspan="1" colSpan="1" >**Parameter Name**</td>
|
|
143
|
+
|
|
144
|
+
<td rowspan="1" colSpan="1" >**Type**</td>
|
|
145
|
+
|
|
146
|
+
<td rowspan="1" colSpan="1" >**Description**</td>
|
|
147
|
+
</tr>
|
|
148
|
+
|
|
149
|
+
<tr>
|
|
150
|
+
<td rowspan="1" colSpan="1" >`enable`</td>
|
|
151
|
+
|
|
152
|
+
<td rowspan="1" colSpan="1" >`Bool`</td>
|
|
153
|
+
|
|
154
|
+
<td rowspan="1" colSpan="1" >Whether to enable ear monitoring.<br>- true: Enable<br>- false: Disable</td>
|
|
155
|
+
</tr>
|
|
156
|
+
</table>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
#### setVoiceEarMonitorVolume Parameters
|
|
160
|
+
<table>
|
|
161
|
+
<tr>
|
|
162
|
+
<td rowspan="1" colSpan="1" >**Parameter Name**</td>
|
|
163
|
+
|
|
164
|
+
<td rowspan="1" colSpan="1" >**Type**</td>
|
|
165
|
+
|
|
166
|
+
<td rowspan="1" colSpan="1" >**Description**</td>
|
|
167
|
+
</tr>
|
|
168
|
+
|
|
169
|
+
<tr>
|
|
170
|
+
<td rowspan="1" colSpan="1" >`volume`</td>
|
|
171
|
+
|
|
172
|
+
<td rowspan="1" colSpan="1" >`Int`</td>
|
|
173
|
+
|
|
174
|
+
<td rowspan="1" colSpan="1" >Ear monitor volume.<br>- Value range: [0, 150]<br>- Default: 100</td>
|
|
175
|
+
</tr>
|
|
176
|
+
</table>
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
### Step 4: Implement Microphone Volume Adjustment
|
|
180
|
+
|
|
181
|
+
To adjust the microphone (capture) volume, call the `setCaptureVolume(volume:)` method of DeviceStore with the desired value.
|
|
182
|
+
|
|
183
|
+
#### Implementation
|
|
184
|
+
1. **Set Capture Volume**: Use a `UISlider` control to adjust the volume. Map the `UISlider` value to the range `[0, 150]` and call `setCaptureVolume(volume:)`.
|
|
185
|
+
|
|
186
|
+
2. **Subscribe to State Updates**: Listen for real-time volume state changes to update the UI.
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
#### Code Example
|
|
190
|
+
``` swift
|
|
191
|
+
// 1. Adjust capture volume
|
|
192
|
+
deviceStore.setCaptureVolume(volume: 80)
|
|
193
|
+
|
|
194
|
+
// 2. Listen for state changes
|
|
195
|
+
deviceStore.state
|
|
196
|
+
.subscribe(StatePublisherSelector(keyPath: \DeviceState.captureVolume))
|
|
197
|
+
.removeDuplicates()
|
|
198
|
+
.sink { captureVolume in
|
|
199
|
+
print("Capture volume: \(captureVolume)")
|
|
200
|
+
valueLabel.text = "\(captureVolume)" // Update UILabel to display the value
|
|
201
|
+
}
|
|
202
|
+
.store(in: &cancellables)
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
#### setCaptureVolume Parameters
|
|
206
|
+
<table>
|
|
207
|
+
<tr>
|
|
208
|
+
<td rowspan="1" colSpan="1" >**Parameter Name**</td>
|
|
209
|
+
|
|
210
|
+
<td rowspan="1" colSpan="1" >**Type**</td>
|
|
211
|
+
|
|
212
|
+
<td rowspan="1" colSpan="1" >**Description**</td>
|
|
213
|
+
</tr>
|
|
214
|
+
|
|
215
|
+
<tr>
|
|
216
|
+
<td rowspan="1" colSpan="1" >`volume`</td>
|
|
217
|
+
|
|
218
|
+
<td rowspan="1" colSpan="1" >`Int`</td>
|
|
219
|
+
|
|
220
|
+
<td rowspan="1" colSpan="1" >Microphone (capture) volume.<br>- Value range: [0, 150]<br>- Default: 100</td>
|
|
221
|
+
</tr>
|
|
222
|
+
</table>
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
### Step 5: Implement Voice Effects
|
|
226
|
+
|
|
227
|
+
To apply a voice changing effect, call the `setAudioChangerType(type:)` method and pass the desired enum value.
|
|
228
|
+
|
|
229
|
+
#### Code Example
|
|
230
|
+
``` swift
|
|
231
|
+
// Set voice changer effect to "child"
|
|
232
|
+
audioEffectStore.setAudioChangerType(type: .child)
|
|
233
|
+
// Disable voice changer effect
|
|
234
|
+
audioEffectStore.setAudioChangerType(type: .none)
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
#### setAudioChangerType Parameters
|
|
238
|
+
<table>
|
|
239
|
+
<tr>
|
|
240
|
+
<td rowspan="1" colSpan="1" >**Parameter Name**</td>
|
|
241
|
+
|
|
242
|
+
<td rowspan="1" colSpan="1" >**Type**</td>
|
|
243
|
+
|
|
244
|
+
<td rowspan="1" colSpan="1" >**Description**</td>
|
|
245
|
+
</tr>
|
|
246
|
+
|
|
247
|
+
<tr>
|
|
248
|
+
<td rowspan="1" colSpan="1" >`type`</td>
|
|
249
|
+
|
|
250
|
+
<td rowspan="1" colSpan="1" >`AudioChangerType`</td>
|
|
251
|
+
|
|
252
|
+
<td rowspan="1" colSpan="1" >Voice changer effect enumeration.</td>
|
|
253
|
+
</tr>
|
|
254
|
+
</table>
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
### Step 6: Implement Reverb Effects
|
|
258
|
+
|
|
259
|
+
To apply a reverb effect, call the `setAudioReverbType(type:) `method and pass the desired enum value.
|
|
260
|
+
``` swift
|
|
261
|
+
// Set reverb effect to "KTV"
|
|
262
|
+
audioEffectStore.setAudioReverbType(type: .ktv)
|
|
263
|
+
// Disable reverb effect
|
|
264
|
+
audioEffectStore.setAudioReverbType(type: .none)
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
#### setAudioReverbType Parameters
|
|
268
|
+
<table>
|
|
269
|
+
<tr>
|
|
270
|
+
<td rowspan="1" colSpan="1" >**Parameter Name**</td>
|
|
271
|
+
|
|
272
|
+
<td rowspan="1" colSpan="1" >**Type**</td>
|
|
273
|
+
|
|
274
|
+
<td rowspan="1" colSpan="1" >**Description**</td>
|
|
275
|
+
</tr>
|
|
276
|
+
|
|
277
|
+
<tr>
|
|
278
|
+
<td rowspan="1" colSpan="1" >`type`</td>
|
|
279
|
+
|
|
280
|
+
<td rowspan="1" colSpan="1" >`AudioReverbType`</td>
|
|
281
|
+
|
|
282
|
+
<td rowspan="1" colSpan="1" >Reverb effect enumeration.</td>
|
|
283
|
+
</tr>
|
|
284
|
+
</table>
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
### Step 7: Reset Audio Effect Settings
|
|
288
|
+
|
|
289
|
+
> **Note:**
|
|
290
|
+
>
|
|
291
|
+
|
|
292
|
+
> AudioEffectStore and DeviceStore are singletons, so audio effect and device settings apply globally. To prevent settings from one live room affecting others, reset the audio effect and device settings when the current live room ends.
|
|
293
|
+
>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
Reset audio effect settings in the following scenarios:
|
|
297
|
+
1. When the current live room ends.
|
|
298
|
+
|
|
299
|
+
2. To provide a "one-click restore" feature, call the store's `reset()` method.
|
|
300
|
+
|
|
301
|
+
``` swift
|
|
302
|
+
class YourMainViewController: UIViewController {
|
|
303
|
+
func reset() {
|
|
304
|
+
AudioEffectStore.shared.reset()
|
|
305
|
+
DeviceStore.shared.reset()
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## API Documentation
|
|
311
|
+
|
|
312
|
+
For detailed information on all public interfaces and properties of [AudioEffectStore](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/audioeffectstore), [DeviceStore](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/devicestore), and related classes, refer to the official API documentation for the [AtomicXCore](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore) framework.
|
|
313
|
+
<table>
|
|
314
|
+
<tr>
|
|
315
|
+
<td rowspan="1" colSpan="1" >**Store/Component**</td>
|
|
316
|
+
|
|
317
|
+
<td rowspan="1" colSpan="1" >**Description**</td>
|
|
318
|
+
|
|
319
|
+
<td rowspan="1" colSpan="1" >**API Reference**</td>
|
|
320
|
+
</tr>
|
|
321
|
+
|
|
322
|
+
<tr>
|
|
323
|
+
<td rowspan="1" colSpan="1" >DeviceStore</td>
|
|
324
|
+
|
|
325
|
+
<td rowspan="1" colSpan="1" >Controls audio/video devices: microphone (on/off, volume), camera (on/off, switch, quality), screen sharing, and real-time device status monitoring.</td>
|
|
326
|
+
|
|
327
|
+
<td rowspan="1" colSpan="1" >[API Documentation](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/devicestore)</td>
|
|
328
|
+
</tr>
|
|
329
|
+
|
|
330
|
+
<tr>
|
|
331
|
+
<td rowspan="1" colSpan="1" >AudioEffectStore</td>
|
|
332
|
+
|
|
333
|
+
<td rowspan="1" colSpan="1" >Audio effects: voice changing (child/male), reverb (KTV, etc.), ear monitoring adjustment, and real-time effect switching.</td>
|
|
334
|
+
|
|
335
|
+
<td rowspan="1" colSpan="1" >[API Documentation](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore/audioeffectstore)</td>
|
|
336
|
+
</tr>
|
|
337
|
+
</table>
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
## FAQs
|
|
341
|
+
|
|
342
|
+
### Are there any restrictions on when to call audio effect and device APIs?
|
|
343
|
+
|
|
344
|
+
No. `AudioEffectStore` and `DeviceStore` settings are globally effective. You can call relevant APIs (such as setting voice changing effects, reverb, or ear monitoring) at any time before or after entering a live room. Settings take effect immediately and persist.
|
|
345
|
+
|
|
346
|
+
### What is the difference between "Microphone Volume" and "Ear Monitor Volume"?
|
|
347
|
+
|
|
348
|
+
This is a common point of confusion:
|
|
349
|
+
- **Microphone Volume (Capture Volume)**: Set via `DeviceStore.setCaptureVolume()`. Controls the volume your audience hears.
|
|
350
|
+
|
|
351
|
+
- **Ear Monitor Volume**: Set via `AudioEffectStore.setVoiceEarMonitorVolume()`. It only determines the volume level you hear in your in-ear monitor and does not affect the audience.
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
### Why does a newly created live room already have audio effects, or why is the volume too high or too low?
|
|
355
|
+
|
|
356
|
+
Because `AudioEffectStore` and `DeviceStore` are singletons, audio effect and device settings are globally applied. If you previously set audio effects and did not reset them, those settings persist. Call the `reset()` method at the appropriate time to clear them.
|
|
357
|
+
|
|
358
|
+
### Why can't I hear my own voice after enabling "Ear Monitoring"?
|
|
359
|
+
|
|
360
|
+
Check the following:
|
|
361
|
+
1. **Are headphones connected?** Ear monitoring generally requires headphones. Ensure wired or Bluetooth headphones are connected.
|
|
362
|
+
|
|
363
|
+
2. **Is the ear monitor volume set to 0?** Check that the ear monitor volume is above 0.
|
|
364
|
+
|
|
365
|
+
3. **Is the microphone enabled?** Confirm that the microphone is enabled in DeviceStore (i.e., openLocalMicrophone has been called).
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
### Can voice effects and reverb be enabled at the same time?
|
|
369
|
+
|
|
370
|
+
Yes. `AudioChangerType` and `AudioReverbType` can be enabled simultaneously. For example, you can set both `AudioChangerType.LITTLE_GIRL`and `AudioReverbType.KTV` at the same time.
|