larksr_websdk 3.3.106 → 3.3.107

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 (129) hide show
  1. package/dist/doc/en/config.md +228 -0
  2. package/dist/doc/en/dev.md +84 -0
  3. package/dist/doc/en/event_codes.md +286 -0
  4. package/dist/doc/en/events.md +229 -0
  5. package/dist/doc/en/functions.md +603 -0
  6. package/dist/doc/en/index.md +115 -0
  7. package/dist/doc/en/member_variables.md +403 -0
  8. package/dist/doc/en/multi_media_3_2_401.md +84 -0
  9. package/dist/doc/en/sdkid_encryption.md +40 -0
  10. package/dist/doc/en/update.md +462 -0
  11. package/dist/doc/zh_CN/config.md +243 -0
  12. package/dist/doc/zh_CN/event_codes.md +286 -0
  13. package/dist/doc/zh_CN/events.md +229 -0
  14. package/dist/doc/zh_CN/functions.md +658 -0
  15. package/dist/doc/zh_CN/index.md +84 -0
  16. package/dist/doc/zh_CN/member_variables.md +431 -0
  17. package/dist/doc/zh_CN/multi_media_3_2_401.md +84 -0
  18. package/dist/doc/zh_CN/sdkid_encryption.md +40 -0
  19. package/dist/doc/zh_CN/update.md +579 -0
  20. package/dist/larksr-web-sdk.min.js +1 -0
  21. package/dist/types/api.d.ts +157 -0
  22. package/dist/types/appli_params.d.ts +330 -0
  23. package/dist/types/common/cmd.d.ts +28 -0
  24. package/dist/types/common/constant.d.ts +4 -0
  25. package/dist/types/common/interface.d.ts +30 -0
  26. package/dist/types/config.d.ts +58 -0
  27. package/dist/types/event/event_base.d.ts +11 -0
  28. package/dist/types/event/iframe_poster.d.ts +9 -0
  29. package/dist/types/index.d.ts +23 -0
  30. package/dist/types/lark/Worker.d.ts +3 -0
  31. package/dist/types/lark/application.d.ts +226 -0
  32. package/dist/types/lark/canvas_render.d.ts +28 -0
  33. package/dist/types/lark/ice_candiadate_parser.d.ts +24 -0
  34. package/dist/types/lark/lark_event_type.d.ts +114 -0
  35. package/dist/types/lark/media_share_interface.d.ts +47 -0
  36. package/dist/types/lark/message.d.ts +23 -0
  37. package/dist/types/lark/peer_connection.d.ts +204 -0
  38. package/dist/types/lark/peer_connection_media_share.d.ts +156 -0
  39. package/dist/types/lark/recoder.d.ts +55 -0
  40. package/dist/types/lark/sdp_util.d.ts +39 -0
  41. package/dist/types/lark/test_pixel_streaming.d.ts +54 -0
  42. package/dist/types/lark/webcodec.d.ts +61 -0
  43. package/dist/types/lark/websocket_channel.d.ts +58 -0
  44. package/dist/types/lark/websocket_proxy.d.ts +58 -0
  45. package/dist/types/lark/websocket_waitqueue.d.ts +36 -0
  46. package/dist/types/larksr.d.ts +1419 -0
  47. package/dist/types/localization/base.d.ts +8 -0
  48. package/dist/types/localization/gesture_ins.d.ts +4 -0
  49. package/dist/types/localization/language.d.ts +7 -0
  50. package/dist/types/localization/loader.d.ts +14 -0
  51. package/dist/types/localization/message.d.ts +82 -0
  52. package/dist/types/localization/ui.d.ts +62 -0
  53. package/dist/types/operation/gamepad_handler.d.ts +67 -0
  54. package/dist/types/operation/gesture.d.ts +72 -0
  55. package/dist/types/operation/gesture_handler.d.ts +53 -0
  56. package/dist/types/operation/handler_base.d.ts +8 -0
  57. package/dist/types/operation/keyboard_handler.d.ts +46 -0
  58. package/dist/types/operation/keymap.d.ts +24 -0
  59. package/dist/types/operation/letter_keymap.d.ts +8 -0
  60. package/dist/types/operation/mouse_handler.d.ts +42 -0
  61. package/dist/types/operation/num_keymap.d.ts +12 -0
  62. package/dist/types/operation/operation.d.ts +102 -0
  63. package/dist/types/operation/pixel_streaming_input.d.ts +82 -0
  64. package/dist/types/operation/touch_handler.d.ts +11 -0
  65. package/dist/types/operation/utils.d.ts +18 -0
  66. package/dist/types/screen_state.d.ts +133 -0
  67. package/dist/types/utils/browser_type.d.ts +37 -0
  68. package/dist/types/utils/capabilities.d.ts +54 -0
  69. package/dist/types/utils/full_screen.d.ts +25 -0
  70. package/dist/types/utils/lock_pointer.d.ts +25 -0
  71. package/dist/types/utils/log.d.ts +25 -0
  72. package/dist/types/utils/scale_mode.d.ts +70 -0
  73. package/dist/types/utils/unit.d.ts +154 -0
  74. package/dist/types/utils/webgl_utils.d.ts +48 -0
  75. package/package.json +72 -72
  76. package/types/api.d.ts +157 -0
  77. package/types/appli_params.d.ts +330 -0
  78. package/types/common/cmd.d.ts +28 -0
  79. package/types/common/constant.d.ts +4 -0
  80. package/types/common/interface.d.ts +30 -0
  81. package/types/config.d.ts +58 -0
  82. package/types/event/event_base.d.ts +11 -0
  83. package/types/event/iframe_poster.d.ts +9 -0
  84. package/types/index.d.ts +23 -0
  85. package/types/lark/Worker.d.ts +3 -0
  86. package/types/lark/application.d.ts +226 -0
  87. package/types/lark/canvas_render.d.ts +28 -0
  88. package/types/lark/ice_candiadate_parser.d.ts +24 -0
  89. package/types/lark/lark_event_type.d.ts +114 -0
  90. package/types/lark/media_share_interface.d.ts +47 -0
  91. package/types/lark/message.d.ts +23 -0
  92. package/types/lark/peer_connection.d.ts +204 -0
  93. package/types/lark/peer_connection_media_share.d.ts +156 -0
  94. package/types/lark/recoder.d.ts +55 -0
  95. package/types/lark/sdp_util.d.ts +39 -0
  96. package/types/lark/test_pixel_streaming.d.ts +54 -0
  97. package/types/lark/webcodec.d.ts +61 -0
  98. package/types/lark/websocket_channel.d.ts +58 -0
  99. package/types/lark/websocket_proxy.d.ts +58 -0
  100. package/types/lark/websocket_waitqueue.d.ts +36 -0
  101. package/types/larksr.d.ts +1419 -0
  102. package/types/localization/base.d.ts +8 -0
  103. package/types/localization/gesture_ins.d.ts +4 -0
  104. package/types/localization/language.d.ts +7 -0
  105. package/types/localization/loader.d.ts +14 -0
  106. package/types/localization/message.d.ts +82 -0
  107. package/types/localization/ui.d.ts +62 -0
  108. package/types/operation/gamepad_handler.d.ts +67 -0
  109. package/types/operation/gesture.d.ts +72 -0
  110. package/types/operation/gesture_handler.d.ts +53 -0
  111. package/types/operation/handler_base.d.ts +8 -0
  112. package/types/operation/keyboard_handler.d.ts +46 -0
  113. package/types/operation/keymap.d.ts +24 -0
  114. package/types/operation/letter_keymap.d.ts +8 -0
  115. package/types/operation/mouse_handler.d.ts +42 -0
  116. package/types/operation/num_keymap.d.ts +12 -0
  117. package/types/operation/operation.d.ts +102 -0
  118. package/types/operation/pixel_streaming_input.d.ts +82 -0
  119. package/types/operation/touch_handler.d.ts +11 -0
  120. package/types/operation/utils.d.ts +18 -0
  121. package/types/screen_state.d.ts +133 -0
  122. package/types/utils/browser_type.d.ts +37 -0
  123. package/types/utils/capabilities.d.ts +54 -0
  124. package/types/utils/full_screen.d.ts +25 -0
  125. package/types/utils/lock_pointer.d.ts +25 -0
  126. package/types/utils/log.d.ts +25 -0
  127. package/types/utils/scale_mode.d.ts +70 -0
  128. package/types/utils/unit.d.ts +154 -0
  129. package/types/utils/webgl_utils.d.ts +48 -0
