larksr_websdk 3.3.105 → 3.3.106
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 +72 -72
- package/dist/doc/en/config.md +0 -228
- package/dist/doc/en/dev.md +0 -84
- package/dist/doc/en/event_codes.md +0 -286
- package/dist/doc/en/events.md +0 -229
- package/dist/doc/en/functions.md +0 -603
- package/dist/doc/en/index.md +0 -115
- package/dist/doc/en/member_variables.md +0 -403
- package/dist/doc/en/multi_media_3_2_401.md +0 -84
- package/dist/doc/en/sdkid_encryption.md +0 -40
- package/dist/doc/en/update.md +0 -462
- package/dist/doc/zh_CN/config.md +0 -243
- package/dist/doc/zh_CN/event_codes.md +0 -286
- package/dist/doc/zh_CN/events.md +0 -229
- package/dist/doc/zh_CN/functions.md +0 -658
- package/dist/doc/zh_CN/index.md +0 -84
- package/dist/doc/zh_CN/member_variables.md +0 -431
- package/dist/doc/zh_CN/multi_media_3_2_401.md +0 -84
- package/dist/doc/zh_CN/sdkid_encryption.md +0 -40
- package/dist/doc/zh_CN/update.md +0 -579
- package/dist/larksr-web-sdk.min.js +0 -1
- package/dist/types/api.d.ts +0 -157
- package/dist/types/appli_params.d.ts +0 -330
- package/dist/types/common/cmd.d.ts +0 -28
- package/dist/types/common/constant.d.ts +0 -4
- package/dist/types/common/interface.d.ts +0 -30
- package/dist/types/config.d.ts +0 -58
- package/dist/types/event/event_base.d.ts +0 -11
- package/dist/types/event/iframe_poster.d.ts +0 -9
- package/dist/types/index.d.ts +0 -23
- package/dist/types/lark/Worker.d.ts +0 -3
- package/dist/types/lark/application.d.ts +0 -224
- package/dist/types/lark/canvas_render.d.ts +0 -28
- package/dist/types/lark/ice_candiadate_parser.d.ts +0 -24
- package/dist/types/lark/lark_event_type.d.ts +0 -114
- package/dist/types/lark/media_share_interface.d.ts +0 -47
- package/dist/types/lark/message.d.ts +0 -23
- package/dist/types/lark/peer_connection.d.ts +0 -203
- package/dist/types/lark/peer_connection_media_share.d.ts +0 -156
- package/dist/types/lark/recoder.d.ts +0 -55
- package/dist/types/lark/sdp_util.d.ts +0 -39
- package/dist/types/lark/test_pixel_streaming.d.ts +0 -54
- package/dist/types/lark/webcodec.d.ts +0 -61
- package/dist/types/lark/websocket_channel.d.ts +0 -58
- package/dist/types/lark/websocket_proxy.d.ts +0 -58
- package/dist/types/lark/websocket_waitqueue.d.ts +0 -36
- package/dist/types/larksr.d.ts +0 -1415
- package/dist/types/localization/base.d.ts +0 -8
- package/dist/types/localization/gesture_ins.d.ts +0 -4
- package/dist/types/localization/language.d.ts +0 -7
- package/dist/types/localization/loader.d.ts +0 -14
- package/dist/types/localization/message.d.ts +0 -82
- package/dist/types/localization/ui.d.ts +0 -62
- package/dist/types/operation/gamepad_handler.d.ts +0 -67
- package/dist/types/operation/gesture.d.ts +0 -72
- package/dist/types/operation/gesture_handler.d.ts +0 -53
- package/dist/types/operation/handler_base.d.ts +0 -8
- package/dist/types/operation/keyboard_handler.d.ts +0 -46
- package/dist/types/operation/keymap.d.ts +0 -24
- package/dist/types/operation/letter_keymap.d.ts +0 -8
- package/dist/types/operation/mouse_handler.d.ts +0 -42
- package/dist/types/operation/num_keymap.d.ts +0 -12
- package/dist/types/operation/operation.d.ts +0 -102
- package/dist/types/operation/pixel_streaming_input.d.ts +0 -82
- package/dist/types/operation/touch_handler.d.ts +0 -11
- package/dist/types/operation/utils.d.ts +0 -18
- package/dist/types/screen_state.d.ts +0 -133
- package/dist/types/utils/browser_type.d.ts +0 -37
- package/dist/types/utils/capabilities.d.ts +0 -54
- package/dist/types/utils/full_screen.d.ts +0 -25
- package/dist/types/utils/lock_pointer.d.ts +0 -25
- package/dist/types/utils/log.d.ts +0 -25
- package/dist/types/utils/scale_mode.d.ts +0 -70
- package/dist/types/utils/unit.d.ts +0 -154
- package/dist/types/utils/webgl_utils.d.ts +0 -48
- package/types/api.d.ts +0 -157
- package/types/appli_params.d.ts +0 -330
- package/types/common/cmd.d.ts +0 -28
- package/types/common/constant.d.ts +0 -4
- package/types/common/interface.d.ts +0 -30
- package/types/config.d.ts +0 -58
- package/types/event/event_base.d.ts +0 -11
- package/types/event/iframe_poster.d.ts +0 -9
- package/types/index.d.ts +0 -23
- package/types/lark/Worker.d.ts +0 -3
- package/types/lark/application.d.ts +0 -224
- package/types/lark/canvas_render.d.ts +0 -28
- package/types/lark/ice_candiadate_parser.d.ts +0 -24
- package/types/lark/lark_event_type.d.ts +0 -114
- package/types/lark/media_share_interface.d.ts +0 -47
- package/types/lark/message.d.ts +0 -23
- package/types/lark/peer_connection.d.ts +0 -203
- package/types/lark/peer_connection_media_share.d.ts +0 -156
- package/types/lark/recoder.d.ts +0 -55
- package/types/lark/sdp_util.d.ts +0 -39
- package/types/lark/test_pixel_streaming.d.ts +0 -54
- package/types/lark/webcodec.d.ts +0 -61
- package/types/lark/websocket_channel.d.ts +0 -58
- package/types/lark/websocket_proxy.d.ts +0 -58
- package/types/lark/websocket_waitqueue.d.ts +0 -36
- package/types/larksr.d.ts +0 -1415
- package/types/localization/base.d.ts +0 -8
- package/types/localization/gesture_ins.d.ts +0 -4
- package/types/localization/language.d.ts +0 -7
- package/types/localization/loader.d.ts +0 -14
- package/types/localization/message.d.ts +0 -82
- package/types/localization/ui.d.ts +0 -62
- package/types/operation/gamepad_handler.d.ts +0 -67
- package/types/operation/gesture.d.ts +0 -72
- package/types/operation/gesture_handler.d.ts +0 -53
- package/types/operation/handler_base.d.ts +0 -8
- package/types/operation/keyboard_handler.d.ts +0 -46
- package/types/operation/keymap.d.ts +0 -24
- package/types/operation/letter_keymap.d.ts +0 -8
- package/types/operation/mouse_handler.d.ts +0 -42
- package/types/operation/num_keymap.d.ts +0 -12
- package/types/operation/operation.d.ts +0 -102
- package/types/operation/pixel_streaming_input.d.ts +0 -82
- package/types/operation/touch_handler.d.ts +0 -11
- package/types/operation/utils.d.ts +0 -18
- package/types/screen_state.d.ts +0 -133
- package/types/utils/browser_type.d.ts +0 -37
- package/types/utils/capabilities.d.ts +0 -54
- package/types/utils/full_screen.d.ts +0 -25
- package/types/utils/lock_pointer.d.ts +0 -25
- package/types/utils/log.d.ts +0 -25
- package/types/utils/scale_mode.d.ts +0 -70
- package/types/utils/unit.d.ts +0 -154
- package/types/utils/webgl_utils.d.ts +0 -48
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
# Event Codes
|
|
2
|
-
|
|
3
|
-
The `code` field is attached to the events `LarkEvent = 'larkevent'`, `ERROR = 'error'`, `INFO = 'info'`. The specific values are listed below as `LarkEventType`.
|
|
4
|
-
All event codes may be thrown in the `LarkEvent` event.
|
|
5
|
-
|
|
6
|
-
The `LarkEventType` event codes are also used for listening to event codes when using the iframe poster method. For iframe embedding client and using event codes, refer to the demo: [larkwebclient-iframe-demos](https://github.com/ParaverseTechnology/larkwebclient-iframe-demos)
|
|
7
|
-
|
|
8
|
-
```typescript
|
|
9
|
-
//
|
|
10
|
-
// Unified client event codes.
|
|
11
|
-
//
|
|
12
|
-
export enum LarkEventType {
|
|
13
|
-
// Web client loaded successfully (added in 3.1.8.1)
|
|
14
|
-
LK_WEB_CLIENT_LOAD_SUCCESS = 1,
|
|
15
|
-
// Enter application interface call
|
|
16
|
-
LK_TASK_CREATE_SUCCESS = 10,
|
|
17
|
-
LK_TASK_CREATE_FAILED = 11,
|
|
18
|
-
// Insufficient rendering resources
|
|
19
|
-
LK_RESOURCE_NOT_ENOUGH = 12,
|
|
20
|
-
// Synchronizing application
|
|
21
|
-
LK_TASK_SYNC_APP = 20,
|
|
22
|
-
// Sync task failed (added in 3.1.8.1)
|
|
23
|
-
LK_TASK_SYNC_APP_FAILED = 21,
|
|
24
|
-
//
|
|
25
|
-
// Connect to application server events. Thrown when directly connecting to the rendering server
|
|
26
|
-
// Message source: websocket connection events
|
|
27
|
-
//
|
|
28
|
-
// Connected to rendering server successfully
|
|
29
|
-
LK_RENDER_SERVER_CONNECTED = 100,
|
|
30
|
-
// Failed to connect to rendering server
|
|
31
|
-
LK_RENDER_SERVER_FAILED = 101,
|
|
32
|
-
// Connection to rendering server closed
|
|
33
|
-
LK_RENDER_SERVER_CLOSE = 102,
|
|
34
|
-
// Connection to rendering server error
|
|
35
|
-
LK_RENDER_SERVER_ERROR = 103,
|
|
36
|
-
|
|
37
|
-
//
|
|
38
|
-
// Connect to websocket proxy server events
|
|
39
|
-
// Message source: websocket proxy connection events
|
|
40
|
-
//
|
|
41
|
-
// Connected to proxy server successfully
|
|
42
|
-
LK_PROXY_SERVER_CONNECTED = 200,
|
|
43
|
-
// Failed to connect to proxy server
|
|
44
|
-
LK_PROXY_SERVER_FAILED = 201,
|
|
45
|
-
// Connection to proxy server closed
|
|
46
|
-
LK_PROXY_SERVER_CLOSE = 202,
|
|
47
|
-
// Connection to proxy server error
|
|
48
|
-
LK_PROXY_SERVER_ERROR = 203,
|
|
49
|
-
|
|
50
|
-
//
|
|
51
|
-
// Version check
|
|
52
|
-
// Message source: server protocol response ToClientMessage->VersionCheckResponse
|
|
53
|
-
//
|
|
54
|
-
// Version check successful
|
|
55
|
-
LK_VERSION_CHECK_SUCCESS = 300,
|
|
56
|
-
// Version check failed
|
|
57
|
-
LK_VERSION_CHECK_FAILED = 301,
|
|
58
|
-
|
|
59
|
-
//
|
|
60
|
-
// Task check
|
|
61
|
-
// Message source: server protocol response ToClientMessage->TaskResponse
|
|
62
|
-
//
|
|
63
|
-
// Request task successful
|
|
64
|
-
LK_TASK_SUCCESS = 400,
|
|
65
|
-
// Task not found
|
|
66
|
-
LK_TASK_NOTFOUND = 401,
|
|
67
|
-
// Server error
|
|
68
|
-
LK_TASK_SERVER_ERROR = 402,
|
|
69
|
-
// Application parameter error
|
|
70
|
-
LK_TASK_APP_WRONGPARAM = 403,
|
|
71
|
-
// Task obtained successfully, but no GPU resources available
|
|
72
|
-
LK_TASK_NO_GPU_RESOURCE = 404,
|
|
73
|
-
|
|
74
|
-
//
|
|
75
|
-
// Start streaming
|
|
76
|
-
// Message source: server protocol response ToClientMessage->StartStreamResponse
|
|
77
|
-
//
|
|
78
|
-
// Start streaming successful
|
|
79
|
-
LK_START_STREAM_SUCCESS = 500,
|
|
80
|
-
// Start streaming process failed
|
|
81
|
-
LK_START_STREAM_PROCESS_START_FAILED = 501,
|
|
82
|
-
// Start streaming timeout
|
|
83
|
-
LK_START_STREAM_PROCESS_START_TIMEOUT = 502,
|
|
84
|
-
// Not streaming
|
|
85
|
-
LK_START_STREAM_NOT_STREAMING = 503,
|
|
86
|
-
// Streaming encoder error
|
|
87
|
-
LK_START_STREAM_ENCODER_ERROR = 504,
|
|
88
|
-
|
|
89
|
-
//
|
|
90
|
-
// RTC events
|
|
91
|
-
// Message source: webrtc connection events and ToClientMessage->WebrtcError
|
|
92
|
-
//
|
|
93
|
-
// RTC connection successful
|
|
94
|
-
LK_RTC_EVENT_PEERCONNECTION_CONNECTED = 600,
|
|
95
|
-
// RTC connection closed
|
|
96
|
-
LK_RTC_EVENT_PEERCONNECTION_CLOSED = 601,
|
|
97
|
-
// RTC connection error
|
|
98
|
-
LK_RTC_EVENT_PEERCONNECTION_ERROR = 602,
|
|
99
|
-
// RTC creation error, usually due to browser not supporting webrtc
|
|
100
|
-
// Added in 3.2.0.14
|
|
101
|
-
LK_RTC_EVENT_PEERCONNECTION_CREATE_FAILED = 603,
|
|
102
|
-
// RTC state report (rtt, bitrate, etc.) Added in 3.1.1.8
|
|
103
|
-
LK_RTC_EVENT_PEERCONNECTION_STATE = 610,
|
|
104
|
-
// RTC retry Added in 3.1.6.2
|
|
105
|
-
LK_RTC_EVENT_PEERCONNECTION_RETRY = 611,
|
|
106
|
-
|
|
107
|
-
//
|
|
108
|
-
// Load video stream
|
|
109
|
-
// Message source: browser or native component Fixed in 3.1.6.2
|
|
110
|
-
//
|
|
111
|
-
LK_VIDEO_LOADED = 700,
|
|
112
|
-
// Video autoplay failed, request manual trigger (3.1.8.2)
|
|
113
|
-
LK_VIDEO_PLAY_FAILED = 701,
|
|
114
|
-
// Received cloud video stream but not started playing (3.1.8.3)
|
|
115
|
-
LK_GOT_REMOTE_STREAM = 710,
|
|
116
|
-
// Received cloud video stream and started playing (3.2.13.0)
|
|
117
|
-
LK_VIDEO_PLAY_SUCCSS = 711,
|
|
118
|
-
|
|
119
|
-
//
|
|
120
|
-
// Server-initiated logout
|
|
121
|
-
// Message source: backend protocol NotifyClientLogout
|
|
122
|
-
//
|
|
123
|
-
LK_NOTIFY_CLIENT_LOGOUT_PLAYER_LOGOUT = 800,
|
|
124
|
-
// Host logout in multi-viewer mode
|
|
125
|
-
LK_NOTIFY_CLIENT_LOGOUT_TASKOWNER_LOGOUT = 801,
|
|
126
|
-
|
|
127
|
-
//
|
|
128
|
-
// Server pushes cloud application events
|
|
129
|
-
// Message source: backend protocol AppProcessNotification
|
|
130
|
-
//
|
|
131
|
-
LK_APP_PROCESS_NOTIFI_APP_QUIT = 900,
|
|
132
|
-
// No operation timeout (added in 3.1.8.1)
|
|
133
|
-
LK_NO_OPERATION_TIMEOUT = 901,
|
|
134
|
-
// Loading timeout (added in 3.1.8.8)
|
|
135
|
-
LK_LOADING_TIMEOUT = 902,
|
|
136
|
-
// Cloud application size change
|
|
137
|
-
// Added in 3.1.1.8
|
|
138
|
-
LK_APP_RESIZE = 910,
|
|
139
|
-
// Cloud application mouse mode change
|
|
140
|
-
// Added in 3.1.1.8
|
|
141
|
-
LK_APP_MOUSE_MODE = 911,
|
|
142
|
-
// Received player list
|
|
143
|
-
// Added in 3.1.1.10
|
|
144
|
-
LK_APP_PLAER_LIST = 912,
|
|
145
|
-
// APP requests text input
|
|
146
|
-
LK_APP_REQUEST_TEXT = 913,
|
|
147
|
-
// sdk new
|
|
148
|
-
// Cloud mouse style
|
|
149
|
-
LK_APP_CURSOR_STYLE = 914,
|
|
150
|
-
// User manually clicked close button
|
|
151
|
-
LK_USER_REQUEST_QUIT = 920,
|
|
152
|
-
// Local webpage resize event
|
|
153
|
-
LK_UI_RESIZE = 930,
|
|
154
|
-
|
|
155
|
-
//
|
|
156
|
-
// XR related events
|
|
157
|
-
//
|
|
158
|
-
// Start VR streaming successful
|
|
159
|
-
LK_STARTVRSTREAM_SUCCESS = 1000,
|
|
160
|
-
// Start VR streaming process failed
|
|
161
|
-
LK_STARTVRSTREAM_START_PROCESS_FAILED = 1001,
|
|
162
|
-
// Start VR streaming driver timeout
|
|
163
|
-
LK_STARTVRSTREAM_START_DRIVER_RUNTIME_TIMEOUT = 1002,
|
|
164
|
-
// Start VR streaming UDP port error
|
|
165
|
-
LK_STARTVRSTREAM_START_DRIVER_RUNTIME_UDPPORT_ERROR = 1003,
|
|
166
|
-
// Start VR streaming UDP encoder error
|
|
167
|
-
LK_STARTVRSTREAM_START_DRIVER_RUNTIME_ENCODER_ERROR = 1004,
|
|
168
|
-
|
|
169
|
-
//
|
|
170
|
-
// UI related event notifications
|
|
171
|
-
//
|
|
172
|
-
// Alert box popup (added in 3.1.8.1)
|
|
173
|
-
LK_WEBCLIENT_NOTIFY_ALERT = 1100,
|
|
174
|
-
// Confirm box popup (added in 3.1.8.1)
|
|
175
|
-
LK_WEBCLIENT_NOTIFY_CONFIRM = 1101,
|
|
176
|
-
//
|
|
177
|
-
LK_WEBCLIENT_TOAST_MSG = 1102,
|
|
178
|
-
|
|
179
|
-
// User operation triggered events
|
|
180
|
-
// User screenshot (3.1.8.3)
|
|
181
|
-
LK_USER_CAPTURE_FRAME = 2000,
|
|
182
|
-
// User screenshot with extra data (3.1.8.8)
|
|
183
|
-
LK_USER_CAPTURE_FRAME_WITH_EXTRA_DATA = 2001,
|
|
184
|
-
|
|
185
|
-
// External request for screenshot (3.1.8.3)
|
|
186
|
-
LK_REQUEST_CAPTURE_FRAME = 3000,
|
|
187
|
-
// External request for screenshot with extra data (3.1.8.8)
|
|
188
|
-
LK_REQUEST_CAPTURE_FRAME_WITH_EXTRA_DATA = 3001,
|
|
189
|
-
|
|
190
|
-
//
|
|
191
|
-
// iframe external messages to web client
|
|
192
|
-
//
|
|
193
|
-
// Operations
|
|
194
|
-
// Mouse operations
|
|
195
|
-
LK_IFRAME_POSTER_OPERATE_MOUSE_MOVE = 10000,
|
|
196
|
-
LK_IFRAME_POSTER_OPERATE_MOUSE_DOWN = 10001,
|
|
197
|
-
LK_IFRAME_POSTER_OPERATE_MOUSE_UP = 10002,
|
|
198
|
-
LK_IFRAME_POSTER_OPERATE_MOUSE_WHEEL = 10003,
|
|
199
|
-
// Keyboard operations
|
|
200
|
-
LK_IFRAME_POSTER_OPERATE_KEY_DOWN = 10010,
|
|
201
|
-
LK_IFRAME_POSTER_OPERATE_KEY_UP = 10011,
|
|
202
|
-
// Touch operations
|
|
203
|
-
LK_IFRAME_POSTER_OPERATE_TOUCH_DOWN = 10020,
|
|
204
|
-
LK_IFRAME_POSTER_OPERATE_TOUCH_MOVE = 10021,
|
|
205
|
-
LK_IFRAME_POSTER_OPERATE_TOUCH_UP = 10022,
|
|
206
|
-
// Joystick operations
|
|
207
|
-
LK_IFRAME_POSTER_OPERATE_GAMEPAD_BUTTON_DOWN = 10030,
|
|
208
|
-
LK_IFRAME_POSTER_OPERATE_GAMEPAD_BUTTON_UP = 10031,
|
|
209
|
-
LK_IFRAME_POSTER_OPERATE_GAMEPAD_TRIGGER_VALUE = 10032,
|
|
210
|
-
LK_IFRAME_POSTER_OPERATE_GAMEPAD_JOYSTICK_STATES = 10033,
|
|
211
|
-
// Microphone operations to open or close the default microphone
|
|
212
|
-
LK_IFRAME_POSTER_OPENAUDIO_INPUT = 10040,
|
|
213
|
-
LK_IFRAME_POSTER_CLOSE_AUDIO_INPUT = 10041,
|
|
214
|
-
|
|
215
|
-
// Functions
|
|
216
|
-
// Set mouse mode, lock mode and unlock mode
|
|
217
|
-
LK_IFRAME_POSTER_FUNC_MOUSE_MODE = 10100,
|
|
218
|
-
// Set scale mode
|
|
219
|
-
LK_IFRAME_POSTER_FUNC_SCALE_MODE = 10101,
|
|
220
|
-
// Restart cloud application (added in 3.1.8.1)
|
|
221
|
-
LK_IFRAME_POSTER_FUNC_RESTART_CLOUD_APP = 10102,
|
|
222
|
-
// WeChat browser load success event (added in 3.1.8.1)
|
|
223
|
-
LK_IFRAME_POSTER_FUNC_WX_JS_BRIDGE_READY = 10103,
|
|
224
|
-
// Request to play video (when video component playback fails and requires user trigger
|
|
225
|
-
// but client internal alert is disabled)
|
|
226
|
-
LK_IFRAME_POSTER_FUNC_REQUEST_PLAY_VIDEO = 10104,
|
|
227
|
-
|
|
228
|
-
// Control UI
|
|
229
|
-
// Whether to display the desktop control bar
|
|
230
|
-
LK_IFRAME_POSTER_UI_CONTROLLER_BAR = 10200,
|
|
231
|
-
// Whether to display the player list
|
|
232
|
-
LK_IFRAME_POSTER_UI_PLAYER_LIST = 10201,
|
|
233
|
-
// Whether to display the share URL in share mode
|
|
234
|
-
LK_IFRAME_POSTER_UI_PLAYER_SHARE_URL = 10202,
|
|
235
|
-
// Whether to display the mobile control ball
|
|
236
|
-
LK_IFRAME_POSTER_UI_MOBILE_CONTROL_BALL = 10203,
|
|
237
|
-
// Whether to display the mobile joystick
|
|
238
|
-
LK_IFRMAE_POSTER_UI_MOBILE_JOYSTICK = 10204,
|
|
239
|
-
// Whether to display the mobile virtual keyboard
|
|
240
|
-
LK_IFRAME_POSTER_UI_MOBILE_VIRTUAL_KEYBOARD = 10205,
|
|
241
|
-
// Whether to display the mobile virtual mouse
|
|
242
|
-
LK_IFRAME_POSTER_UI_MOBILE_VIRTUAL_MOUSE = 10206,
|
|
243
|
-
// Whether to display the mobile menu
|
|
244
|
-
LK_IFRAME_POSTER_UI_MOBILE_MENU = 10207,
|
|
245
|
-
// Whether to force landscape mode on mobile
|
|
246
|
-
LK_IFRAME_POSTER_UI_MOBILE_FORCE_LANDSCAPE = 10208,
|
|
247
|
-
// Whether to display touch points
|
|
248
|
-
LK_IFRAME_POSTER_UI_MOBILE_TOUCH_POINT = 10209,
|
|
249
|
-
// Set Toast display level (added in 3.1.8.1)
|
|
250
|
-
LK_IFRAME_POSTER_UI_TOAST_LEVEL = 10210,
|
|
251
|
-
// Set Alert display (added in 3.1.8.1)
|
|
252
|
-
LK_IFRAME_POSTER_UI_ALERT = 10211,
|
|
253
|
-
// Set Confirm display (added in 3.1.8.1)
|
|
254
|
-
LK_IFRAME_POSTER_UI_CONFIRM = 10212,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
//
|
|
258
|
-
// iframe external messages to web client from datachannel
|
|
259
|
-
//
|
|
260
|
-
LK_DATA_CHANNEL_ESTABLISHED = 20000,
|
|
261
|
-
LK_DATA_CHANNEL_RETYING = 20001,
|
|
262
|
-
LK_DATA_CHANNEL_CLOSE = 20002,
|
|
263
|
-
LK_DATA_CHANNEL_ERROR = 20003,
|
|
264
|
-
LK_DATA_CHANNEL_BINARY_MESSAGE = 20004,
|
|
265
|
-
LK_DATA_CHANNEL_TEXT_MESSAGE = 20005,
|
|
266
|
-
//
|
|
267
|
-
// iframe external messages to web client to datachannel
|
|
268
|
-
//
|
|
269
|
-
LK_RE_CONNECT_DATA_CHANNEL = 20100,
|
|
270
|
-
LK_CLOSE_DATA_CHANNEL = 20101,
|
|
271
|
-
LK_DATA_CHANNEL_SEND_TEXT = 20102,
|
|
272
|
-
LK_DATA_CHANNEL_SEND_BINARY = 20103,
|
|
273
|
-
//
|
|
274
|
-
// iframe external messages to web client from datachannel-renderserver
|
|
275
|
-
//
|
|
276
|
-
LK_DATA_CHANNEL_RENDERSERVER_OPEN = 20200,
|
|
277
|
-
LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 20201,
|
|
278
|
-
LK_DATA_CHANNEL_RENDERSERVER_BINARY_MESSAGE = 20202,
|
|
279
|
-
LK_DATA_CHANNEL_RENDERSERVER_TEXT_MESSAGE = 20203,
|
|
280
|
-
//
|
|
281
|
-
// iframe external messages to web client to datachannel
|
|
282
|
-
//
|
|
283
|
-
LK_DATA_CHANNEL_RENDERSERVER_SEND_TEXT = 20300,
|
|
284
|
-
LK_DATA_CHANNEL_RENDERSERVER_SEND_BINARY = 20301,
|
|
285
|
-
}
|
|
286
|
-
```
|
package/dist/doc/en/events.md
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
# LarkSR Event System
|
|
2
|
-
|
|
3
|
-
Throughout the lifecycle of LarkSR, various event notifications will be thrown. The usage is similar to:
|
|
4
|
-
|
|
5
|
-
```javascript
|
|
6
|
-
var larksr;
|
|
7
|
-
|
|
8
|
-
// create code
|
|
9
|
-
...
|
|
10
|
-
|
|
11
|
-
// Listen for the connection success event
|
|
12
|
-
larksr.on('connect', function(e) {
|
|
13
|
-
console.log("LarkSRClientEvent CONNECT", e);
|
|
14
|
-
});
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Or use the exported enum values
|
|
18
|
-
|
|
19
|
-
```javascript
|
|
20
|
-
larksr.on(LarkSRClientEvent.TASK_CREATE_SUCCESS, (e) => {
|
|
21
|
-
console.log("LarkSRClientEvent TASK_CREATE_SUCCESS", e);
|
|
22
|
-
});
|
|
23
|
-
```
|
|
24
|
-
|
|
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
|
-
|
|
28
|
-
## Complete Event Definitions
|
|
29
|
-
|
|
30
|
-
```javascript
|
|
31
|
-
/**
|
|
32
|
-
* Complete event definitions for LarkSR instance
|
|
33
|
-
*/
|
|
34
|
-
declare const enum LarkSRClientEvent {
|
|
35
|
-
/**
|
|
36
|
-
* TASK creation successful, returns Task related information
|
|
37
|
-
*/
|
|
38
|
-
TASK_CREATE_SUCCESS = "taskcreatesuccess",
|
|
39
|
-
/**
|
|
40
|
-
* TASK creation failed
|
|
41
|
-
*/
|
|
42
|
-
TASK_CREATE_FAILED = "taskcreatefailed",
|
|
43
|
-
/**
|
|
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
|
-
code?: 817,
|
|
57
|
-
|
|
58
|
-
// Error message
|
|
59
|
-
message:? "",
|
|
60
|
-
}
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
RESOURCE_NOT_ENOUGH = "resourcenotenough",
|
|
64
|
-
/**
|
|
65
|
-
* Successfully connected to the rendering server.
|
|
66
|
-
*/
|
|
67
|
-
CONNECT = "connect",
|
|
68
|
-
/**
|
|
69
|
-
* Triggered when login is successful, returns the current user id.
|
|
70
|
-
*/
|
|
71
|
-
LOGIN_SUCCESS = "loginsuccess",
|
|
72
|
-
/**
|
|
73
|
-
* Triggered when there is no operation timeout.
|
|
74
|
-
*/
|
|
75
|
-
NO_OPERATION_TIMEOUT = "operatetimeout",
|
|
76
|
-
/**
|
|
77
|
-
* Connection closed.
|
|
78
|
-
*/
|
|
79
|
-
CLOSE = "close",
|
|
80
|
-
/**
|
|
81
|
-
* Cloud application closed, but connection not closed
|
|
82
|
-
*/
|
|
83
|
-
APP_CLOSE = "appclose",
|
|
84
|
-
/**
|
|
85
|
-
* Received remote video stream.
|
|
86
|
-
*/
|
|
87
|
-
GOT_REMOTE_STREAM = "gotremotestream",
|
|
88
|
-
/**
|
|
89
|
-
* Received remote audio stream.
|
|
90
|
-
*/
|
|
91
|
-
GOT_REMOTE_AUDIO_STREAM = "gotremoteaudiostream",
|
|
92
|
-
/**
|
|
93
|
-
* Video loaded successfully, waiting to play.
|
|
94
|
-
*/
|
|
95
|
-
MEDIA_LOADED = "meidaloaded",
|
|
96
|
-
/**
|
|
97
|
-
* Video autoplay successful.
|
|
98
|
-
*/
|
|
99
|
-
MEDIA_PLAY_SUCCESS = "mediaplaysuccess",
|
|
100
|
-
/**
|
|
101
|
-
* Video autoplay failed.
|
|
102
|
-
*/
|
|
103
|
-
MEDIA_PLAY_FAILED = "mediaplayfailed",
|
|
104
|
-
/**
|
|
105
|
-
* Autoplay sound failed, playing in mute mode.
|
|
106
|
-
*/
|
|
107
|
-
MEDIA_PLAY_MUTE = "meidaplaymute",
|
|
108
|
-
/**
|
|
109
|
-
* Cloud rendering connection state changed.
|
|
110
|
-
*/
|
|
111
|
-
APPSTATE_CHANGE = "appstatechange",
|
|
112
|
-
/**
|
|
113
|
-
* Cloud application size changed.
|
|
114
|
-
*/
|
|
115
|
-
APP_RESIZE = "appresize",
|
|
116
|
-
/**
|
|
117
|
-
* Triggered when the cloud application mouse mode changes.
|
|
118
|
-
*/
|
|
119
|
-
APP_MOUSE_MODE = "appmousemode",
|
|
120
|
-
/**
|
|
121
|
-
* Cloud application mouse state changed.
|
|
122
|
-
*/
|
|
123
|
-
APP_CURSOR_MODE = "appcursormode",
|
|
124
|
-
/**
|
|
125
|
-
* Player list.
|
|
126
|
-
*/
|
|
127
|
-
PLAYER_LIST = "playerlist",
|
|
128
|
-
/**
|
|
129
|
-
* Video connection status
|
|
130
|
-
*/
|
|
131
|
-
PEERSTATUS_REPORT = "peerstatusreport",
|
|
132
|
-
/**
|
|
133
|
-
* Cloud application requests text input.
|
|
134
|
-
*/
|
|
135
|
-
APP_REQUEST_INPUT = "apprequestinput",
|
|
136
|
-
/**
|
|
137
|
-
* Cloud application requests gamepad vibration
|
|
138
|
-
*/
|
|
139
|
-
APP_REQUEST_GAMEPAD_OUPUT = "apprequestgamepadoutput",
|
|
140
|
-
/**
|
|
141
|
-
* Screenshot successful.
|
|
142
|
-
*/
|
|
143
|
-
CAPTURE_FRAME = "captureframe",
|
|
144
|
-
/**
|
|
145
|
-
* Data channel opened.
|
|
146
|
-
*/
|
|
147
|
-
DATACHANNEL_OPEN = "datachannelopen",
|
|
148
|
-
/**
|
|
149
|
-
* Data channel closed.
|
|
150
|
-
*/
|
|
151
|
-
DATACHANNEL_CLOSE = "datachannelclose",
|
|
152
|
-
/**
|
|
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
|
-
*/
|
|
156
|
-
DATACHANNEL_TEXT = "datachanneltext",
|
|
157
|
-
/**
|
|
158
|
-
* Data channel received binary message.
|
|
159
|
-
*/
|
|
160
|
-
DATACHANNEL_BINARY = "datachannelbinary",
|
|
161
|
-
/**
|
|
162
|
-
* More detailed event status, mainly used for throwing to the outside of the iframe.
|
|
163
|
-
*/
|
|
164
|
-
LarkEvent = "larkevent",
|
|
165
|
-
/**
|
|
166
|
-
* Thrown when an error occurs
|
|
167
|
-
* type: error
|
|
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
|
-
* LK_RENDER_SERVER_CLOSE : 102
|
|
172
|
-
* // Websocket proxy to the proxy server closed
|
|
173
|
-
* LK_PROXY_SERVER_CLOSE : 202
|
|
174
|
-
* // Version check failed, server and client version mismatch. Currently only 3.1 and 3.2 major version mismatch
|
|
175
|
-
* LK_VERSION_CHECK_FAILED : 301
|
|
176
|
-
* // Server returned Task creation failed
|
|
177
|
-
* TASK_NOTFOUND-TASK_NO_GPU_RESOURCE : 401-404
|
|
178
|
-
* // Server failed to start streaming
|
|
179
|
-
* LK_START_STREAM_PROCESS_START-FAILED-LK_START_STREAM_ENCODER_ERROR : 501-504
|
|
180
|
-
* // RTC connection closed
|
|
181
|
-
* LK_RTC_EVENT_PEERCONNECTION_CLOSED : 601
|
|
182
|
-
* // RTC connection error
|
|
183
|
-
* LK_RTC_EVENT_PEERCONNECTION_ERROR : 602
|
|
184
|
-
* // RTC creation error, usually due to browser not supporting webrtc
|
|
185
|
-
* LK_RTC_EVENT_PEERCONNECTION_CREATE_FAILED : 603
|
|
186
|
-
* // Server actively requests client to exit
|
|
187
|
-
* LK_NOTIFY_CLIENT_LOGOUT_PLAYER_LOGOUT : 800
|
|
188
|
-
* // Host exits in multi-viewer mode
|
|
189
|
-
* LK_NOTIFY_CLIENT_LOGOUT_TASKOWNER_LOGOUT : 801
|
|
190
|
-
*
|
|
191
|
-
*/
|
|
192
|
-
ERROR = "error",
|
|
193
|
-
/**
|
|
194
|
-
* General information prompt
|
|
195
|
-
*/
|
|
196
|
-
INFO = "info",
|
|
197
|
-
/**
|
|
198
|
-
* Voice dialogue status
|
|
199
|
-
*/
|
|
200
|
-
AI_VOICE_STATUS = "aivoicestatus",
|
|
201
|
-
/**
|
|
202
|
-
* Voice recognition to text result
|
|
203
|
-
*/
|
|
204
|
-
AI_VOICE_ASR_RESULT = "aivoiceasrresult",
|
|
205
|
-
/**
|
|
206
|
-
* Dialogue return result
|
|
207
|
-
*/
|
|
208
|
-
AI_VOICE_DM_RESULT = "aivoicedmresult",
|
|
209
|
-
/**
|
|
210
|
-
* Detailed information on dialogue errors
|
|
211
|
-
*/
|
|
212
|
-
AI_VOICE_ERROR = "aivoiceerror",
|
|
213
|
-
/**
|
|
214
|
-
* Added in server 3.2.7.0
|
|
215
|
-
*
|
|
216
|
-
*/
|
|
217
|
-
TOUCH_CTR_MAPPING = "touchctrmapping",
|
|
218
|
-
/**
|
|
219
|
-
* Added in server 3.2.7.0
|
|
220
|
-
* RTMP live stream status
|
|
221
|
-
*/
|
|
222
|
-
RTMP_STREAM_STATE = "rtmpstreamstate",
|
|
223
|
-
/**
|
|
224
|
-
* Added in server 3.2.7.0
|
|
225
|
-
* RTMP live stream error
|
|
226
|
-
*/
|
|
227
|
-
RTMP_STREAM_ERROR = "rtmpstreamerror"
|
|
228
|
-
}
|
|
229
|
-
```
|