larksr_websdk 3.3.102 → 3.3.104
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/dist/doc/en/config.md +99 -99
- package/dist/doc/en/dev.md +21 -21
- package/dist/doc/en/event_codes.md +117 -117
- package/dist/doc/en/events.md +72 -72
- package/dist/doc/en/functions.md +239 -239
- package/dist/doc/en/index.md +1 -1
- package/dist/doc/en/member_variables.md +116 -120
- package/dist/doc/en/multi_media_3_2_401.md +20 -20
- package/dist/doc/en/sdkid_encryption.md +14 -14
- package/dist/doc/en/update.md +462 -462
- package/dist/doc/zh_CN/config.md +1 -1
- package/dist/doc/zh_CN/event_codes.md +1 -1
- package/dist/doc/zh_CN/functions.md +2 -2
- package/dist/doc/zh_CN/index.md +1 -1
- package/dist/doc/zh_CN/multi_media_3_2_401.md +1 -1
- package/dist/doc/zh_CN/update.md +579 -579
- package/dist/larksr-web-sdk.min.js +1 -1
- package/dist/types/api.d.ts +2 -0
- package/dist/types/appli_params.d.ts +14 -0
- package/dist/types/lark/application.d.ts +2 -1
- package/dist/types/lark/message.d.ts +1 -0
- package/dist/types/larksr.d.ts +83 -4
- package/dist/types/localization/ui.d.ts +2 -0
- package/dist/types/operation/keyboard_handler.d.ts +25 -0
- package/dist/types/utils/lock_pointer.d.ts +2 -1
- package/package.json +72 -72
- package/types/api.d.ts +2 -0
- package/types/appli_params.d.ts +14 -0
- package/types/lark/application.d.ts +2 -1
- package/types/lark/message.d.ts +1 -0
- package/types/larksr.d.ts +83 -4
- package/types/localization/ui.d.ts +2 -0
- package/types/operation/keyboard_handler.d.ts +25 -0
- package/types/utils/lock_pointer.d.ts +2 -1
- package/dist/types/lark/custom.d.ts +0 -7
- package/dist/types/lark/webcodecs.generated.d.ts +0 -417
- package/dist/types/protobuf/cloudlark.d.ts +0 -9674
- package/dist/types/utils/ios-inner-height.d.ts +0 -4
- package/types/lark/custom.d.ts +0 -7
- package/types/lark/webcodecs.generated.d.ts +0 -417
- package/types/protobuf/cloudlark.d.ts +0 -9674
- package/types/utils/ios-inner-height.d.ts +0 -4
package/dist/doc/en/events.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# LarkSR
|
|
1
|
+
# LarkSR Event System
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Throughout the lifecycle of LarkSR, various event notifications will be thrown. The usage is similar to:
|
|
4
4
|
|
|
5
5
|
```javascript
|
|
6
6
|
var larksr;
|
|
@@ -8,13 +8,13 @@ var larksr;
|
|
|
8
8
|
// create code
|
|
9
9
|
...
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// Listen for the connection success event
|
|
12
12
|
larksr.on('connect', function(e) {
|
|
13
13
|
console.log("LarkSRClientEvent CONNECT", e);
|
|
14
14
|
});
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Or use the exported enum values
|
|
18
18
|
|
|
19
19
|
```javascript
|
|
20
20
|
larksr.on(LarkSRClientEvent.TASK_CREATE_SUCCESS, (e) => {
|
|
@@ -22,207 +22,207 @@ larksr.on(LarkSRClientEvent.TASK_CREATE_SUCCESS, (e) => {
|
|
|
22
22
|
});
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
[event_codes](./event_codes.md)
|
|
25
|
+
The `LarkEvent = 'larkevent'`, `ERROR = 'error'`, `INFO = 'info'` events have an attached code field, which includes event codes: [event_codes](./event_codes.md)
|
|
26
|
+
The event code values in [event_codes](./event_codes.md) will be thrown in the LarkEvent event.
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Complete Event Definitions
|
|
29
29
|
|
|
30
30
|
```javascript
|
|
31
31
|
/**
|
|
32
|
-
* LarkSR
|
|
32
|
+
* Complete event definitions for LarkSR instance
|
|
33
33
|
*/
|
|
34
34
|
declare const enum LarkSRClientEvent {
|
|
35
35
|
/**
|
|
36
|
-
* TASK
|
|
36
|
+
* TASK creation successful, returns Task related information
|
|
37
37
|
*/
|
|
38
38
|
TASK_CREATE_SUCCESS = "taskcreatesuccess",
|
|
39
39
|
/**
|
|
40
|
-
* TASK
|
|
40
|
+
* TASK creation failed
|
|
41
41
|
*/
|
|
42
42
|
TASK_CREATE_FAILED = "taskcreatefailed",
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
// 813
|
|
49
|
-
// 814
|
|
50
|
-
// 815
|
|
51
|
-
// 816=VR
|
|
52
|
-
// 817
|
|
53
|
-
// 820
|
|
54
|
-
// 821
|
|
55
|
-
// 823
|
|
44
|
+
* Insufficient rendering resources
|
|
45
|
+
* {
|
|
46
|
+
// Error code returned by the server, present when the server request is correct. Pay attention to the error codes for insufficient rendering resources.
|
|
47
|
+
// Use type == 0 to determine if it is an insufficient rendering resource error, then use code for detailed handling, or just use type == 0 for handling.
|
|
48
|
+
// 813=The current number of running applications has reached the maximum: {0}, please try again later
|
|
49
|
+
// 814=The number of running applications under the same appKey has reached the maximum: {0}, please try again later
|
|
50
|
+
// 815=The number of running applications has reached the maximum authorized concurrency, please try again later
|
|
51
|
+
// 816=The number of running VR applications has reached the maximum authorized concurrency, please try again later
|
|
52
|
+
// 817=Insufficient rendering resources, please try again later
|
|
53
|
+
// 820=No active GPU nodes
|
|
54
|
+
// 821=Node resource usage has reached the set threshold
|
|
55
|
+
// 823=The number of running applications on a single node has reached the maximum authorized concurrency, please try again later
|
|
56
56
|
code?: 817,
|
|
57
57
|
|
|
58
|
-
//
|
|
58
|
+
// Error message
|
|
59
59
|
message:? "",
|
|
60
60
|
}
|
|
61
61
|
*
|
|
62
62
|
*/
|
|
63
63
|
RESOURCE_NOT_ENOUGH = "resourcenotenough",
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Successfully connected to the rendering server.
|
|
66
66
|
*/
|
|
67
67
|
CONNECT = "connect",
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Triggered when login is successful, returns the current user id.
|
|
70
70
|
*/
|
|
71
71
|
LOGIN_SUCCESS = "loginsuccess",
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Triggered when there is no operation timeout.
|
|
74
74
|
*/
|
|
75
75
|
NO_OPERATION_TIMEOUT = "operatetimeout",
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* Connection closed.
|
|
78
78
|
*/
|
|
79
79
|
CLOSE = "close",
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Cloud application closed, but connection not closed
|
|
82
82
|
*/
|
|
83
83
|
APP_CLOSE = "appclose",
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* Received remote video stream.
|
|
86
86
|
*/
|
|
87
87
|
GOT_REMOTE_STREAM = "gotremotestream",
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* Received remote audio stream.
|
|
90
90
|
*/
|
|
91
91
|
GOT_REMOTE_AUDIO_STREAM = "gotremoteaudiostream",
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* Video loaded successfully, waiting to play.
|
|
94
94
|
*/
|
|
95
95
|
MEDIA_LOADED = "meidaloaded",
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* Video autoplay successful.
|
|
98
98
|
*/
|
|
99
99
|
MEDIA_PLAY_SUCCESS = "mediaplaysuccess",
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
101
|
+
* Video autoplay failed.
|
|
102
102
|
*/
|
|
103
103
|
MEDIA_PLAY_FAILED = "mediaplayfailed",
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
105
|
+
* Autoplay sound failed, playing in mute mode.
|
|
106
106
|
*/
|
|
107
107
|
MEDIA_PLAY_MUTE = "meidaplaymute",
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
109
|
+
* Cloud rendering connection state changed.
|
|
110
110
|
*/
|
|
111
111
|
APPSTATE_CHANGE = "appstatechange",
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
113
|
+
* Cloud application size changed.
|
|
114
114
|
*/
|
|
115
115
|
APP_RESIZE = "appresize",
|
|
116
116
|
/**
|
|
117
|
-
*
|
|
117
|
+
* Triggered when the cloud application mouse mode changes.
|
|
118
118
|
*/
|
|
119
119
|
APP_MOUSE_MODE = "appmousemode",
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
121
|
+
* Cloud application mouse state changed.
|
|
122
122
|
*/
|
|
123
123
|
APP_CURSOR_MODE = "appcursormode",
|
|
124
124
|
/**
|
|
125
|
-
*
|
|
125
|
+
* Player list.
|
|
126
126
|
*/
|
|
127
127
|
PLAYER_LIST = "playerlist",
|
|
128
128
|
/**
|
|
129
|
-
*
|
|
129
|
+
* Video connection status
|
|
130
130
|
*/
|
|
131
131
|
PEERSTATUS_REPORT = "peerstatusreport",
|
|
132
132
|
/**
|
|
133
|
-
*
|
|
133
|
+
* Cloud application requests text input.
|
|
134
134
|
*/
|
|
135
135
|
APP_REQUEST_INPUT = "apprequestinput",
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
137
|
+
* Cloud application requests gamepad vibration
|
|
138
138
|
*/
|
|
139
139
|
APP_REQUEST_GAMEPAD_OUPUT = "apprequestgamepadoutput",
|
|
140
140
|
/**
|
|
141
|
-
*
|
|
141
|
+
* Screenshot successful.
|
|
142
142
|
*/
|
|
143
143
|
CAPTURE_FRAME = "captureframe",
|
|
144
144
|
/**
|
|
145
|
-
*
|
|
145
|
+
* Data channel opened.
|
|
146
146
|
*/
|
|
147
147
|
DATACHANNEL_OPEN = "datachannelopen",
|
|
148
148
|
/**
|
|
149
|
-
*
|
|
149
|
+
* Data channel closed.
|
|
150
150
|
*/
|
|
151
151
|
DATACHANNEL_CLOSE = "datachannelclose",
|
|
152
152
|
/**
|
|
153
|
-
*
|
|
154
|
-
* > V3.2.314
|
|
153
|
+
* Data channel received text message.
|
|
154
|
+
* > V3.2.314 version corresponds to server version and data channel version 3.2.5.1 and above
|
|
155
155
|
*/
|
|
156
156
|
DATACHANNEL_TEXT = "datachanneltext",
|
|
157
157
|
/**
|
|
158
|
-
*
|
|
158
|
+
* Data channel received binary message.
|
|
159
159
|
*/
|
|
160
160
|
DATACHANNEL_BINARY = "datachannelbinary",
|
|
161
161
|
/**
|
|
162
|
-
*
|
|
162
|
+
* More detailed event status, mainly used for throwing to the outside of the iframe.
|
|
163
163
|
*/
|
|
164
164
|
LarkEvent = "larkevent",
|
|
165
165
|
/**
|
|
166
|
-
*
|
|
166
|
+
* Thrown when an error occurs
|
|
167
167
|
* type: error
|
|
168
|
-
* message:
|
|
169
|
-
* code:
|
|
170
|
-
* //
|
|
168
|
+
* message: Error message
|
|
169
|
+
* code: Possible error codes are as follows, the specific definition of error codes @see [./event_codes]
|
|
170
|
+
* // Websocket proxy to the server closed
|
|
171
171
|
* LK_RENDER_SERVER_CLOSE : 102
|
|
172
|
-
* //
|
|
172
|
+
* // Websocket proxy to the proxy server closed
|
|
173
173
|
* LK_PROXY_SERVER_CLOSE : 202
|
|
174
|
-
* //
|
|
174
|
+
* // Version check failed, server and client version mismatch. Currently only 3.1 and 3.2 major version mismatch
|
|
175
175
|
* LK_VERSION_CHECK_FAILED : 301
|
|
176
|
-
* //
|
|
176
|
+
* // Server returned Task creation failed
|
|
177
177
|
* TASK_NOTFOUND-TASK_NO_GPU_RESOURCE : 401-404
|
|
178
|
-
* //
|
|
178
|
+
* // Server failed to start streaming
|
|
179
179
|
* LK_START_STREAM_PROCESS_START-FAILED-LK_START_STREAM_ENCODER_ERROR : 501-504
|
|
180
|
-
* // RTC
|
|
180
|
+
* // RTC connection closed
|
|
181
181
|
* LK_RTC_EVENT_PEERCONNECTION_CLOSED : 601
|
|
182
|
-
* // RTC
|
|
182
|
+
* // RTC connection error
|
|
183
183
|
* LK_RTC_EVENT_PEERCONNECTION_ERROR : 602
|
|
184
|
-
* // RTC
|
|
184
|
+
* // RTC creation error, usually due to browser not supporting webrtc
|
|
185
185
|
* LK_RTC_EVENT_PEERCONNECTION_CREATE_FAILED : 603
|
|
186
|
-
* //
|
|
186
|
+
* // Server actively requests client to exit
|
|
187
187
|
* LK_NOTIFY_CLIENT_LOGOUT_PLAYER_LOGOUT : 800
|
|
188
|
-
* //
|
|
188
|
+
* // Host exits in multi-viewer mode
|
|
189
189
|
* LK_NOTIFY_CLIENT_LOGOUT_TASKOWNER_LOGOUT : 801
|
|
190
190
|
*
|
|
191
191
|
*/
|
|
192
192
|
ERROR = "error",
|
|
193
193
|
/**
|
|
194
|
-
*
|
|
194
|
+
* General information prompt
|
|
195
195
|
*/
|
|
196
196
|
INFO = "info",
|
|
197
197
|
/**
|
|
198
|
-
*
|
|
198
|
+
* Voice dialogue status
|
|
199
199
|
*/
|
|
200
200
|
AI_VOICE_STATUS = "aivoicestatus",
|
|
201
201
|
/**
|
|
202
|
-
*
|
|
202
|
+
* Voice recognition to text result
|
|
203
203
|
*/
|
|
204
204
|
AI_VOICE_ASR_RESULT = "aivoiceasrresult",
|
|
205
205
|
/**
|
|
206
|
-
*
|
|
206
|
+
* Dialogue return result
|
|
207
207
|
*/
|
|
208
208
|
AI_VOICE_DM_RESULT = "aivoicedmresult",
|
|
209
209
|
/**
|
|
210
|
-
*
|
|
210
|
+
* Detailed information on dialogue errors
|
|
211
211
|
*/
|
|
212
212
|
AI_VOICE_ERROR = "aivoiceerror",
|
|
213
213
|
/**
|
|
214
|
-
*
|
|
214
|
+
* Added in server 3.2.7.0
|
|
215
215
|
*
|
|
216
216
|
*/
|
|
217
217
|
TOUCH_CTR_MAPPING = "touchctrmapping",
|
|
218
218
|
/**
|
|
219
|
-
*
|
|
220
|
-
*
|
|
219
|
+
* Added in server 3.2.7.0
|
|
220
|
+
* RTMP live stream status
|
|
221
221
|
*/
|
|
222
222
|
RTMP_STREAM_STATE = "rtmpstreamstate",
|
|
223
223
|
/**
|
|
224
|
-
*
|
|
225
|
-
*
|
|
224
|
+
* Added in server 3.2.7.0
|
|
225
|
+
* RTMP live stream error
|
|
226
226
|
*/
|
|
227
227
|
RTMP_STREAM_ERROR = "rtmpstreamerror"
|
|
228
228
|
}
|