@realsee/live 0.6.15 → 0.7.1
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 +38 -24
- package/dist/index.d.cts +1336 -0
- package/dist/index.d.ts +1336 -5
- package/dist/index.esm.js +10 -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 +39 -32
- 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,69 @@
|
|
|
1
|
+
[**如视 Live SDK**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[如视 Live SDK](../globals.md) / WebSocketState
|
|
6
|
+
|
|
7
|
+
# Enumeration: WebSocketState
|
|
8
|
+
|
|
9
|
+
WebSocket 连接状态枚举
|
|
10
|
+
|
|
11
|
+
## Enumeration Members
|
|
12
|
+
|
|
13
|
+
### CLOSED
|
|
14
|
+
|
|
15
|
+
> **CLOSED**: `3`
|
|
16
|
+
|
|
17
|
+
连接已关闭或者没有链接成功
|
|
18
|
+
|
|
19
|
+
#### Defined in
|
|
20
|
+
|
|
21
|
+
typings/live/WebSocket.ts:28
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### CLOSING
|
|
26
|
+
|
|
27
|
+
> **CLOSING**: `2`
|
|
28
|
+
|
|
29
|
+
连接正在关闭
|
|
30
|
+
|
|
31
|
+
#### Defined in
|
|
32
|
+
|
|
33
|
+
typings/live/WebSocket.ts:23
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### CONNECTING
|
|
38
|
+
|
|
39
|
+
> **CONNECTING**: `0`
|
|
40
|
+
|
|
41
|
+
正在链接中
|
|
42
|
+
|
|
43
|
+
#### Defined in
|
|
44
|
+
|
|
45
|
+
typings/live/WebSocket.ts:13
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### NOTINITIALIZED
|
|
50
|
+
|
|
51
|
+
> **NOTINITIALIZED**: `-1`
|
|
52
|
+
|
|
53
|
+
尚未初始化
|
|
54
|
+
|
|
55
|
+
#### Defined in
|
|
56
|
+
|
|
57
|
+
typings/live/WebSocket.ts:8
|
|
58
|
+
|
|
59
|
+
***
|
|
60
|
+
|
|
61
|
+
### OPEN
|
|
62
|
+
|
|
63
|
+
> **OPEN**: `1`
|
|
64
|
+
|
|
65
|
+
已经链接并且可以通讯
|
|
66
|
+
|
|
67
|
+
#### Defined in
|
|
68
|
+
|
|
69
|
+
typings/live/WebSocket.ts:18
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[**如视 Live SDK**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[如视 Live SDK](../globals.md) / GetVoiceSignFn
|
|
6
|
+
|
|
7
|
+
# Function: GetVoiceSignFn()
|
|
8
|
+
|
|
9
|
+
> **GetVoiceSignFn**(`params`): `Promise`\<[`GetVoiceSignReturnType`](../type-aliases/GetVoiceSignReturnType.md)\>
|
|
10
|
+
|
|
11
|
+
获取用户语音签名的方法
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
• **params**: [`GetVoiceSignParams`](../type-aliases/GetVoiceSignParams.md)
|
|
16
|
+
|
|
17
|
+
获取语音签名所需的参数
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`Promise`\<[`GetVoiceSignReturnType`](../type-aliases/GetVoiceSignReturnType.md)\>
|
|
22
|
+
|
|
23
|
+
返回一个Promise,解析为语音签名的相关信息
|
|
24
|
+
|
|
25
|
+
## Defined in
|
|
26
|
+
|
|
27
|
+
typings/live/GetVoiceSign.ts:50
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[**如视 Live SDK**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[如视 Live SDK](../globals.md) / \_clearLiveInstanceIfNeed
|
|
6
|
+
|
|
7
|
+
# Function: \_clearLiveInstanceIfNeed()
|
|
8
|
+
|
|
9
|
+
> **\_clearLiveInstanceIfNeed**(): `void`
|
|
10
|
+
|
|
11
|
+
## Returns
|
|
12
|
+
|
|
13
|
+
`void`
|
|
14
|
+
|
|
15
|
+
## Defined in
|
|
16
|
+
|
|
17
|
+
live/live.ts:54
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[**如视 Live SDK**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[如视 Live SDK](../globals.md) / createLive
|
|
6
|
+
|
|
7
|
+
# Function: createLive()
|
|
8
|
+
|
|
9
|
+
> **createLive**\<`KeyframesSnapshot`\>(`opts`): [`Live`](../classes/Live.md)\<`KeyframesSnapshot`\>
|
|
10
|
+
|
|
11
|
+
创建`Live`实例
|
|
12
|
+
|
|
13
|
+
## Type Parameters
|
|
14
|
+
|
|
15
|
+
• **KeyframesSnapshot** *extends* `Record`\<`string`, `any`\>
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
• **opts**: [`LiveOptions`](../interfaces/LiveOptions.md)
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
[`Live`](../classes/Live.md)\<`KeyframesSnapshot`\>
|
|
24
|
+
|
|
25
|
+
## Defined in
|
|
26
|
+
|
|
27
|
+
live/createLive.ts:10
|
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
[**如视 Live SDK**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[如视 Live SDK](../globals.md) / createLiveReact
|
|
6
|
+
|
|
7
|
+
# Function: createLiveReact()
|
|
8
|
+
|
|
9
|
+
> **createLiveReact**\<`KeyframesSnapshot`\>(`options`): `object`
|
|
10
|
+
|
|
11
|
+
创建 LiveReact 实例,并提供 `React` 技术栈相关工具链。
|
|
12
|
+
|
|
13
|
+
## Type Parameters
|
|
14
|
+
|
|
15
|
+
• **KeyframesSnapshot** *extends* `Record`\<`string`, `any`\>
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
• **options**: [`LiveOptions`](../interfaces/LiveOptions.md)
|
|
20
|
+
|
|
21
|
+
带看配置
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`object`
|
|
26
|
+
|
|
27
|
+
返回当前的带看上下文实例
|
|
28
|
+
|
|
29
|
+
### jsBridge
|
|
30
|
+
|
|
31
|
+
> **jsBridge**: `JSBridgeProtocol`
|
|
32
|
+
|
|
33
|
+
### live
|
|
34
|
+
|
|
35
|
+
> **live**: [`Live`](../classes/Live.md)\<`KeyframesSnapshot`\>
|
|
36
|
+
|
|
37
|
+
### LiveProvider()
|
|
38
|
+
|
|
39
|
+
> **LiveProvider**: (`props`) => `FunctionComponentElement`\<`ProviderProps`\<`null` \| [`Live`](../classes/Live.md)\<`KeyframesSnapshot`\>\>\>
|
|
40
|
+
|
|
41
|
+
#### Parameters
|
|
42
|
+
|
|
43
|
+
• **props**: [`LiveProviderPropTypes`](../type-aliases/LiveProviderPropTypes.md)\<`KeyframesSnapshot`\>
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`FunctionComponentElement`\<`ProviderProps`\<`null` \| [`Live`](../classes/Live.md)\<`KeyframesSnapshot`\>\>\>
|
|
48
|
+
|
|
49
|
+
### unsafe\_\_useLiveInstance()
|
|
50
|
+
|
|
51
|
+
> **unsafe\_\_useLiveInstance**: () => [`Live`](../classes/Live.md)\<`KeyframesSnapshot`\>
|
|
52
|
+
|
|
53
|
+
不建议这样使用
|
|
54
|
+
|
|
55
|
+
#### Returns
|
|
56
|
+
|
|
57
|
+
[`Live`](../classes/Live.md)\<`KeyframesSnapshot`\>
|
|
58
|
+
|
|
59
|
+
#### Deprecated
|
|
60
|
+
|
|
61
|
+
### unsafe\_\_useRTCInstance()
|
|
62
|
+
|
|
63
|
+
> **unsafe\_\_useRTCInstance**: () => [`RTCProtocol`](../interfaces/RTCProtocol.md)
|
|
64
|
+
|
|
65
|
+
不建议这样使用
|
|
66
|
+
|
|
67
|
+
#### Returns
|
|
68
|
+
|
|
69
|
+
[`RTCProtocol`](../interfaces/RTCProtocol.md)
|
|
70
|
+
|
|
71
|
+
#### Deprecated
|
|
72
|
+
|
|
73
|
+
### useConnect()
|
|
74
|
+
|
|
75
|
+
> **useConnect**: () => (`options`) => `Promise`\<`true` \| `Error`\>
|
|
76
|
+
|
|
77
|
+
带看连接操作
|
|
78
|
+
|
|
79
|
+
#### Returns
|
|
80
|
+
|
|
81
|
+
`Function`
|
|
82
|
+
|
|
83
|
+
##### Parameters
|
|
84
|
+
|
|
85
|
+
• **options**: [`LiveConnectOptions`](../type-aliases/LiveConnectOptions.md)
|
|
86
|
+
|
|
87
|
+
##### Returns
|
|
88
|
+
|
|
89
|
+
`Promise`\<`true` \| `Error`\>
|
|
90
|
+
|
|
91
|
+
### useKeyframe()
|
|
92
|
+
|
|
93
|
+
> **useKeyframe**: \<`K`\>(`key`) => (`undefined` \| `KeyframesSnapshot`\[`K`\] \| (`frame`) => `boolean` \| `Error`)[]
|
|
94
|
+
|
|
95
|
+
#### Type Parameters
|
|
96
|
+
|
|
97
|
+
• **K** *extends* `string` \| `number` \| `symbol`
|
|
98
|
+
|
|
99
|
+
#### Parameters
|
|
100
|
+
|
|
101
|
+
• **key**: `K`
|
|
102
|
+
|
|
103
|
+
#### Returns
|
|
104
|
+
|
|
105
|
+
(`undefined` \| `KeyframesSnapshot`\[`K`\] \| (`frame`) => `boolean` \| `Error`)[]
|
|
106
|
+
|
|
107
|
+
### useKeyframesSnapshot()
|
|
108
|
+
|
|
109
|
+
> **useKeyframesSnapshot**: () => `Partial`\<`KeyframesSnapshot`\>
|
|
110
|
+
|
|
111
|
+
使用帧数据
|
|
112
|
+
|
|
113
|
+
#### Returns
|
|
114
|
+
|
|
115
|
+
`Partial`\<`KeyframesSnapshot`\>
|
|
116
|
+
|
|
117
|
+
返回当前的帧数据
|
|
118
|
+
|
|
119
|
+
### useKeyframeUpdateCallback()
|
|
120
|
+
|
|
121
|
+
> **useKeyframeUpdateCallback**: \<`KeyOfKeyframe`\>(`key`, `callback`, `deps`) => () => `void`
|
|
122
|
+
|
|
123
|
+
使用帧数据更新回调
|
|
124
|
+
|
|
125
|
+
#### Type Parameters
|
|
126
|
+
|
|
127
|
+
• **KeyOfKeyframe** *extends* `string` \| `number` \| `symbol`
|
|
128
|
+
|
|
129
|
+
#### Parameters
|
|
130
|
+
|
|
131
|
+
• **key**: `KeyOfKeyframe`
|
|
132
|
+
|
|
133
|
+
帧数据的键
|
|
134
|
+
|
|
135
|
+
• **callback**
|
|
136
|
+
|
|
137
|
+
回调函数
|
|
138
|
+
|
|
139
|
+
• **deps**: `DependencyList` = `[]`
|
|
140
|
+
|
|
141
|
+
依赖项
|
|
142
|
+
|
|
143
|
+
#### Returns
|
|
144
|
+
|
|
145
|
+
`Function`
|
|
146
|
+
|
|
147
|
+
返回一个清理函数
|
|
148
|
+
|
|
149
|
+
##### Returns
|
|
150
|
+
|
|
151
|
+
`void`
|
|
152
|
+
|
|
153
|
+
### useLiveAction()
|
|
154
|
+
|
|
155
|
+
> **useLiveAction**: () => `object`
|
|
156
|
+
|
|
157
|
+
带看的一些操作
|
|
158
|
+
|
|
159
|
+
#### Returns
|
|
160
|
+
|
|
161
|
+
`object`
|
|
162
|
+
|
|
163
|
+
返回一组与带看相关的操作函数
|
|
164
|
+
|
|
165
|
+
##### broadcast()
|
|
166
|
+
|
|
167
|
+
> **broadcast**: (`data`, `toUserIds`, `timeout`) => `Promise`\<`void`\>
|
|
168
|
+
|
|
169
|
+
###### Parameters
|
|
170
|
+
|
|
171
|
+
• **data**: `Record`\<`string`, `any`\>
|
|
172
|
+
|
|
173
|
+
• **toUserIds**: `string` \| `string`[]
|
|
174
|
+
|
|
175
|
+
• **timeout**: `number` = `0`
|
|
176
|
+
|
|
177
|
+
###### Returns
|
|
178
|
+
|
|
179
|
+
`Promise`\<`void`\>
|
|
180
|
+
|
|
181
|
+
##### connect()
|
|
182
|
+
|
|
183
|
+
> **connect**: (`options`) => `Promise`\<`void`\>
|
|
184
|
+
|
|
185
|
+
###### Parameters
|
|
186
|
+
|
|
187
|
+
• **options**: [`LiveConnectOptions`](../type-aliases/LiveConnectOptions.md)
|
|
188
|
+
|
|
189
|
+
###### Returns
|
|
190
|
+
|
|
191
|
+
`Promise`\<`void`\>
|
|
192
|
+
|
|
193
|
+
##### exit()
|
|
194
|
+
|
|
195
|
+
> **exit**: () => `Promise`\<`void`\>
|
|
196
|
+
|
|
197
|
+
###### Returns
|
|
198
|
+
|
|
199
|
+
`Promise`\<`void`\>
|
|
200
|
+
|
|
201
|
+
##### forbidMicro()
|
|
202
|
+
|
|
203
|
+
> **forbidMicro**: (`micro`, `toUserIds`) => `Promise`\<`void`\>
|
|
204
|
+
|
|
205
|
+
###### Parameters
|
|
206
|
+
|
|
207
|
+
• **micro**: [`MicroStatus`](../enumerations/MicroStatus.md)
|
|
208
|
+
|
|
209
|
+
• **toUserIds**: `string` \| `string`[] = `[]`
|
|
210
|
+
|
|
211
|
+
###### Returns
|
|
212
|
+
|
|
213
|
+
`Promise`\<`void`\>
|
|
214
|
+
|
|
215
|
+
##### forbidSync()
|
|
216
|
+
|
|
217
|
+
> **forbidSync**: (`sync`, `toUserIds`) => `void`
|
|
218
|
+
|
|
219
|
+
###### Parameters
|
|
220
|
+
|
|
221
|
+
• **sync**: `boolean`
|
|
222
|
+
|
|
223
|
+
• **toUserIds**: `string` \| `string`[] = `[]`
|
|
224
|
+
|
|
225
|
+
###### Returns
|
|
226
|
+
|
|
227
|
+
`void`
|
|
228
|
+
|
|
229
|
+
##### getFramesByKey()
|
|
230
|
+
|
|
231
|
+
> **getFramesByKey**: (`key`) => `undefined` \| `Partial`\<`KeyframesSnapshot`\>\[keyof `KeyframesSnapshot`\]
|
|
232
|
+
|
|
233
|
+
###### Parameters
|
|
234
|
+
|
|
235
|
+
• **key**: keyof `KeyframesSnapshot`
|
|
236
|
+
|
|
237
|
+
###### Returns
|
|
238
|
+
|
|
239
|
+
`undefined` \| `Partial`\<`KeyframesSnapshot`\>\[keyof `KeyframesSnapshot`\]
|
|
240
|
+
|
|
241
|
+
##### kick()
|
|
242
|
+
|
|
243
|
+
> **kick**: (`toUserIds`) => `Promise`\<`void`\>
|
|
244
|
+
|
|
245
|
+
###### Parameters
|
|
246
|
+
|
|
247
|
+
• **toUserIds**: `string` \| `string`[]
|
|
248
|
+
|
|
249
|
+
###### Returns
|
|
250
|
+
|
|
251
|
+
`Promise`\<`void`\>
|
|
252
|
+
|
|
253
|
+
##### sendKeyframe()
|
|
254
|
+
|
|
255
|
+
> **sendKeyframe**: (`key`, `frame`) => `void`
|
|
256
|
+
|
|
257
|
+
###### Parameters
|
|
258
|
+
|
|
259
|
+
• **key**: keyof `KeyframesSnapshot`
|
|
260
|
+
|
|
261
|
+
• **frame**: `KeyframesSnapshot`\[keyof `KeyframesSnapshot`\]
|
|
262
|
+
|
|
263
|
+
###### Returns
|
|
264
|
+
|
|
265
|
+
`void`
|
|
266
|
+
|
|
267
|
+
##### setSelfInfo()
|
|
268
|
+
|
|
269
|
+
> **setSelfInfo**: (`userInfo`) => `void`
|
|
270
|
+
|
|
271
|
+
###### Parameters
|
|
272
|
+
|
|
273
|
+
• **userInfo**: `Partial`\<[`UserInfo`](../type-aliases/UserInfo.md)\>
|
|
274
|
+
|
|
275
|
+
###### Returns
|
|
276
|
+
|
|
277
|
+
`void`
|
|
278
|
+
|
|
279
|
+
##### toggleMicro()
|
|
280
|
+
|
|
281
|
+
> **toggleMicro**: (`microStatus`) => `void`
|
|
282
|
+
|
|
283
|
+
###### Parameters
|
|
284
|
+
|
|
285
|
+
• **microStatus**: `boolean`
|
|
286
|
+
|
|
287
|
+
###### Returns
|
|
288
|
+
|
|
289
|
+
`void`
|
|
290
|
+
|
|
291
|
+
##### updateStatus()
|
|
292
|
+
|
|
293
|
+
> **updateStatus**: (`evtType`, `atnType`, `status`, `toUserIds`?) => `void`
|
|
294
|
+
|
|
295
|
+
###### Parameters
|
|
296
|
+
|
|
297
|
+
• **evtType**: [`BuiltinEventType`](../enumerations/BuiltinEventType.md)
|
|
298
|
+
|
|
299
|
+
• **atnType**: [`BuiltinActionType`](../enumerations/BuiltinActionType.md)
|
|
300
|
+
|
|
301
|
+
• **status**: `Record`\<`string`, `any`\>
|
|
302
|
+
|
|
303
|
+
• **toUserIds?**: `string` \| `string`[]
|
|
304
|
+
|
|
305
|
+
###### Returns
|
|
306
|
+
|
|
307
|
+
`void`
|
|
308
|
+
|
|
309
|
+
### useLiveEventCallback()
|
|
310
|
+
|
|
311
|
+
> **useLiveEventCallback**: \<`K`\>(`name`, `callback`, `deps`) => () => `void`
|
|
312
|
+
|
|
313
|
+
#### Type Parameters
|
|
314
|
+
|
|
315
|
+
• **K** *extends* keyof [`LiveEventType`](../type-aliases/LiveEventType.md)\<`KeyframesSnapshot`\>
|
|
316
|
+
|
|
317
|
+
#### Parameters
|
|
318
|
+
|
|
319
|
+
• **name**: `K`
|
|
320
|
+
|
|
321
|
+
• **callback**
|
|
322
|
+
|
|
323
|
+
• **deps**: `DependencyList` = `[]`
|
|
324
|
+
|
|
325
|
+
#### Returns
|
|
326
|
+
|
|
327
|
+
`Function`
|
|
328
|
+
|
|
329
|
+
##### Returns
|
|
330
|
+
|
|
331
|
+
`void`
|
|
332
|
+
|
|
333
|
+
### useLiveState()
|
|
334
|
+
|
|
335
|
+
> **useLiveState**: () => [`LiveState`](../enumerations/LiveState.md)
|
|
336
|
+
|
|
337
|
+
带看状态
|
|
338
|
+
|
|
339
|
+
#### Returns
|
|
340
|
+
|
|
341
|
+
[`LiveState`](../enumerations/LiveState.md)
|
|
342
|
+
|
|
343
|
+
### useRTCAction()
|
|
344
|
+
|
|
345
|
+
> **useRTCAction**: () => `object`
|
|
346
|
+
|
|
347
|
+
#### Returns
|
|
348
|
+
|
|
349
|
+
`object`
|
|
350
|
+
|
|
351
|
+
##### detectMicro()
|
|
352
|
+
|
|
353
|
+
> **detectMicro**: () => `Promise`\<`boolean`\>
|
|
354
|
+
|
|
355
|
+
###### Returns
|
|
356
|
+
|
|
357
|
+
`Promise`\<`boolean`\>
|
|
358
|
+
|
|
359
|
+
##### join()
|
|
360
|
+
|
|
361
|
+
> **join**: (`options`) => `Promise`\<`boolean`\>
|
|
362
|
+
|
|
363
|
+
###### Parameters
|
|
364
|
+
|
|
365
|
+
• **options**
|
|
366
|
+
|
|
367
|
+
• **options.roomId**: `string`
|
|
368
|
+
|
|
369
|
+
• **options.type**: [`RTCType`](../enumerations/RTCType.md)
|
|
370
|
+
|
|
371
|
+
• **options.userId**: `string`
|
|
372
|
+
|
|
373
|
+
• **options.voiceId**: `string`
|
|
374
|
+
|
|
375
|
+
###### Returns
|
|
376
|
+
|
|
377
|
+
`Promise`\<`boolean`\>
|
|
378
|
+
|
|
379
|
+
##### quit()
|
|
380
|
+
|
|
381
|
+
> **quit**: () => `Promise`\<`boolean`\>
|
|
382
|
+
|
|
383
|
+
###### Returns
|
|
384
|
+
|
|
385
|
+
`Promise`\<`boolean`\>
|
|
386
|
+
|
|
387
|
+
##### shock()
|
|
388
|
+
|
|
389
|
+
> **shock**: () => `undefined` \| `void`
|
|
390
|
+
|
|
391
|
+
###### Returns
|
|
392
|
+
|
|
393
|
+
`undefined` \| `void`
|
|
394
|
+
|
|
395
|
+
##### toggleMicro()
|
|
396
|
+
|
|
397
|
+
> **toggleMicro**: (`flag`?) => `Promise`\<`boolean`\>
|
|
398
|
+
|
|
399
|
+
###### Parameters
|
|
400
|
+
|
|
401
|
+
• **flag?**: `boolean`
|
|
402
|
+
|
|
403
|
+
###### Returns
|
|
404
|
+
|
|
405
|
+
`Promise`\<`boolean`\>
|
|
406
|
+
|
|
407
|
+
### useRTCEventCallback()
|
|
408
|
+
|
|
409
|
+
> **useRTCEventCallback**: \<`K`\>(`name`, `callback`, `deps`) => () => `void`
|
|
410
|
+
|
|
411
|
+
#### Type Parameters
|
|
412
|
+
|
|
413
|
+
• **K** *extends* keyof [`RTCEventType`](../type-aliases/RTCEventType.md)
|
|
414
|
+
|
|
415
|
+
#### Parameters
|
|
416
|
+
|
|
417
|
+
• **name**: `K`
|
|
418
|
+
|
|
419
|
+
• **callback**
|
|
420
|
+
|
|
421
|
+
• **deps**: `DependencyList` = `[]`
|
|
422
|
+
|
|
423
|
+
#### Returns
|
|
424
|
+
|
|
425
|
+
`Function`
|
|
426
|
+
|
|
427
|
+
##### Returns
|
|
428
|
+
|
|
429
|
+
`void`
|
|
430
|
+
|
|
431
|
+
### useSelfInfo()
|
|
432
|
+
|
|
433
|
+
> **useSelfInfo**: () => (`Partial`\<[`UserInfo`](../type-aliases/UserInfo.md)\> \| (`userInfo`) => `Promise`\<`boolean`\>)[]
|
|
434
|
+
|
|
435
|
+
#### Returns
|
|
436
|
+
|
|
437
|
+
(`Partial`\<[`UserInfo`](../type-aliases/UserInfo.md)\> \| (`userInfo`) => `Promise`\<`boolean`\>)[]
|
|
438
|
+
|
|
439
|
+
### useUserList()
|
|
440
|
+
|
|
441
|
+
> **useUserList**: () => [`UserInfo`](../type-aliases/UserInfo.md)[]
|
|
442
|
+
|
|
443
|
+
#### Returns
|
|
444
|
+
|
|
445
|
+
[`UserInfo`](../type-aliases/UserInfo.md)[]
|
|
446
|
+
|
|
447
|
+
## Defined in
|
|
448
|
+
|
|
449
|
+
live/createLiveReact.ts:29
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[**如视 Live SDK**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[如视 Live SDK](../globals.md) / parseLiveMsg
|
|
6
|
+
|
|
7
|
+
# Function: parseLiveMsg()
|
|
8
|
+
|
|
9
|
+
> **parseLiveMsg**(`jsonTxt`): [`LiveMsg`](../type-aliases/LiveMsg.md) \| `boolean`
|
|
10
|
+
|
|
11
|
+
解析下后端数据格式。
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
• **jsonTxt**: `string`
|
|
16
|
+
|
|
17
|
+
JSON序列化后的文本。
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
[`LiveMsg`](../type-aliases/LiveMsg.md) \| `boolean`
|
|
22
|
+
|
|
23
|
+
false 标识解析失败;解析成功返回 [LiveMsg](../type-aliases/LiveMsg.md) 实例。
|
|
24
|
+
|
|
25
|
+
## Defined in
|
|
26
|
+
|
|
27
|
+
typings/live/LiveMsg.ts:139
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[**如视 Live SDK**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[如视 Live SDK](../globals.md) / parseWSClsErr
|
|
6
|
+
|
|
7
|
+
# Function: parseWSClsErr()
|
|
8
|
+
|
|
9
|
+
> **parseWSClsErr**(`code`): [`WebSocketCloseError`](../enumerations/WebSocketCloseError.md)
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
• **code**: `number`
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
[`WebSocketCloseError`](../enumerations/WebSocketCloseError.md)
|
|
18
|
+
|
|
19
|
+
## Defined in
|
|
20
|
+
|
|
21
|
+
typings/live/WebSocket.ts:94
|
package/docs/globals.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
[**如视 Live SDK**](README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
# 如视 Live SDK
|
|
6
|
+
|
|
7
|
+
## Namespaces
|
|
8
|
+
|
|
9
|
+
- [SubscribeMixinType](namespaces/SubscribeMixinType/README.md)
|
|
10
|
+
|
|
11
|
+
## Enumerations
|
|
12
|
+
|
|
13
|
+
- [BuiltinActionType](enumerations/BuiltinActionType.md)
|
|
14
|
+
- [BuiltinEventType](enumerations/BuiltinEventType.md)
|
|
15
|
+
- [BuiltInRTCType](enumerations/BuiltInRTCType.md)
|
|
16
|
+
- [Command](enumerations/Command.md)
|
|
17
|
+
- [LiveState](enumerations/LiveState.md)
|
|
18
|
+
- [MemUserStatus](enumerations/MemUserStatus.md)
|
|
19
|
+
- [MicroStatus](enumerations/MicroStatus.md)
|
|
20
|
+
- [RTCJoinedInfoCodeEnum](enumerations/RTCJoinedInfoCodeEnum.md)
|
|
21
|
+
- [RTCType](enumerations/RTCType.md)
|
|
22
|
+
- [UserStatus](enumerations/UserStatus.md)
|
|
23
|
+
- [WebSocketCloseError](enumerations/WebSocketCloseError.md)
|
|
24
|
+
- [WebSocketErrorType](enumerations/WebSocketErrorType.md)
|
|
25
|
+
- [WebSocketState](enumerations/WebSocketState.md)
|
|
26
|
+
|
|
27
|
+
## Classes
|
|
28
|
+
|
|
29
|
+
- [BrowserRTC](classes/BrowserRTC.md)
|
|
30
|
+
- [BrowserRTC4Chime](classes/BrowserRTC4Chime.md)
|
|
31
|
+
- [CoreRTC](classes/CoreRTC.md)
|
|
32
|
+
- [Live](classes/Live.md)
|
|
33
|
+
- [Subscribe](classes/Subscribe.md)
|
|
34
|
+
- [VRWebViewRTC](classes/VRWebViewRTC.md)
|
|
35
|
+
|
|
36
|
+
## Interfaces
|
|
37
|
+
|
|
38
|
+
- [AttendeeResponse](interfaces/AttendeeResponse.md)
|
|
39
|
+
- [LiveOptions](interfaces/LiveOptions.md)
|
|
40
|
+
- [MeetingResponse](interfaces/MeetingResponse.md)
|
|
41
|
+
- [MeetingSessionConfigurationOptions](interfaces/MeetingSessionConfigurationOptions.md)
|
|
42
|
+
- [Permission](interfaces/Permission.md)
|
|
43
|
+
- [RTCJoinedInfo](interfaces/RTCJoinedInfo.md)
|
|
44
|
+
- [RTCProtocol](interfaces/RTCProtocol.md)
|
|
45
|
+
- [VRWebViewRTCOptions](interfaces/VRWebViewRTCOptions.md)
|
|
46
|
+
|
|
47
|
+
## Type Aliases
|
|
48
|
+
|
|
49
|
+
- [BuiltinMsg](type-aliases/BuiltinMsg.md)
|
|
50
|
+
- [EventMap](type-aliases/EventMap.md)
|
|
51
|
+
- [EventType](type-aliases/EventType.md)
|
|
52
|
+
- [GetVoiceSign](type-aliases/GetVoiceSign.md)
|
|
53
|
+
- [GetVoiceSignParams](type-aliases/GetVoiceSignParams.md)
|
|
54
|
+
- [GetVoiceSignReturnType](type-aliases/GetVoiceSignReturnType.md)
|
|
55
|
+
- [KeyframeEventType](type-aliases/KeyframeEventType.md)
|
|
56
|
+
- [LiveBuiltInData](type-aliases/LiveBuiltInData.md)
|
|
57
|
+
- [LiveConnectOptions](type-aliases/LiveConnectOptions.md)
|
|
58
|
+
- [LiveEventType](type-aliases/LiveEventType.md)
|
|
59
|
+
- [LiveMsg](type-aliases/LiveMsg.md)
|
|
60
|
+
- [LiveProviderPropTypes](type-aliases/LiveProviderPropTypes.md)
|
|
61
|
+
- [ReqLiveMsg](type-aliases/ReqLiveMsg.md)
|
|
62
|
+
- [RoomInfo](type-aliases/RoomInfo.md)
|
|
63
|
+
- [RTCActionReactCallback](type-aliases/RTCActionReactCallback.md)
|
|
64
|
+
- [RTCEventType](type-aliases/RTCEventType.md)
|
|
65
|
+
- [UserInfo](type-aliases/UserInfo.md)
|
|
66
|
+
- [UserInfoExt](type-aliases/UserInfoExt.md)
|
|
67
|
+
- [UserVolume](type-aliases/UserVolume.md)
|
|
68
|
+
- [WebSocketError](type-aliases/WebSocketError.md)
|
|
69
|
+
|
|
70
|
+
## Functions
|
|
71
|
+
|
|
72
|
+
- [\_clearLiveInstanceIfNeed](functions/clearLiveInstanceIfNeed.md)
|
|
73
|
+
- [createLive](functions/createLive.md)
|
|
74
|
+
- [createLiveReact](functions/createLiveReact.md)
|
|
75
|
+
- [GetVoiceSignFn](functions/GetVoiceSignFn.md)
|
|
76
|
+
- [parseLiveMsg](functions/parseLiveMsg.md)
|
|
77
|
+
- [parseWSClsErr](functions/parseWSClsErr.md)
|