@spcsn/taro 0.1.0
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/README.md +12 -0
- package/dist/index.js +147 -0
- package/dist/index.js.map +1 -0
- package/index.js +9 -0
- package/package.json +86 -0
- package/types/api/ad/index.d.ts +197 -0
- package/types/api/ai/face.d.ts +133 -0
- package/types/api/ai/inference.d.ts +129 -0
- package/types/api/ai/visionkit.d.ts +874 -0
- package/types/api/alipay/index.d.ts +69 -0
- package/types/api/base/crypto.d.ts +104 -0
- package/types/api/base/debug.d.ts +329 -0
- package/types/api/base/env.d.ts +19 -0
- package/types/api/base/index.d.ts +102 -0
- package/types/api/base/performance.d.ts +258 -0
- package/types/api/base/system.d.ts +742 -0
- package/types/api/base/update.d.ts +130 -0
- package/types/api/base/weapp/app-event.d.ts +265 -0
- package/types/api/base/weapp/life-cycle.d.ts +155 -0
- package/types/api/canvas/index.d.ts +2162 -0
- package/types/api/cloud/index.d.ts +2622 -0
- package/types/api/data-analysis/index.d.ts +122 -0
- package/types/api/device/accelerometer.d.ts +102 -0
- package/types/api/device/accessibility.d.ts +26 -0
- package/types/api/device/battery.d.ts +46 -0
- package/types/api/device/bluetooth-ble.d.ts +601 -0
- package/types/api/device/bluetooth-peripheral.d.ts +430 -0
- package/types/api/device/bluetooth.d.ts +463 -0
- package/types/api/device/calendar.d.ts +98 -0
- package/types/api/device/clipboard.d.ts +81 -0
- package/types/api/device/compass.d.ts +105 -0
- package/types/api/device/contact.d.ts +110 -0
- package/types/api/device/gyroscope.d.ts +85 -0
- package/types/api/device/iBeacon.d.ts +168 -0
- package/types/api/device/keyboard.d.ts +97 -0
- package/types/api/device/memory.d.ts +52 -0
- package/types/api/device/motion.d.ts +88 -0
- package/types/api/device/network.d.ts +172 -0
- package/types/api/device/nfc.d.ts +1238 -0
- package/types/api/device/phone.d.ts +30 -0
- package/types/api/device/scan.d.ts +111 -0
- package/types/api/device/screen.d.ts +217 -0
- package/types/api/device/sms.d.ts +26 -0
- package/types/api/device/vibrate.d.ts +51 -0
- package/types/api/device/wifi.d.ts +301 -0
- package/types/api/ext/index.d.ts +64 -0
- package/types/api/files/index.d.ts +1472 -0
- package/types/api/framework/index.d.ts +51 -0
- package/types/api/location/index.d.ts +517 -0
- package/types/api/media/audio.d.ts +1013 -0
- package/types/api/media/background-audio.d.ts +291 -0
- package/types/api/media/camera.d.ts +207 -0
- package/types/api/media/editor.d.ts +239 -0
- package/types/api/media/image.d.ts +469 -0
- package/types/api/media/live.d.ts +461 -0
- package/types/api/media/map.d.ts +638 -0
- package/types/api/media/media-recorder.d.ts +117 -0
- package/types/api/media/recorder.d.ts +317 -0
- package/types/api/media/video-decoder.d.ts +117 -0
- package/types/api/media/video-processing.d.ts +84 -0
- package/types/api/media/video.d.ts +527 -0
- package/types/api/media/voip.d.ts +393 -0
- package/types/api/navigate/index.d.ts +327 -0
- package/types/api/network/download.d.ts +173 -0
- package/types/api/network/mdns.d.ts +191 -0
- package/types/api/network/request.d.ts +480 -0
- package/types/api/network/tcp.d.ts +181 -0
- package/types/api/network/udp.d.ts +218 -0
- package/types/api/network/upload.d.ts +201 -0
- package/types/api/network/websocket.d.ts +383 -0
- package/types/api/open-api/account.d.ts +51 -0
- package/types/api/open-api/address.d.ts +68 -0
- package/types/api/open-api/authorize.d.ts +80 -0
- package/types/api/open-api/card.d.ts +110 -0
- package/types/api/open-api/channels.d.ts +225 -0
- package/types/api/open-api/customer-service.d.ts +45 -0
- package/types/api/open-api/device-voip.d.ts +103 -0
- package/types/api/open-api/facial.d.ts +98 -0
- package/types/api/open-api/favorites.d.ts +101 -0
- package/types/api/open-api/group.d.ts +59 -0
- package/types/api/open-api/invoice.d.ts +87 -0
- package/types/api/open-api/license-plate.d.ts +27 -0
- package/types/api/open-api/login.d.ts +115 -0
- package/types/api/open-api/my-miniprogram.d.ts +28 -0
- package/types/api/open-api/privacy.d.ts +107 -0
- package/types/api/open-api/redpackage.d.ts +24 -0
- package/types/api/open-api/settings.d.ts +174 -0
- package/types/api/open-api/soter.d.ts +184 -0
- package/types/api/open-api/sticker.d.ts +83 -0
- package/types/api/open-api/subscribe-message.d.ts +305 -0
- package/types/api/open-api/user-info.d.ts +182 -0
- package/types/api/open-api/werun.d.ts +101 -0
- package/types/api/payment/index.d.ts +119 -0
- package/types/api/qq/index.d.ts +354 -0
- package/types/api/route/index.d.ts +324 -0
- package/types/api/share/index.d.ts +354 -0
- package/types/api/skyline/index.d.ts +345 -0
- package/types/api/storage/background-fetch.d.ts +131 -0
- package/types/api/storage/cache-manager.d.ts +249 -0
- package/types/api/storage/index.d.ts +405 -0
- package/types/api/swan/bookshelf.d.ts +307 -0
- package/types/api/swan/download-package.d.ts +80 -0
- package/types/api/swan/index.d.ts +251 -0
- package/types/api/swan/pay.d.ts +139 -0
- package/types/api/taro.extend.d.ts +233 -0
- package/types/api/taro.hooks.d.ts +148 -0
- package/types/api/ui/animation.d.ts +427 -0
- package/types/api/ui/background.d.ts +69 -0
- package/types/api/ui/custom-component.d.ts +23 -0
- package/types/api/ui/fonts.d.ts +77 -0
- package/types/api/ui/interaction.d.ts +281 -0
- package/types/api/ui/menu.d.ts +29 -0
- package/types/api/ui/navigation-bar.d.ts +130 -0
- package/types/api/ui/pull-down-refresh.d.ts +50 -0
- package/types/api/ui/scroll.d.ts +114 -0
- package/types/api/ui/sticky.d.ts +32 -0
- package/types/api/ui/tab-bar.d.ts +196 -0
- package/types/api/ui/window.d.ts +71 -0
- package/types/api/worker/index.d.ts +83 -0
- package/types/api/wxml/index.d.ts +540 -0
- package/types/compile/compiler.d.ts +32 -0
- package/types/compile/config/h5.d.ts +134 -0
- package/types/compile/config/harmony.d.ts +118 -0
- package/types/compile/config/index.d.ts +8 -0
- package/types/compile/config/manifest.d.ts +155 -0
- package/types/compile/config/mini.d.ts +118 -0
- package/types/compile/config/plugin.d.ts +34 -0
- package/types/compile/config/project.d.ts +338 -0
- package/types/compile/config/rn.d.ts +85 -0
- package/types/compile/config/util.d.ts +179 -0
- package/types/compile/hooks.d.ts +13 -0
- package/types/compile/index.d.ts +11 -0
- package/types/compile/viteCompilerContext.d.ts +167 -0
- package/types/global.d.ts +428 -0
- package/types/index.d.ts +190 -0
- package/types/taro.api.d.ts +130 -0
- package/types/taro.component.d.ts +168 -0
- package/types/taro.config.d.ts +712 -0
- package/types/taro.lifecycle.d.ts +220 -0
- package/types/taro.runtime.d.ts +9 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import Taro from '../../index'
|
|
2
|
+
|
|
3
|
+
declare module '../../index' {
|
|
4
|
+
namespace updateVoIPChatMuteConfig {
|
|
5
|
+
interface Option {
|
|
6
|
+
/** 静音设置 */
|
|
7
|
+
muteConfig: MuteConfig
|
|
8
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
9
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
10
|
+
/** 接口调用失败的回调函数 */
|
|
11
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
12
|
+
/** 接口调用成功的回调函数 */
|
|
13
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
14
|
+
}
|
|
15
|
+
/** 静音设置 */
|
|
16
|
+
interface MuteConfig {
|
|
17
|
+
/** 是否静音麦克风 */
|
|
18
|
+
muteMicrophone?: boolean
|
|
19
|
+
/** 是否静音耳机 */
|
|
20
|
+
muteEarphone?: boolean
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
namespace subscribeVoIPVideoMembers {
|
|
25
|
+
interface Option {
|
|
26
|
+
/** 订阅的成员列表 */
|
|
27
|
+
openIdList: string[]
|
|
28
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
29
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
30
|
+
/** 接口调用失败的回调函数 */
|
|
31
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
32
|
+
/** 接口调用成功的回调函数 */
|
|
33
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
namespace setEnable1v1Chat {
|
|
38
|
+
interface Option {
|
|
39
|
+
/** 是否开启 */
|
|
40
|
+
enable: boolean
|
|
41
|
+
/** 窗口背景色
|
|
42
|
+
* @default 0
|
|
43
|
+
*/
|
|
44
|
+
backgroundType?: keyof ColorType
|
|
45
|
+
/** 小窗样式
|
|
46
|
+
* @default 1
|
|
47
|
+
*/
|
|
48
|
+
minWindowType?: keyof ColorType
|
|
49
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
50
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
51
|
+
/** 接口调用失败的回调函数 */
|
|
52
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
53
|
+
/** 接口调用成功的回调函数 */
|
|
54
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
55
|
+
}
|
|
56
|
+
/** 音频通话背景以及小窗模式背景 */
|
|
57
|
+
interface ColorType {
|
|
58
|
+
/** #262930 */
|
|
59
|
+
0
|
|
60
|
+
/** #FA5151 */
|
|
61
|
+
1
|
|
62
|
+
/** #FA9D3B */
|
|
63
|
+
2
|
|
64
|
+
/** #3D7257 */
|
|
65
|
+
3
|
|
66
|
+
/** #1485EE */
|
|
67
|
+
4
|
|
68
|
+
/** #6467F0 */
|
|
69
|
+
5
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
namespace onVoIPVideoMembersChanged {
|
|
74
|
+
interface Result extends TaroGeneral.CallbackResult {
|
|
75
|
+
/** 开启视频的成员名单 */
|
|
76
|
+
openIdList: string[]
|
|
77
|
+
/** 错误码 */
|
|
78
|
+
errCode: number
|
|
79
|
+
/** 调用结果 */
|
|
80
|
+
errMsg: string
|
|
81
|
+
}
|
|
82
|
+
/** 实时语音通话成员视频状态变化事件的回调函数 */
|
|
83
|
+
type Callback = (res: Result) => void
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
namespace onVoIPChatStateChanged {
|
|
87
|
+
interface Result extends TaroGeneral.CallbackResult {
|
|
88
|
+
/** 事件码 */
|
|
89
|
+
code: number
|
|
90
|
+
/** 附加信息 */
|
|
91
|
+
data: Record<any, any>
|
|
92
|
+
/** 错误码 */
|
|
93
|
+
errCode: number
|
|
94
|
+
/** 调用结果 */
|
|
95
|
+
errMsg: string
|
|
96
|
+
}
|
|
97
|
+
/** 房间状态变化事件的回调函数 */
|
|
98
|
+
type Callback = (res: Result) => void
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
namespace onVoIPChatSpeakersChanged {
|
|
102
|
+
interface Result extends TaroGeneral.CallbackResult {
|
|
103
|
+
/** 还在实时语音通话中的成员 openId 名单 */
|
|
104
|
+
openIdList: string[]
|
|
105
|
+
/** 错误码 */
|
|
106
|
+
errCode: number
|
|
107
|
+
/** 调用结果 */
|
|
108
|
+
errMsg: string
|
|
109
|
+
}
|
|
110
|
+
/** 房间状态变化事件的回调函数 */
|
|
111
|
+
type Callback = (res: Result) => void
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
namespace onVoIPChatMembersChanged {
|
|
115
|
+
interface Result extends TaroGeneral.CallbackResult {
|
|
116
|
+
/** 还在实时语音通话中的成员 openId 名单 */
|
|
117
|
+
openIdList: string[]
|
|
118
|
+
/** 错误码 */
|
|
119
|
+
errCode: number
|
|
120
|
+
/** 调用结果 */
|
|
121
|
+
errMsg: string
|
|
122
|
+
}
|
|
123
|
+
/** 房间状态变化事件的回调函数 */
|
|
124
|
+
type Callback = (res: Result) => void
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
namespace onVoIPChatInterrupted {
|
|
128
|
+
interface Result extends TaroGeneral.CallbackResult {
|
|
129
|
+
/** 还在实时语音通话中的成员 openId 名单 */
|
|
130
|
+
openIdList: string[]
|
|
131
|
+
/** 错误码 */
|
|
132
|
+
errCode: number
|
|
133
|
+
/** 调用结果 */
|
|
134
|
+
errMsg: string
|
|
135
|
+
}
|
|
136
|
+
/** 房间状态变化事件的回调函数 */
|
|
137
|
+
type Callback = (res: Result) => void
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
namespace joinVoIPChat {
|
|
141
|
+
type Promised = FailCallbackResult | SuccessCallbackResult
|
|
142
|
+
interface Option {
|
|
143
|
+
/** 房间类型
|
|
144
|
+
* @default "voice"
|
|
145
|
+
*/
|
|
146
|
+
roomType?: RoomType
|
|
147
|
+
/** 签名,用于验证小游戏的身份 */
|
|
148
|
+
signature: string
|
|
149
|
+
/** 验证所需的随机字符串 */
|
|
150
|
+
nonceStr: string
|
|
151
|
+
/** 验证所需的时间戳 */
|
|
152
|
+
timeStamp: number
|
|
153
|
+
/** 小游戏内此房间/群聊的 ID。同一时刻传入相同 groupId 的用户会进入到同个实时语音房间。 */
|
|
154
|
+
groupId: string
|
|
155
|
+
/** 静音设置 */
|
|
156
|
+
muteConfig?: MuteConfig
|
|
157
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
158
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
159
|
+
/** 接口调用失败的回调函数 */
|
|
160
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
161
|
+
/** 接口调用成功的回调函数 */
|
|
162
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
163
|
+
}
|
|
164
|
+
/** 房间类型 */
|
|
165
|
+
interface RoomType {
|
|
166
|
+
/** 音频房间,用于语音通话 */
|
|
167
|
+
voice
|
|
168
|
+
/** 视频房间,结合 [voip-room](/docs/components/media/voip-room) 组件可显示成员画面 */
|
|
169
|
+
video
|
|
170
|
+
}
|
|
171
|
+
/** 静音设置 */
|
|
172
|
+
interface MuteConfig {
|
|
173
|
+
/** 是否静音麦克风 */
|
|
174
|
+
muteMicrophone?: boolean
|
|
175
|
+
/** 是否静音耳机 */
|
|
176
|
+
muteEarphone?: boolean
|
|
177
|
+
}
|
|
178
|
+
interface FailCallbackResult extends TaroGeneral.CallbackResult {
|
|
179
|
+
/** 错误信息 */
|
|
180
|
+
errMsg: string
|
|
181
|
+
/** 错误码 */
|
|
182
|
+
errCode: keyof VoipErrCode
|
|
183
|
+
}
|
|
184
|
+
interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
|
|
185
|
+
/** 还在实时语音通话中的成员 openId 名单 */
|
|
186
|
+
openIdList: string[]
|
|
187
|
+
/** 错误码 */
|
|
188
|
+
errCode: number
|
|
189
|
+
/** 调用结果 */
|
|
190
|
+
errMsg: string
|
|
191
|
+
}
|
|
192
|
+
/** Voip 错误码 */
|
|
193
|
+
interface VoipErrCode {
|
|
194
|
+
/** 当前已在房间内 */
|
|
195
|
+
[-1]
|
|
196
|
+
/** 录音设备被占用,可能是当前正在使用微信内语音通话或系统通话 */
|
|
197
|
+
[-2]
|
|
198
|
+
/** 加入会话期间退出(可能是用户主动退出,或者退后台、来电等原因),因此加入失败 */
|
|
199
|
+
[-3]
|
|
200
|
+
/** 系统错误 */
|
|
201
|
+
[-1000]
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
namespace join1v1Chat {
|
|
206
|
+
interface Caller {
|
|
207
|
+
/** 昵称 */
|
|
208
|
+
nickname: string
|
|
209
|
+
/** 头像 */
|
|
210
|
+
headImage?: string
|
|
211
|
+
/** 小程序内 openid */
|
|
212
|
+
openid: string
|
|
213
|
+
}
|
|
214
|
+
interface Listener {
|
|
215
|
+
/** 昵称 */
|
|
216
|
+
nickname: string
|
|
217
|
+
/** 头像 */
|
|
218
|
+
headImage?: string
|
|
219
|
+
/** 小程序内 openid */
|
|
220
|
+
openid: string
|
|
221
|
+
}
|
|
222
|
+
interface RoomType {
|
|
223
|
+
/** 语音通话 */
|
|
224
|
+
voice
|
|
225
|
+
/** 视频通话 */
|
|
226
|
+
video
|
|
227
|
+
}
|
|
228
|
+
interface Option {
|
|
229
|
+
/** 呼叫方信息 */
|
|
230
|
+
caller: Caller
|
|
231
|
+
/** 接听方信息 */
|
|
232
|
+
listener: Listener
|
|
233
|
+
/** 窗口背景色
|
|
234
|
+
* @default 0
|
|
235
|
+
*/
|
|
236
|
+
backgroundType?: keyof setEnable1v1Chat.ColorType
|
|
237
|
+
/** 通话类型 */
|
|
238
|
+
roomType?: keyof RoomType
|
|
239
|
+
/** 小窗样式
|
|
240
|
+
* @default 1
|
|
241
|
+
*/
|
|
242
|
+
minWindowType?: keyof setEnable1v1Chat.ColorType
|
|
243
|
+
/** 不允许切换到语音通话
|
|
244
|
+
* @default false
|
|
245
|
+
*/
|
|
246
|
+
disableSwitchVoice?: boolean
|
|
247
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
248
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
249
|
+
/** 接口调用失败的回调函数 */
|
|
250
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
251
|
+
/** 接口调用成功的回调函数 */
|
|
252
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
253
|
+
}
|
|
254
|
+
interface ChatErrCode {
|
|
255
|
+
/** 未开通双人通话 */
|
|
256
|
+
[-20000]
|
|
257
|
+
/** 当前设备不支持 */
|
|
258
|
+
[-20001]
|
|
259
|
+
/** 正在通话中 */
|
|
260
|
+
[-20002]
|
|
261
|
+
/** 其它小程序正在通话中 */
|
|
262
|
+
[-20003]
|
|
263
|
+
/** 内部系统错误 */
|
|
264
|
+
[-30000]
|
|
265
|
+
/** 微信缺失相机权限 */
|
|
266
|
+
[-30001]
|
|
267
|
+
/** 微信缺失录音权限 */
|
|
268
|
+
[-30002]
|
|
269
|
+
/** 小程序缺失录音权限 */
|
|
270
|
+
[-30003]
|
|
271
|
+
/** 小程序缺失相机权限 */
|
|
272
|
+
[-30004]
|
|
273
|
+
/** 当前已在房间内 */
|
|
274
|
+
[-1]
|
|
275
|
+
/** 录音设备被占用,可能是当前正在使用微信内语音通话或系统通话 */
|
|
276
|
+
[-2]
|
|
277
|
+
/** 加入会话期间退出(可能是用户主动退出,或者退后台、来电等原因),因此加入失败 */
|
|
278
|
+
[-3]
|
|
279
|
+
/** 系统错误 */
|
|
280
|
+
[-1000]
|
|
281
|
+
}
|
|
282
|
+
interface FailCallbackResult extends TaroGeneral.CallbackResult {
|
|
283
|
+
/** 错误信息 */
|
|
284
|
+
errMsg: string
|
|
285
|
+
/** 错误码 */
|
|
286
|
+
errCode: keyof ChatErrCode
|
|
287
|
+
}
|
|
288
|
+
interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
|
|
289
|
+
/** 错误码 */
|
|
290
|
+
errCode: number
|
|
291
|
+
/** 调用结果 */
|
|
292
|
+
errMsg: string
|
|
293
|
+
}
|
|
294
|
+
type Promised = FailCallbackResult | SuccessCallbackResult
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
namespace exitVoIPChat {
|
|
298
|
+
interface Option {
|
|
299
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
300
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
301
|
+
/** 接口调用失败的回调函数 */
|
|
302
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
303
|
+
/** 接口调用成功的回调函数 */
|
|
304
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
interface TaroStatic {
|
|
309
|
+
/** 更新实时语音静音设置
|
|
310
|
+
* @supported weapp
|
|
311
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.updateVoIPChatMuteConfig.html
|
|
312
|
+
*/
|
|
313
|
+
updateVoIPChatMuteConfig(option: updateVoIPChatMuteConfig.Option): Promise<TaroGeneral.CallbackResult>
|
|
314
|
+
/** 订阅视频画面成员
|
|
315
|
+
* @supported weapp
|
|
316
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.subscribeVoIPVideoMembers.html
|
|
317
|
+
*/
|
|
318
|
+
subscribeVoIPVideoMembers(option: subscribeVoIPVideoMembers.Option): Promise<TaroGeneral.CallbackResult>
|
|
319
|
+
/** 开启双人通话
|
|
320
|
+
* @supported weapp
|
|
321
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.setEnable1v1Chat.html
|
|
322
|
+
*/
|
|
323
|
+
setEnable1v1Chat(option: setEnable1v1Chat.Option): Promise<TaroGeneral.CallbackResult>
|
|
324
|
+
/** 监听实时语音通话成员视频状态变化事件
|
|
325
|
+
* @supported weapp
|
|
326
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.onVoIPVideoMembersChanged.html
|
|
327
|
+
*/
|
|
328
|
+
onVoIPVideoMembersChanged(callback: onVoIPVideoMembersChanged.Callback): void
|
|
329
|
+
/** 监听房间状态变化事件
|
|
330
|
+
* @supported weapp
|
|
331
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.onVoIPChatStateChanged.html
|
|
332
|
+
*/
|
|
333
|
+
onVoIPChatStateChanged(callback: onVoIPChatStateChanged.Callback): void
|
|
334
|
+
/** 监听实时语音通话成员通话状态变化事件
|
|
335
|
+
* @supported weapp
|
|
336
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.onVoIPChatSpeakersChanged.html
|
|
337
|
+
*/
|
|
338
|
+
onVoIPChatSpeakersChanged(callback: onVoIPChatSpeakersChanged.Callback): void
|
|
339
|
+
/** 监听实时语音通话成员在线状态变化事件
|
|
340
|
+
* @supported weapp
|
|
341
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.onVoIPChatMembersChanged.html
|
|
342
|
+
*/
|
|
343
|
+
onVoIPChatMembersChanged(callback: onVoIPChatMembersChanged.Callback): void
|
|
344
|
+
/** 监听被动断开实时语音通话事件
|
|
345
|
+
* @supported weapp
|
|
346
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.onVoIPChatInterrupted.html
|
|
347
|
+
*/
|
|
348
|
+
onVoIPChatInterrupted(callback: onVoIPChatInterrupted.Callback): void
|
|
349
|
+
/** 取消监听实时语音通话成员视频状态变化事件
|
|
350
|
+
* @supported weapp
|
|
351
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.offVoIPVideoMembersChanged.html
|
|
352
|
+
*/
|
|
353
|
+
offVoIPVideoMembersChanged(callback: onVoIPVideoMembersChanged.Callback): void
|
|
354
|
+
/** 取消监听房间状态变化事件
|
|
355
|
+
* @supported weapp
|
|
356
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.offVoIPChatStateChanged.html
|
|
357
|
+
*/
|
|
358
|
+
offVoIPChatStateChanged(callback: onVoIPChatStateChanged.Callback): void
|
|
359
|
+
/**
|
|
360
|
+
* 取消监听实时语音通话成员通话状态变化事件
|
|
361
|
+
* @supported weapp
|
|
362
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.offVoIPChatSpeakersChanged.html
|
|
363
|
+
*/
|
|
364
|
+
offVoIPChatSpeakersChanged(callback: onVoIPChatSpeakersChanged.Callback): void
|
|
365
|
+
/** 取消监听实时语音通话成员在线状态变化事件
|
|
366
|
+
* @supported weapp
|
|
367
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.offVoIPChatMembersChanged.html
|
|
368
|
+
*/
|
|
369
|
+
offVoIPChatMembersChanged(callback: onVoIPChatMembersChanged.Callback): void
|
|
370
|
+
/** 取消监听被动断开实时语音通话事件
|
|
371
|
+
* @supported weapp
|
|
372
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.offVoIPChatInterrupted.html
|
|
373
|
+
*/
|
|
374
|
+
offVoIPChatInterrupted(callback: onVoIPChatInterrupted.Callback): void
|
|
375
|
+
/** 加入 (创建) 实时语音通话,更多信息可见 [实时语音指南](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/voip-chat.html)
|
|
376
|
+
*
|
|
377
|
+
* 调用前需要用户授权 `scope.record`,若房间类型为视频房间需要用户授权 `scope.camera`。
|
|
378
|
+
* @supported weapp
|
|
379
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.joinVoIPChat.html
|
|
380
|
+
*/
|
|
381
|
+
joinVoIPChat(option: joinVoIPChat.Option): Promise<joinVoIPChat.Promised>
|
|
382
|
+
/**加入(创建)双人通话
|
|
383
|
+
* @supported weapp
|
|
384
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.join1v1Chat.html
|
|
385
|
+
*/
|
|
386
|
+
join1v1Chat(option: join1v1Chat.Option): Promise<join1v1Chat.Promised>
|
|
387
|
+
/** 退出(销毁)实时语音通话
|
|
388
|
+
* @supported weapp
|
|
389
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.exitVoIPChat.html
|
|
390
|
+
*/
|
|
391
|
+
exitVoIPChat(option: exitVoIPChat.Option): Promise<TaroGeneral.CallbackResult>
|
|
392
|
+
}
|
|
393
|
+
}
|