@realsee/live 0.6.15 → 0.7.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 +50 -55
- package/dist/index.cjs.js +89 -24
- package/dist/index.d.cts +1336 -0
- package/dist/index.d.ts +1336 -5
- package/dist/index.esm.js +30 -0
- package/docs/README.md +435 -0
- package/docs/classes/BrowserRTC.md +436 -0
- package/docs/classes/BrowserRTC4Chime.md +558 -0
- package/docs/classes/CoreRTC.md +448 -0
- package/docs/classes/Live.md +797 -0
- package/docs/classes/Subscribe.md +211 -0
- package/docs/classes/VRWebViewRTC.md +436 -0
- package/docs/enumerations/BuiltInRTCType.md +27 -0
- package/docs/enumerations/BuiltinActionType.md +81 -0
- package/docs/enumerations/BuiltinEventType.md +33 -0
- package/docs/enumerations/Command.md +107 -0
- package/docs/enumerations/LiveState.md +53 -0
- package/docs/enumerations/MemUserStatus.md +67 -0
- package/docs/enumerations/MicroStatus.md +33 -0
- package/docs/enumerations/RTCJoinedInfoCodeEnum.md +69 -0
- package/docs/enumerations/RTCType.md +39 -0
- package/docs/enumerations/UserStatus.md +45 -0
- package/docs/enumerations/WebSocketCloseError.md +117 -0
- package/docs/enumerations/WebSocketErrorType.md +77 -0
- package/docs/enumerations/WebSocketState.md +69 -0
- package/docs/functions/GetVoiceSignFn.md +27 -0
- package/docs/functions/clearLiveInstanceIfNeed.md +17 -0
- package/docs/functions/createLive.md +27 -0
- package/docs/functions/createLiveReact.md +449 -0
- package/docs/functions/parseLiveMsg.md +27 -0
- package/docs/functions/parseWSClsErr.md +21 -0
- package/docs/globals.md +77 -0
- package/docs/interfaces/AttendeeResponse.md +37 -0
- package/docs/interfaces/LiveOptions.md +246 -0
- package/docs/interfaces/MeetingResponse.md +55 -0
- package/docs/interfaces/MeetingSessionConfigurationOptions.md +93 -0
- package/docs/interfaces/Permission.md +147 -0
- package/docs/interfaces/RTCJoinedInfo.md +67 -0
- package/docs/interfaces/RTCProtocol.md +404 -0
- package/docs/interfaces/VRWebViewRTCOptions.md +41 -0
- package/docs/namespaces/SubscribeMixinType/README.md +17 -0
- package/docs/namespaces/SubscribeMixinType/interfaces/emit.md +31 -0
- package/docs/namespaces/SubscribeMixinType/interfaces/hasListener.md +25 -0
- package/docs/namespaces/SubscribeMixinType/interfaces/off.md +31 -0
- package/docs/namespaces/SubscribeMixinType/interfaces/on.md +37 -0
- package/docs/namespaces/SubscribeMixinType/interfaces/once.md +35 -0
- package/docs/type-aliases/BuiltinMsg.md +41 -0
- package/docs/type-aliases/EventMap.md +17 -0
- package/docs/type-aliases/EventType.md +19 -0
- package/docs/type-aliases/GetVoiceSign.md +15 -0
- package/docs/type-aliases/GetVoiceSignParams.md +35 -0
- package/docs/type-aliases/GetVoiceSignReturnType.md +41 -0
- package/docs/type-aliases/KeyframeEventType.md +19 -0
- package/docs/type-aliases/LiveBuiltInData.md +47 -0
- package/docs/type-aliases/LiveConnectOptions.md +47 -0
- package/docs/type-aliases/LiveEventType.md +165 -0
- package/docs/type-aliases/LiveMsg.md +53 -0
- package/docs/type-aliases/LiveProviderPropTypes.md +27 -0
- package/docs/type-aliases/RTCActionReactCallback.md +13 -0
- package/docs/type-aliases/RTCEventType.md +65 -0
- package/docs/type-aliases/ReqLiveMsg.md +45 -0
- package/docs/type-aliases/RoomInfo.md +55 -0
- package/docs/type-aliases/UserInfo.md +77 -0
- package/docs/type-aliases/UserInfoExt.md +33 -0
- package/docs/type-aliases/UserVolume.md +25 -0
- package/docs/type-aliases/WebSocketError.md +31 -0
- package/package.json +41 -31
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js +0 -2328
- package/dist/index.es.js.map +0 -1
- package/dist/live/controller.d.ts +0 -118
- package/dist/live/createLive.d.ts +0 -8
- package/dist/live/createLiveReact.d.ts +0 -52
- package/dist/live/live.d.ts +0 -182
- package/dist/rtc/BrowserRTC.d.ts +0 -39
- package/dist/rtc/BrowserRTC4Chime.d.ts +0 -60
- package/dist/rtc/CoreRTC.d.ts +0 -23
- package/dist/rtc/VRWebViewRTC.d.ts +0 -97
- package/dist/rtc/index.d.ts +0 -5
- package/dist/typings/chime/AttendeeResponse.d.ts +0 -5
- package/dist/typings/chime/MeetingResponse.d.ts +0 -12
- package/dist/typings/chime/MeetingSessionConfigurationOptions.d.ts +0 -16
- package/dist/typings/chime/index.d.ts +0 -3
- package/dist/typings/index.d.ts +0 -4
- package/dist/typings/live/EventType.d.ts +0 -74
- package/dist/typings/live/GetVoiceSign.d.ts +0 -45
- package/dist/typings/live/LiveConnectOptions.d.ts +0 -24
- package/dist/typings/live/LiveMsg.d.ts +0 -133
- package/dist/typings/live/LiveOptions.d.ts +0 -79
- package/dist/typings/live/LiveState.d.ts +0 -15
- package/dist/typings/live/RoomInfo.d.ts +0 -13
- package/dist/typings/live/UserInfo.d.ts +0 -103
- package/dist/typings/live/UserVolume.d.ts +0 -7
- package/dist/typings/live/WebSocket.d.ts +0 -82
- package/dist/typings/live/index.d.ts +0 -10
- package/dist/typings/react/RTCActionReactCallback.d.ts +0 -2
- package/dist/typings/react/index.d.ts +0 -1
- package/dist/typings/rtc/VRWebViewRTCOptions.d.ts +0 -6
- package/dist/typings/rtc/eventType.d.ts +0 -44
- package/dist/typings/rtc/index.d.ts +0 -5
- package/dist/typings/rtc/joinedInfo.d.ts +0 -38
- package/dist/typings/rtc/protocol.d.ts +0 -62
- package/dist/typings/rtc/type.d.ts +0 -12
- package/dist/utils/RobustWebSocket.d.ts +0 -160
- package/dist/utils/appendUri.d.ts +0 -1
- package/dist/utils/clientDetector.d.ts +0 -4
- package/dist/utils/equal.d.ts +0 -10
- package/dist/utils/logger.d.ts +0 -16
- package/dist/utils/subscribe.d.ts +0 -75
- package/dist/utils/uuid.d.ts +0 -4
- package/docs/.nojekyll +0 -1
- package/docs/assets/highlight.css +0 -120
- package/docs/assets/main.js +0 -58
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1280
- package/docs/classes/BrowserRTC.html +0 -561
- package/docs/classes/BrowserRTC4Chime.html +0 -602
- package/docs/classes/CoreRTC.html +0 -432
- package/docs/classes/Live.html +0 -812
- package/docs/classes/VRWebViewRTC.html +0 -639
- package/docs/enums/BuiltInRTCType.html +0 -69
- package/docs/enums/BuiltinActionType.html +0 -112
- package/docs/enums/BuiltinEventType.html +0 -76
- package/docs/enums/Command.html +0 -134
- package/docs/enums/LiveState.html +0 -89
- package/docs/enums/MemUserStatus.html +0 -97
- package/docs/enums/MicroStatus.html +0 -76
- package/docs/enums/RTCJoinedInfoCodeEnum.html +0 -103
- package/docs/enums/RTCType.html +0 -79
- package/docs/enums/UserStatus.html +0 -85
- package/docs/enums/WebSocketCloseError.html +0 -139
- package/docs/enums/WebSocketErrorType.html +0 -104
- package/docs/enums/WebSocketState.html +0 -103
- package/docs/functions/_clearLiveInstanceIfNeed.html +0 -98
- package/docs/functions/createLive.html +0 -111
- package/docs/functions/createLiveReact.html +0 -579
- package/docs/functions/parseLiveMsg.html +0 -109
- package/docs/functions/parseWSClsErr.html +0 -103
- package/docs/index.html +0 -474
- package/docs/interfaces/AttendeeResponse.html +0 -80
- package/docs/interfaces/LiveOptions.html +0 -272
- package/docs/interfaces/MeetingResponse.html +0 -90
- package/docs/interfaces/MeetingSessionConfigurationOptions.html +0 -119
- package/docs/interfaces/Permission.html +0 -157
- package/docs/interfaces/RTCJoinedInfo.html +0 -104
- package/docs/interfaces/RTCProtocol.html +0 -424
- package/docs/interfaces/VRWebViewRTCOptions.html +0 -73
- package/docs/modules.html +0 -156
- package/docs/types/BuiltinMsg.html +0 -112
- package/docs/types/EventType.html +0 -101
- package/docs/types/GetVoiceSign.html +0 -109
- package/docs/types/GetVoiceSignParams.html +0 -111
- package/docs/types/GetVoiceSignReturnType.html +0 -115
- package/docs/types/KeyframeTypes.html +0 -101
- package/docs/types/LiveBuiltInData.html +0 -117
- package/docs/types/LiveConnectOptions.html +0 -123
- package/docs/types/LiveEventType.html +0 -276
- package/docs/types/LiveMsg.html +0 -117
- package/docs/types/LiveProviderPropTypes.html +0 -106
- package/docs/types/RTCActionReactCallback.html +0 -94
- package/docs/types/RTCEventType.html +0 -210
- package/docs/types/ReqLiveMsg.html +0 -118
- package/docs/types/RoomInfo.html +0 -118
- package/docs/types/UserInfo.html +0 -139
- package/docs/types/UserInfoExt.html +0 -109
- package/docs/types/UserVolume.html +0 -103
- package/docs/types/WebSocketError.html +0 -105
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
[**如视 Live SDK**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[如视 Live SDK](../globals.md) / CoreRTC
|
|
6
|
+
|
|
7
|
+
# Class: `abstract` CoreRTC
|
|
8
|
+
|
|
9
|
+
rtc 基础抽象类
|
|
10
|
+
|
|
11
|
+
## Extends
|
|
12
|
+
|
|
13
|
+
- [`Subscribe`](Subscribe.md)\<[`RTCEventType`](../type-aliases/RTCEventType.md)\>
|
|
14
|
+
|
|
15
|
+
## Extended by
|
|
16
|
+
|
|
17
|
+
- [`BrowserRTC`](BrowserRTC.md)
|
|
18
|
+
- [`BrowserRTC4Chime`](BrowserRTC4Chime.md)
|
|
19
|
+
- [`VRWebViewRTC`](VRWebViewRTC.md)
|
|
20
|
+
|
|
21
|
+
## Implements
|
|
22
|
+
|
|
23
|
+
- [`RTCProtocol`](../interfaces/RTCProtocol.md)
|
|
24
|
+
|
|
25
|
+
## Constructors
|
|
26
|
+
|
|
27
|
+
### new CoreRTC()
|
|
28
|
+
|
|
29
|
+
> **new CoreRTC**(): [`CoreRTC`](CoreRTC.md)
|
|
30
|
+
|
|
31
|
+
#### Returns
|
|
32
|
+
|
|
33
|
+
[`CoreRTC`](CoreRTC.md)
|
|
34
|
+
|
|
35
|
+
#### Inherited from
|
|
36
|
+
|
|
37
|
+
[`Subscribe`](Subscribe.md).[`constructor`](Subscribe.md#constructors)
|
|
38
|
+
|
|
39
|
+
## Properties
|
|
40
|
+
|
|
41
|
+
### joined
|
|
42
|
+
|
|
43
|
+
> `abstract` **joined**: `boolean`
|
|
44
|
+
|
|
45
|
+
是否已经加入房间
|
|
46
|
+
|
|
47
|
+
#### Implementation of
|
|
48
|
+
|
|
49
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`joined`](../interfaces/RTCProtocol.md#joined)
|
|
50
|
+
|
|
51
|
+
#### Defined in
|
|
52
|
+
|
|
53
|
+
rtc/CoreRTC.ts:13
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### micro
|
|
58
|
+
|
|
59
|
+
> `abstract` **micro**: `boolean`
|
|
60
|
+
|
|
61
|
+
麦克风状态
|
|
62
|
+
|
|
63
|
+
#### Implementation of
|
|
64
|
+
|
|
65
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`micro`](../interfaces/RTCProtocol.md#micro)
|
|
66
|
+
|
|
67
|
+
#### Defined in
|
|
68
|
+
|
|
69
|
+
rtc/CoreRTC.ts:15
|
|
70
|
+
|
|
71
|
+
***
|
|
72
|
+
|
|
73
|
+
### type
|
|
74
|
+
|
|
75
|
+
> `abstract` **type**: [`RTCType`](../enumerations/RTCType.md)
|
|
76
|
+
|
|
77
|
+
rtc 实现类型
|
|
78
|
+
|
|
79
|
+
#### Implementation of
|
|
80
|
+
|
|
81
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`type`](../interfaces/RTCProtocol.md#type)
|
|
82
|
+
|
|
83
|
+
#### Defined in
|
|
84
|
+
|
|
85
|
+
rtc/CoreRTC.ts:19
|
|
86
|
+
|
|
87
|
+
***
|
|
88
|
+
|
|
89
|
+
### voiceId
|
|
90
|
+
|
|
91
|
+
> `abstract` **voiceId**: `string`
|
|
92
|
+
|
|
93
|
+
语音房间ID
|
|
94
|
+
|
|
95
|
+
#### Implementation of
|
|
96
|
+
|
|
97
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`voiceId`](../interfaces/RTCProtocol.md#voiceid)
|
|
98
|
+
|
|
99
|
+
#### Defined in
|
|
100
|
+
|
|
101
|
+
rtc/CoreRTC.ts:17
|
|
102
|
+
|
|
103
|
+
## Methods
|
|
104
|
+
|
|
105
|
+
### detectMicro()
|
|
106
|
+
|
|
107
|
+
> `abstract` **detectMicro**(): `Promise`\<`boolean`\>
|
|
108
|
+
|
|
109
|
+
监测麦克风授权。
|
|
110
|
+
|
|
111
|
+
#### Returns
|
|
112
|
+
|
|
113
|
+
`Promise`\<`boolean`\>
|
|
114
|
+
|
|
115
|
+
返回一个Promise,表示麦克风是否被授权
|
|
116
|
+
|
|
117
|
+
#### Implementation of
|
|
118
|
+
|
|
119
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`detectMicro`](../interfaces/RTCProtocol.md#detectmicro)
|
|
120
|
+
|
|
121
|
+
#### Defined in
|
|
122
|
+
|
|
123
|
+
rtc/CoreRTC.ts:30
|
|
124
|
+
|
|
125
|
+
***
|
|
126
|
+
|
|
127
|
+
### emit()
|
|
128
|
+
|
|
129
|
+
> **emit**\<`K`\>(`name`, ...`data`): `boolean`
|
|
130
|
+
|
|
131
|
+
触发事件
|
|
132
|
+
|
|
133
|
+
#### Type Parameters
|
|
134
|
+
|
|
135
|
+
• **K** *extends* keyof [`RTCEventType`](../type-aliases/RTCEventType.md)
|
|
136
|
+
|
|
137
|
+
预设的监听事件名称
|
|
138
|
+
|
|
139
|
+
#### Parameters
|
|
140
|
+
|
|
141
|
+
• **name**: `K`
|
|
142
|
+
|
|
143
|
+
事件类型
|
|
144
|
+
|
|
145
|
+
• ...**data**: `Parameters`\<[`RTCEventType`](../type-aliases/RTCEventType.md)\[`K`\]\>
|
|
146
|
+
|
|
147
|
+
触发事件的数据
|
|
148
|
+
|
|
149
|
+
#### Returns
|
|
150
|
+
|
|
151
|
+
`boolean`
|
|
152
|
+
|
|
153
|
+
canceled 是否被触发取消
|
|
154
|
+
|
|
155
|
+
#### Implementation of
|
|
156
|
+
|
|
157
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`emit`](../interfaces/RTCProtocol.md#emit)
|
|
158
|
+
|
|
159
|
+
#### Inherited from
|
|
160
|
+
|
|
161
|
+
[`Subscribe`](Subscribe.md).[`emit`](Subscribe.md#emit)
|
|
162
|
+
|
|
163
|
+
#### Defined in
|
|
164
|
+
|
|
165
|
+
utils/subscribe.ts:113
|
|
166
|
+
|
|
167
|
+
***
|
|
168
|
+
|
|
169
|
+
### hasListener()
|
|
170
|
+
|
|
171
|
+
> **hasListener**(`name`): `boolean`
|
|
172
|
+
|
|
173
|
+
判断是否注册了事件
|
|
174
|
+
|
|
175
|
+
#### Parameters
|
|
176
|
+
|
|
177
|
+
• **name**: keyof [`RTCEventType`](../type-aliases/RTCEventType.md)
|
|
178
|
+
|
|
179
|
+
事件类型
|
|
180
|
+
|
|
181
|
+
#### Returns
|
|
182
|
+
|
|
183
|
+
`boolean`
|
|
184
|
+
|
|
185
|
+
#### Implementation of
|
|
186
|
+
|
|
187
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`hasListener`](../interfaces/RTCProtocol.md#haslistener)
|
|
188
|
+
|
|
189
|
+
#### Inherited from
|
|
190
|
+
|
|
191
|
+
[`Subscribe`](Subscribe.md).[`hasListener`](Subscribe.md#haslistener)
|
|
192
|
+
|
|
193
|
+
#### Defined in
|
|
194
|
+
|
|
195
|
+
utils/subscribe.ts:41
|
|
196
|
+
|
|
197
|
+
***
|
|
198
|
+
|
|
199
|
+
### join()
|
|
200
|
+
|
|
201
|
+
> `abstract` **join**(`options`): `Promise`\<`boolean`\>
|
|
202
|
+
|
|
203
|
+
加入房间。
|
|
204
|
+
|
|
205
|
+
#### Parameters
|
|
206
|
+
|
|
207
|
+
• **options**
|
|
208
|
+
|
|
209
|
+
加入房间的选项
|
|
210
|
+
|
|
211
|
+
• **options.roomId**: `undefined` \| `string` \| `number`
|
|
212
|
+
|
|
213
|
+
房间ID
|
|
214
|
+
|
|
215
|
+
• **options.type**: [`RTCType`](../enumerations/RTCType.md)
|
|
216
|
+
|
|
217
|
+
RTC类型
|
|
218
|
+
|
|
219
|
+
• **options.userId**: `string`
|
|
220
|
+
|
|
221
|
+
用户ID
|
|
222
|
+
|
|
223
|
+
• **options.voiceId**: `string`
|
|
224
|
+
|
|
225
|
+
语音房间ID
|
|
226
|
+
|
|
227
|
+
#### Returns
|
|
228
|
+
|
|
229
|
+
`Promise`\<`boolean`\>
|
|
230
|
+
|
|
231
|
+
返回一个Promise,表示是否成功加入房间
|
|
232
|
+
|
|
233
|
+
#### Implementation of
|
|
234
|
+
|
|
235
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`join`](../interfaces/RTCProtocol.md#join)
|
|
236
|
+
|
|
237
|
+
#### Defined in
|
|
238
|
+
|
|
239
|
+
rtc/CoreRTC.ts:21
|
|
240
|
+
|
|
241
|
+
***
|
|
242
|
+
|
|
243
|
+
### off()
|
|
244
|
+
|
|
245
|
+
> **off**\<`K`\>(`name`?, `callback`?): `void`
|
|
246
|
+
|
|
247
|
+
解除事件
|
|
248
|
+
|
|
249
|
+
如果 name 不传的话解除对应所有事件
|
|
250
|
+
如果 name, callback 不传的话解除所有name的所有事件
|
|
251
|
+
|
|
252
|
+
#### Type Parameters
|
|
253
|
+
|
|
254
|
+
• **K** *extends* keyof [`RTCEventType`](../type-aliases/RTCEventType.md)
|
|
255
|
+
|
|
256
|
+
预设的监听事件名称
|
|
257
|
+
|
|
258
|
+
#### Parameters
|
|
259
|
+
|
|
260
|
+
• **name?**: `K`
|
|
261
|
+
|
|
262
|
+
事件类型
|
|
263
|
+
|
|
264
|
+
• **callback?**
|
|
265
|
+
|
|
266
|
+
事件回调函数
|
|
267
|
+
|
|
268
|
+
#### Returns
|
|
269
|
+
|
|
270
|
+
`void`
|
|
271
|
+
|
|
272
|
+
#### Implementation of
|
|
273
|
+
|
|
274
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`off`](../interfaces/RTCProtocol.md#off)
|
|
275
|
+
|
|
276
|
+
#### Inherited from
|
|
277
|
+
|
|
278
|
+
[`Subscribe`](Subscribe.md).[`off`](Subscribe.md#off)
|
|
279
|
+
|
|
280
|
+
#### Defined in
|
|
281
|
+
|
|
282
|
+
utils/subscribe.ts:87
|
|
283
|
+
|
|
284
|
+
***
|
|
285
|
+
|
|
286
|
+
### on()
|
|
287
|
+
|
|
288
|
+
> **on**\<`K`\>(`name`, `callback`, `once`?): () => `void`
|
|
289
|
+
|
|
290
|
+
注册事件
|
|
291
|
+
|
|
292
|
+
#### Type Parameters
|
|
293
|
+
|
|
294
|
+
• **K** *extends* keyof [`RTCEventType`](../type-aliases/RTCEventType.md)
|
|
295
|
+
|
|
296
|
+
预设的监听事件名称
|
|
297
|
+
|
|
298
|
+
#### Parameters
|
|
299
|
+
|
|
300
|
+
• **name**: `K`
|
|
301
|
+
|
|
302
|
+
事件类型
|
|
303
|
+
|
|
304
|
+
• **callback**
|
|
305
|
+
|
|
306
|
+
事件回调函数
|
|
307
|
+
|
|
308
|
+
• **once?**: `boolean`
|
|
309
|
+
|
|
310
|
+
是否只执行一次
|
|
311
|
+
|
|
312
|
+
#### Returns
|
|
313
|
+
|
|
314
|
+
`Function`
|
|
315
|
+
|
|
316
|
+
解除事件
|
|
317
|
+
|
|
318
|
+
##### Returns
|
|
319
|
+
|
|
320
|
+
`void`
|
|
321
|
+
|
|
322
|
+
#### Implementation of
|
|
323
|
+
|
|
324
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`on`](../interfaces/RTCProtocol.md#on)
|
|
325
|
+
|
|
326
|
+
#### Inherited from
|
|
327
|
+
|
|
328
|
+
[`Subscribe`](Subscribe.md).[`on`](Subscribe.md#on)
|
|
329
|
+
|
|
330
|
+
#### Defined in
|
|
331
|
+
|
|
332
|
+
utils/subscribe.ts:55
|
|
333
|
+
|
|
334
|
+
***
|
|
335
|
+
|
|
336
|
+
### once()
|
|
337
|
+
|
|
338
|
+
> **once**\<`K`\>(`name`, `callback`): () => `void`
|
|
339
|
+
|
|
340
|
+
注册事件(是否只执行一次)
|
|
341
|
+
|
|
342
|
+
#### Type Parameters
|
|
343
|
+
|
|
344
|
+
• **K** *extends* keyof [`RTCEventType`](../type-aliases/RTCEventType.md)
|
|
345
|
+
|
|
346
|
+
预设的监听事件名称
|
|
347
|
+
|
|
348
|
+
#### Parameters
|
|
349
|
+
|
|
350
|
+
• **name**: `K`
|
|
351
|
+
|
|
352
|
+
事件类型
|
|
353
|
+
|
|
354
|
+
• **callback**
|
|
355
|
+
|
|
356
|
+
事件回调函数
|
|
357
|
+
|
|
358
|
+
#### Returns
|
|
359
|
+
|
|
360
|
+
`Function`
|
|
361
|
+
|
|
362
|
+
解除事件
|
|
363
|
+
|
|
364
|
+
##### Returns
|
|
365
|
+
|
|
366
|
+
`void`
|
|
367
|
+
|
|
368
|
+
#### Implementation of
|
|
369
|
+
|
|
370
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`once`](../interfaces/RTCProtocol.md#once)
|
|
371
|
+
|
|
372
|
+
#### Inherited from
|
|
373
|
+
|
|
374
|
+
[`Subscribe`](Subscribe.md).[`once`](Subscribe.md#once)
|
|
375
|
+
|
|
376
|
+
#### Defined in
|
|
377
|
+
|
|
378
|
+
utils/subscribe.ts:74
|
|
379
|
+
|
|
380
|
+
***
|
|
381
|
+
|
|
382
|
+
### quit()
|
|
383
|
+
|
|
384
|
+
> `abstract` **quit**(): `Promise`\<`boolean`\>
|
|
385
|
+
|
|
386
|
+
离开房间。
|
|
387
|
+
|
|
388
|
+
#### Returns
|
|
389
|
+
|
|
390
|
+
`Promise`\<`boolean`\>
|
|
391
|
+
|
|
392
|
+
返回一个Promise,表示是否成功离开房间
|
|
393
|
+
|
|
394
|
+
#### Implementation of
|
|
395
|
+
|
|
396
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`quit`](../interfaces/RTCProtocol.md#quit)
|
|
397
|
+
|
|
398
|
+
#### Defined in
|
|
399
|
+
|
|
400
|
+
rtc/CoreRTC.ts:28
|
|
401
|
+
|
|
402
|
+
***
|
|
403
|
+
|
|
404
|
+
### shock()
|
|
405
|
+
|
|
406
|
+
> `abstract` **shock**(): `void`
|
|
407
|
+
|
|
408
|
+
震动。
|
|
409
|
+
|
|
410
|
+
#### Returns
|
|
411
|
+
|
|
412
|
+
`void`
|
|
413
|
+
|
|
414
|
+
#### Implementation of
|
|
415
|
+
|
|
416
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`shock`](../interfaces/RTCProtocol.md#shock)
|
|
417
|
+
|
|
418
|
+
#### Defined in
|
|
419
|
+
|
|
420
|
+
rtc/CoreRTC.ts:34
|
|
421
|
+
|
|
422
|
+
***
|
|
423
|
+
|
|
424
|
+
### toggleMicro()
|
|
425
|
+
|
|
426
|
+
> `abstract` **toggleMicro**(`flag`?): `Promise`\<`boolean`\>
|
|
427
|
+
|
|
428
|
+
关闭\开启 本地麦克风。
|
|
429
|
+
|
|
430
|
+
#### Parameters
|
|
431
|
+
|
|
432
|
+
• **flag?**: `boolean`
|
|
433
|
+
|
|
434
|
+
是否开启麦克风,默认为切换当前状态
|
|
435
|
+
|
|
436
|
+
#### Returns
|
|
437
|
+
|
|
438
|
+
`Promise`\<`boolean`\>
|
|
439
|
+
|
|
440
|
+
返回一个Promise,表示操作是否成功
|
|
441
|
+
|
|
442
|
+
#### Implementation of
|
|
443
|
+
|
|
444
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md).[`toggleMicro`](../interfaces/RTCProtocol.md#togglemicro)
|
|
445
|
+
|
|
446
|
+
#### Defined in
|
|
447
|
+
|
|
448
|
+
rtc/CoreRTC.ts:32
|