@@ -0,0 +1,228 @@
1
+ # LarkSR Object Parameters
2
+
3
+ The parameters for creating a LarkSR object are as follows:
4
+
5
+ ```typescript
6
+ /**
7
+ * LarkSR Configuration Interface
8
+ */
9
+ interface ILarkSRConfig {
10
+ /**
11
+ * Required. Root element. The component will be mounted under the root element.
12
+ * Note: *Do not* set it to document.documentElement.
13
+ * In default mode, the root element will be rotated to enforce landscape mode.
14
+ * @see handleRootElementSize
15
+ * @see scaleMode
16
+ */
17
+ rootElement: HTMLElement;
18
+ /**
19
+ * Optional. Server address. The address for accessing the LarkServer frontend.
20
+ * Example: http://192.168.0.55:8181/
21
+ * When using managed services, the server address is automatically assigned and can be left empty.
22
+ * When using managed services, @see CreateLarkSRClientFromePXYHost @see larksr.connectWithPxyHost
23
+ */
24
+ serverAddress?: string;
25
+ /**
26
+ * Optional. SDK authorization code. If not provided here, it must be initialized in the instance later by calling initSDKAuthCode.
27
+ */
28
+ authCode?: string;
29
+ /**
30
+ * Optional. Whether the authorization is successful.
31
+ * @deprecated This parameter is currently not called back. If SDK verification fails, it will return a failure in connect.
32
+ */
33
+ authCodeCallback?: (isSuccess: boolean, e: any) => void;
34
+ /**
35
+ * Optional. Background image URL during loading.
36
+ */
37
+ loadingBgUrl?: string;
38
+ /**
39
+ * Optional. Whether to synchronize the size style of the root component.
40
+ * Enabled by default, setting the root component size to the browser viewport size.
41
+ * If disabled, the internal components will be displayed according to the size of the passed root element.
42
+ * Note: When disabled, the root element will not be automatically filled. If the root element height is 0, it will not be displayed.
43
+ * Note: When disabled, mobileForceLandscape will lose its effect.
44
+ */
45
+ handleRootElementSize?: boolean;
46
+ /**
47
+ * Same as handleRootElementSize.
48
+ */
49
+ handelRootElementSize?: boolean;
50
+ /**
51
+ * Whether to only set the rotation of the root component. Only effective when handleRootElementSize is true. Sets the rotation of the root component for mobileForceLandscape mode.
52
+ * Default is false. In this case, the SDK will set the width, height, margin 0, and padding 0 of the root component.
53
+ * When true and handleRootElementSize is also true, only the rotation attribute of the root component is set, used for forced landscape mode and switching between forced landscape and portrait modes.
54
+ * Note: When onlyHandleRootElementTransform is successfully enabled, ensure the size of the root element and call the resize method to notify the update of the root element size when the root element changes.
55
+ */
56
+ onlyHandleRootElementTransform?: boolean;
57
+ /**
58
+ * Whether to listen to mouse, keyboard, and other input events within the SDK.
59
+ * If disabled, input events need to be sent manually.
60
+ * Note: When disabled, full-screen mode and lock mode will be invalid and need to be triggered externally.
61
+ * @see fullScreenMode
62
+ */
63
+ handlInput?: boolean;
64
+ /**
65
+ * Whether to attempt muted playback when video autoplay fails. An event will be thrown when muted playback occurs.
66
+ * When the user interacts with the screen during muted playback, it will attempt to play sound.
67
+ */
68
+ mutePlayWhenFailed?: boolean;
69
+ /**
70
+ * Optional. Whether it is a VR monitoring type.
71
+ */
72
+ isMonitor?: boolean;
73
+ /**
74
+ * Optional. Bitrate.
75
+ */
76
+ codeRate?: number;
77
+ /**
78
+ * Optional. Frame rate.
79
+ */
80
+ frameRate?: number;
81
+ /**
82
+ * Optional. Audio frame rate.
83
+ */
84
+ audioCodeRate?: number;
85
+ /**
86
+ * Optional. Log level. Default is warn.
87
+ */
88
+ logLevel?: 'info' | 'warn' | 'error';
89
+ /**
90
+ * Optional. Loading timeout. Default is 60s. Loading stops after this time.
91
+ */
92
+ loadingTimeout?: number;
93
+ /**
94
+ * Optional. Whether to automatically synchronize clipboard data.
95
+ */
96
+ syncLocalToCloudClipboard?: boolean;
97
+ /**
98
+ * Optional. Preferred video codec format.
99
+ */
100
+ preferDecoder?: 'auto' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'hevc' | 'av1x';
101
+ /**
102
+ * Optional. Video scaling mode within the container.
103
+ * ScaleMode: 'contain' | 'fill_clip' | 'fill_stretch'
104
+ * contain: Scales with the original size of the application.
105
+ * fill_clip: Crop mode, fully fills the screen while maintaining aspect ratio.
106
+ * fill_stretch: Stretch mode, fully fills the screen without maintaining aspect ratio.
107
+ * Corresponds to the initial display mode in the backend application management -> application editing -> general advanced settings. This configuration has a higher priority than the backend configuration.
108
+ */
109
+ scaleMode?: ScaleMode;
110
+ /**
111
+ * Full-screen mode.
112
+ * 0 -》 Manually triggered by the user.
113
+ * 1 -》 Triggered on the first click.
114
+ * 2 -》 Triggered on every click.
115
+ * Corresponds to the full-screen mode in the backend application management -> application editing -> general advanced settings. This configuration has a higher priority than the backend configuration.
116
+ */
117
+ fullScreenMode?: number;
118
+ /**
119
+ * Optional. Full-screen mode on mobile devices, same values as fullScreenMode.
120
+ * Corresponds to the full-screen mode in the backend application management -> application editing -> mobile advanced settings. This configuration has a higher priority than the backend configuration.
121
+ */
122
+ mobileFullScreenMode?: number;
123
+ /**
124
+ * Optional. Whether to force landscape mode on mobile devices.
125
+ * Corresponds to whether to force landscape mode on mobile devices in the backend application management -> application editing -> mobile advanced settings. This configuration has a higher priority than the backend configuration.
126
+ */
127
+ mobileForceLandscape?: boolean;
128
+ /**
129
+ * Optional.
130
+ * Initial mouse mode, 0 for automatic detection, 1 for locked, 2 for unlocked.
131
+ * Corresponds to the initial mouse mode in the backend application management -> application editing -> general advanced settings. This configuration has a higher priority than the backend configuration.
132
+ */
133
+ initCursorMode?: boolean;
134
+ /**
135
+ * Optional.
136
+ * External port mapping of the rendering server.
137
+ * Format: key=[Rendering Server IP:PORT] value=[External IP:PORT]
138
+ * {
139
+ * "RENDER-A-IP:RENDER-A-PORT1": "PUBLIC-A-IP:PORT1",
140
+ * "RENDER-B-IP:RENDER-B-PORT1": "PUBLIC-A-IP:PORT2",
141
+ * "RENDER-C-IP:RENDER-C-PORT1": "PUBLIC-A-IP:PORT3",
142
+ * "RENDER-D-IP:RENDER-D-PORT1": "PUBLIC-B-IP:PORT1",
143
+ * "RENDER-E-IP:RENDER-E-PORT1": "PUBLIC-B-IP:PORT2",
144
+ * "RENDER-E-IP:RENDER-E-PORT2": "PUBLIC-C-IP:PORT1",
145
+ * }
146
+ */
147
+ publicPortMapping?: PublicPortMapping;
148
+ /**
149
+ * Optional.
150
+ * Whether to prompt for text input APP_REQUEST_INPUT.
151
+ * When the server detects an input method event, an event will be thrown. You can add an input box on the web layer and use inputText to send text to the cloud.
152
+ * Enabled by default. When manually disabled, the APP_REQUEST_INPUT event will not be thrown.
153
+ */
154
+ textInputEventPrompt?: boolean;
155
+ /**
156
+ * Optional.
157
+ * Whether to automatically connect to audio devices when the audio input feature is enabled.
158
+ * Disabled by default.
159
+ * Note that the default audio device of the system is enabled by default.
160
+ */
161
+ audioInputAutoStart?: boolean;
162
+ /**
163
+ * Optional.
164
+ * Whether to automatically connect to video devices when the video input feature is enabled.
165
+ * Disabled by default.
166
+ * Note that the default video device of the system is enabled by default.
167
+ */
168
+ videoInputAutoStart?: boolean;
169
+ /**
170
+ * Optional.
171
+ * mouseZoomDirection
172
+ * Used for the correspondence between pinch zoom operations on mobile devices and application mouse zoom.
173
+ * 1: Mouse wheel up to zoom in,
174
+ * 0: Mouse wheel down to zoom in (default).
175
+ */
176
+ mouseZoomDirection?: number;
177
+ /**
178
+ * Optional.
179
+ * Touch operation mode, whether the touch operation on mobile devices corresponds to the touch screen or mouse on the cloud.
180
+ * 'touchScreen' | 'mouse'
181
+ * Touch operation mode, corresponds to the touch operation mode in the backend application management -> application editing -> mobile advanced settings. This configuration has a higher priority than the backend configuration.
182
+ */
183
+ touchOperateMode?: 'touchScreen' | 'mouse';
184
+ /**
185
+ * Optional.
186
+ * Prefer to use the external IP for peer-to-peer connection of the rendering server.
187
+ * If configured, it will override the preferPublicIp parameter set in the backend.
188
+ */
189
+ preferPublicIp?: string;
190
+ /**
191
+ * Optional.
192
+ * Whether to autoplay. Enabled by default.
193
+ * If disabled, there will be a prompt UI after a successful connection, and the user needs to trigger it manually.
194
+ * Enabling autoplay does not guarantee that all browsers will autoplay successfully. When playback fails or the browser does not support autoplay,
195
+ * a play button will be displayed, and the user needs to click the play button to play manually.
196
+ */
197
+ autoPlay?: boolean;
198
+ /**
199
+ * Optional.
200
+ * Whether to display the play button in case of playback failure or manual playback mode.
201
+ * Enabled by default. Note that if disabled, you need to add prompts or UI to guide the user to click play.
202
+ * In the UI, the user needs to trigger larksr.videoComponent.playVideo();
203
+ */
204
+ showPlayButton?: boolean;
205
+ /**
206
+ * Optional.
207
+ * Language settings, currently only supports Chinese and English, default is Chinese.
208
+ * zh-CN for Chinese, en for English.
209
+ */
210
+ language?: string;
211
+ /**
212
+ * Timeout for receiving video streams or successful playback after a successful peer-to-peer connection. In autoplay mode, a prompt button will pop up after the timeout.
213
+ * Default is 20s.
214
+ */
215
+ playTimeout?: number;
216
+ /**
217
+ * Whether to use the new camera/microphone protocol.
218
+ * Separate upload process requires rendering server version greater than 3290.
219
+ */
220
+ useSeparateMediaSharePeer?: boolean;
221
+ /**
222
+ * Whether to enable canvas rendering. Disabled by default.
223
+ * Note that enabling canvas on mobile devices will consume additional performance.
224
+ * Known issue: On iOS, when canvas mode is disabled, the stretch mode that ignores the aspect ratio is invalid.
225
+ */
226
+ enableCanvasRender?: boolean;
227
+ }
228
+ ```
@@ -0,0 +1,84 @@
1
+ # Dev Branch Current Version 3.2.4-dev.0.1
2
+
3
+ > The Dev branch includes unreleased server-side features. Used for testing and debugging.
4
+
5
+ ## New Features in 3.2.4-dev.0.1
6
+
7
+ > The following sample code assumes that the `larksr` object has been initialized and connected successfully.
8
+ > Test demo: https://github.com/ParaverseTechnology/lark_sr_websdk_demos/tree/gh-pages
9
+
10
+ (1). Added multi-channel media upload feature on the Web. Use `larksr.getMediaSharePeerConnection(index)` to get the media upload channel.
11
+
12
+ The index supports 0 - 5. The operations for opening media after obtaining the media channel are the same as the previous interface. The original interface is equivalent to `getMediaSharePeerConnection(0)`.
13
+
14
+ Usage example:
15
+
16
+ ```javascript
17
+ larksr.getMediaSharePeerConnection(0).openVideo();
18
+ larksr.getMediaSharePeerConnection(0).closeVideo();
19
+ ```
20
+
21
+ > When connected to older versions of the rendering server that do not support multi-channel uploads, only channel 0 will work.
22
+
23
+ (2). Get the connection status of a specific channel using `getStats`
24
+
25
+ ```javascript
26
+ larksr.getMediaSharePeerConnection(0).getStats()
27
+ .then((res) => {
28
+ console.log("state: ", res);
29
+ })
30
+ .catch((e) => {
31
+ console.log("get state failed", e);
32
+ })
33
+ ```
34
+
35
+ (3). Set the video codec for a specific connection channel using `preferVideoCode`
36
+
37
+ ```javascript
38
+ larksr.getMediaSharePeerConnection(0).preferVideoCode = 'h264';
39
+ ```
40
+
41
+ > If the current browser supports the specified video codec, it will be used preferentially. If not, the default codec will be used.
42
+ > The setting will take effect the next time the video is opened. The already opened video channel will not change.
43
+
44
+ (4). Set the video upload bitrate for a specific connection channel
45
+
46
+ ```javascript
47
+ larksr.getMediaSharePeerConnection(0).codeRate = {
48
+ start: 1000,
49
+ min: 1000,
50
+ max: 20000,
51
+ }
52
+ ```
53
+
54
+ > The setting will take effect the next time the video is opened. The already opened video channel will not change.
55
+
56
+ (5). Media connection channels can listen to events individually, for example:
57
+
58
+ ```javascript
59
+ larksr.getMediaSharePeerConnection(0).on("rtc_state_change", function(e) {
60
+ console.log("ice state change", e);
61
+ });
62
+ ```
63
+
64
+ (6). The opened or saved media channel object has a unique id, 0 - 5
65
+
66
+ ```javascript
67
+ larksr.getMediaSharePeerConnection(0).id
68
+ ```
69
+
70
+ (7). Force the use of canvas mode, and the video channel's canvas can rotate the image clockwise or counterclockwise.
71
+
72
+ Enable rotation:
73
+
74
+ ```javascript
75
+ larksr.getMediaSharePeerConnection(0).forceRenderToCanvas = true;
76
+ ```
77
+
78
+ Force clockwise rotation:
79
+
80
+ ```javascript
81
+ larksr.getMediaSharePeerConnection(0).canvasRender.setRotate(true);
82
+ ```
83
+
84
+ > The setting will take effect the next time the video is opened. The already opened video channel will not change.
@@ -0,0 +1,286 @@
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
+ ```