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.
Files changed (42) hide show
  1. package/dist/doc/en/config.md +99 -99
  2. package/dist/doc/en/dev.md +21 -21
  3. package/dist/doc/en/event_codes.md +117 -117
  4. package/dist/doc/en/events.md +72 -72
  5. package/dist/doc/en/functions.md +239 -239
  6. package/dist/doc/en/index.md +1 -1
  7. package/dist/doc/en/member_variables.md +116 -120
  8. package/dist/doc/en/multi_media_3_2_401.md +20 -20
  9. package/dist/doc/en/sdkid_encryption.md +14 -14
  10. package/dist/doc/en/update.md +462 -462
  11. package/dist/doc/zh_CN/config.md +1 -1
  12. package/dist/doc/zh_CN/event_codes.md +1 -1
  13. package/dist/doc/zh_CN/functions.md +2 -2
  14. package/dist/doc/zh_CN/index.md +1 -1
  15. package/dist/doc/zh_CN/multi_media_3_2_401.md +1 -1
  16. package/dist/doc/zh_CN/update.md +579 -579
  17. package/dist/larksr-web-sdk.min.js +1 -1
  18. package/dist/types/api.d.ts +2 -0
  19. package/dist/types/appli_params.d.ts +14 -0
  20. package/dist/types/lark/application.d.ts +2 -1
  21. package/dist/types/lark/message.d.ts +1 -0
  22. package/dist/types/larksr.d.ts +83 -4
  23. package/dist/types/localization/ui.d.ts +2 -0
  24. package/dist/types/operation/keyboard_handler.d.ts +25 -0
  25. package/dist/types/utils/lock_pointer.d.ts +2 -1
  26. package/package.json +72 -72
  27. package/types/api.d.ts +2 -0
  28. package/types/appli_params.d.ts +14 -0
  29. package/types/lark/application.d.ts +2 -1
  30. package/types/lark/message.d.ts +1 -0
  31. package/types/larksr.d.ts +83 -4
  32. package/types/localization/ui.d.ts +2 -0
  33. package/types/operation/keyboard_handler.d.ts +25 -0
  34. package/types/utils/lock_pointer.d.ts +2 -1
  35. package/dist/types/lark/custom.d.ts +0 -7
  36. package/dist/types/lark/webcodecs.generated.d.ts +0 -417
  37. package/dist/types/protobuf/cloudlark.d.ts +0 -9674
  38. package/dist/types/utils/ios-inner-height.d.ts +0 -4
  39. package/types/lark/custom.d.ts +0 -7
  40. package/types/lark/webcodecs.generated.d.ts +0 -417
  41. package/types/protobuf/cloudlark.d.ts +0 -9674
  42. package/types/utils/ios-inner-height.d.ts +0 -4
@@ -1,6 +1,6 @@
1
- # LarkSR 事件系统
1
+ # LarkSR Event System
2
2
 
3
- LarkSR 整个生命周期内会抛出多种事件通知。使用方法类似:
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
- 其中 `LarkEvent = 'larkevent'`, `ERROR = 'error'`, `INFO = 'info'` 这三个事件中附加 code 字段,code 字段附加事件码:[event_codes](./event_codes.md)
26
- [event_codes](./event_codes.md) 中的事件 code 值,在 LarkEvent 事件中都会抛出。
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 创建成功,返回 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
- // 可用 type == 0 判断是否是渲染资源不足类型的错误,再用 code 进行细节处理,或者只用 type == 0 进行处理。
48
- // 813=当前应用的运行数量已达到最大值:{0},请稍后再试
49
- // 814=同一appKey下的应用运行数量达到最大值:{0},请稍后再试
50
- // 815=应用运行数量已达到最大授权并发数量,请稍后再试
51
- // 816=VR应用运行数量已达到最大授权并发数量,请稍后再试
52
- // 817=渲染资源不足,请稍后再试
53
- // 820=暂无活跃的GPU节点
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
- * 登录成功时触发,会返回当前用户id .
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 版本对应服务器版本和数据通道版本为 3.2.5.1 及以上
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
- * 更详细的事件状态,主要用于向iframe外部抛出 .
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: 可能的错误码如下, 错误码的具体定义 @see [./event_codes]
170
- * // 连接服务器的websocket代理关闭
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
- * // 连接代理服务器的websocket关闭
172
+ * // Websocket proxy to the proxy server closed
173
173
  * LK_PROXY_SERVER_CLOSE : 202
174
- * // 检测版本失败,服务器和客户端的版本匹配。目前只有3.13.2大版本不匹配情况
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
- * // 服务器返回创建Task失败
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 创建出错,一般为 浏览器不支持 webrtc
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
- * 服务端 3.2.7.0 添加
214
+ * Added in server 3.2.7.0
215
215
  *
216
216
  */
217
217
  TOUCH_CTR_MAPPING = "touchctrmapping",
218
218
  /**
219
- * 服务端 3.2.7.0 添加
220
- * rtmp 直播推流状态
219
+ * Added in server 3.2.7.0
220
+ * RTMP live stream status
221
221
  */
222
222
  RTMP_STREAM_STATE = "rtmpstreamstate",
223
223
  /**
224
- * 服务端 3.2.7.0 添加
225
- * rtmp 直播推流出错
224
+ * Added in server 3.2.7.0
225
+ * RTMP live stream error
226
226
  */
227
227
  RTMP_STREAM_ERROR = "rtmpstreamerror"
228
228
  }