larksr_websdk 3.2.6 → 3.2.7

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 (62) hide show
  1. package/README.md +32 -24
  2. package/dist/doc/index.md +43 -3
  3. package/dist/larksr-web-sdk.min.js +2 -2
  4. package/dist/types/api.d.ts +1 -0
  5. package/dist/types/appli_params.d.ts +3 -0
  6. package/dist/types/larksr.d.ts +27 -3
  7. package/dist/types/screen_state.d.ts +1 -0
  8. package/package.json +9 -6
  9. package/types/api.d.ts +88 -0
  10. package/types/appli_params.d.ts +263 -0
  11. package/{dist/types → types}/common/cmd.d.ts +0 -0
  12. package/{dist/types → types}/common/constant.d.ts +0 -0
  13. package/{dist/types → types}/common/interface.d.ts +0 -0
  14. package/types/config.d.ts +59 -0
  15. package/{dist/types → types}/event/bus.d.ts +0 -0
  16. package/{dist/types → types}/event/event_base.d.ts +0 -0
  17. package/{dist/types → types}/event/events.d.ts +0 -0
  18. package/{dist/types → types}/event/iframe_poster.d.ts +0 -0
  19. package/{dist/types → types}/event/message.d.ts +0 -0
  20. package/types/index.d.ts +24 -0
  21. package/{dist/types → types}/lark/Worker.d.ts +0 -0
  22. package/{dist/types → types}/lark/application.d.ts +0 -0
  23. package/{dist/types → types}/lark/custom.d.ts +0 -0
  24. package/{dist/types → types}/lark/lark_event_type.d.ts +0 -0
  25. package/{dist/types → types}/lark/message.d.ts +0 -0
  26. package/{dist/types → types}/lark/peer_connection.d.ts +0 -0
  27. package/{dist/types → types}/lark/sdp_util.d.ts +0 -0
  28. package/{dist/types → types}/lark/test_pixel_streaming.d.ts +0 -0
  29. package/{dist/types → types}/lark/websocket_channel.d.ts +0 -0
  30. package/{dist/types → types}/lark/websocket_proxy.d.ts +0 -0
  31. package/types/larksr.d.ts +509 -0
  32. package/{dist/types → types}/localization/base.d.ts +0 -0
  33. package/{dist/types → types}/localization/gesture_ins.d.ts +0 -0
  34. package/{dist/types → types}/localization/language.d.ts +0 -0
  35. package/{dist/types → types}/localization/loader.d.ts +0 -0
  36. package/{dist/types → types}/localization/message.d.ts +0 -0
  37. package/{dist/types → types}/localization/ui.d.ts +0 -0
  38. package/{dist/types → types}/operation/gamepad_handler.d.ts +0 -0
  39. package/{dist/types → types}/operation/gesture.d.ts +0 -0
  40. package/{dist/types → types}/operation/gesture_handler.d.ts +0 -0
  41. package/{dist/types → types}/operation/handler_base.d.ts +0 -0
  42. package/{dist/types → types}/operation/keyboard_handler.d.ts +0 -0
  43. package/{dist/types → types}/operation/keymap.d.ts +0 -0
  44. package/{dist/types → types}/operation/letter_keymap.d.ts +0 -0
  45. package/{dist/types → types}/operation/mouse_handler.d.ts +0 -0
  46. package/{dist/types → types}/operation/num_keymap.d.ts +0 -0
  47. package/{dist/types → types}/operation/operation.d.ts +0 -0
  48. package/{dist/types → types}/operation/pixel_streaming_input.d.ts +0 -0
  49. package/{dist/types → types}/operation/touch_handler.d.ts +0 -0
  50. package/{dist/types → types}/operation/utils.d.ts +0 -0
  51. package/{dist/types → types}/protobuf/cloudlark.d.ts +0 -0
  52. package/{dist/types → types}/protobuf/message.d.ts +0 -0
  53. package/types/screen_state.d.ts +109 -0
  54. package/types/sdk_auth.d.ts +11 -0
  55. /package/{dist/types → types}/utils/browser_type.d.ts +0 -0
  56. /package/{dist/types → types}/utils/capabilities.d.ts +0 -0
  57. /package/{dist/types → types}/utils/full_screen.d.ts +0 -0
  58. /package/{dist/types → types}/utils/lock_pointer.d.ts +0 -0
  59. /package/{dist/types → types}/utils/log.d.ts +0 -0
  60. /package/{dist/types → types}/utils/scale_mode.d.ts +0 -0
  61. /package/{dist/types → types}/utils/unit.d.ts +0 -0
  62. package/dist/dist.zip +0 -0
@@ -0,0 +1,509 @@
1
+ /**
2
+ * fcx@pingxingyun.com
3
+ * www.pingxingyun.com
4
+ */
5
+ import { EventBase, LocalEvent } from './event/event_base';
6
+ import Application, { APP_STATE } from './lark/application';
7
+ import { AppliParams, AppliParamsUtils, IAppliParams, LoadAppliParamsFromUrl, LoadAppliParamsStartAppInfo } from './appli_params';
8
+ import { LarkEventType } from './lark/lark_event_type';
9
+ import API from './api';
10
+ import ScreenState from './screen_state';
11
+ import Operation from './operation/operation';
12
+ import { CloudLark } from './protobuf/cloudlark';
13
+ import { KEYMAP, VirtualKey } from './operation/keymap';
14
+ import FullScreen from './utils/full_screen';
15
+ import LockPointer from './utils/lock_pointer';
16
+ import ScaleMode from './utils/scale_mode';
17
+ import Capabilities from './utils/capabilities';
18
+ declare const enum PlayerModeType {
19
+ /**
20
+ * 普通模式
21
+ */
22
+ Normal = 0,
23
+ /**
24
+ * 交互模式(可以一人操作多人看)
25
+ */
26
+ Interactive = 1,
27
+ /**
28
+ * 多人互动模式 (多人可操作)
29
+ */
30
+ MutiPlayer = 2
31
+ }
32
+ /**
33
+ * 当前用户的身份
34
+ */
35
+ declare const enum UserType {
36
+ /**
37
+ * 观看者
38
+ */
39
+ Observer = 0,
40
+ /**
41
+ * 操作者
42
+ */
43
+ Player = 1
44
+ }
45
+ /**
46
+ * LarkSR 实例会发出的事件
47
+ */
48
+ declare enum LarkSRClientEvent {
49
+ /**
50
+ * 连接渲染服务器成功 .
51
+ */
52
+ CONNECT = "connect",
53
+ /**
54
+ * 登录成功时触发,会返回当前用户id .
55
+ */
56
+ LOGIN_SUCCESS = "loginsuccess",
57
+ /**
58
+ * 无操作超时时触发 .
59
+ */
60
+ NO_OPERATION_TIMEOUT = "operatetimeout",
61
+ /**
62
+ * 连接关闭.
63
+ */
64
+ CLOSE = "close",
65
+ /**
66
+ * 云端应用关闭,但连接未关闭
67
+ */
68
+ APP_CLOSE = "appclose",
69
+ /**
70
+ * 获取到远端视频流 .
71
+ */
72
+ GOT_REMOTE_STREAM = "gotremotesteam",
73
+ /**
74
+ * 视频加载成功,等待播放 .
75
+ */
76
+ MEDIA_LOADED = "meidaloaded",
77
+ /**
78
+ * 视频自动播放成功 .
79
+ */
80
+ MEDIA_PLAY_SUCCESS = "mediaplaysuccess",
81
+ /**
82
+ * 视频自动播放失败 .
83
+ */
84
+ MEDIA_PLAY_FAILED = "mediaplayfailed",
85
+ /**
86
+ * 自动播放声音失败,以静音模式播放 .
87
+ */
88
+ MEDIA_PLAY_MUTE = "meidaplaymute",
89
+ /**
90
+ * 云渲染连接状态改变 .
91
+ */
92
+ APPSTATE_CHANGE = "appstatechange",
93
+ /**
94
+ * 云端应用大小变化 .
95
+ */
96
+ APP_RESIZE = "appresize",
97
+ /**
98
+ * 云端应用鼠标模式变化时触发 .
99
+ */
100
+ APP_MOUSE_MODE = "appmousemode",
101
+ /**
102
+ * 云端应用鼠标状态变化 .
103
+ */
104
+ APP_CURSOR_MODE = "appcursormode",
105
+ /**
106
+ * 玩家列表 .
107
+ */
108
+ PLAYER_LIST = "playerlist",
109
+ /**
110
+ * 视频连接状态
111
+ */
112
+ PEERSTATUS_REPORT = "peerstatusreport",
113
+ /**
114
+ * 云端应用请求输入文字 .
115
+ */
116
+ APP_REQUEST_INPUT = "apprequestinput",
117
+ /**
118
+ * 云端应用请求手柄震动
119
+ */
120
+ APP_REQUEST_GAMEPAD_OUPUT = "apprequestgamepadoutput",
121
+ /**
122
+ * 截图成功.
123
+ */
124
+ CAPTURE_FRAME = "captureframe",
125
+ /**
126
+ * 数据通道打开 .
127
+ */
128
+ DATACHANNEL_OPEN = "datachannelopen",
129
+ /**
130
+ * 数据通道关闭 .
131
+ */
132
+ DATACHANNEL_CLOSE = "datachannelclose",
133
+ /**
134
+ * 数据通达收到文字消息 .
135
+ */
136
+ DATACHANNEL_TEXT = "datachanneltext",
137
+ /**
138
+ * 数据通道收到字节消息 .
139
+ */
140
+ DATACHANNEL_BINARY = "datachannelbinary",
141
+ /**
142
+ * 更详细的事件状态,主要用于向iframe外部抛出 .
143
+ */
144
+ LarkEvent = "larkevent",
145
+ /**
146
+ * 发生错误时抛出
147
+ */
148
+ ERROR = "error",
149
+ /**
150
+ * 一般信息提示
151
+ */
152
+ INFO = "info"
153
+ }
154
+ /**
155
+ * LarkSR 发出的事件
156
+ */
157
+ interface LarkSREvent extends LocalEvent<LarkSRClientEvent> {
158
+ data?: any;
159
+ message?: string;
160
+ code?: number;
161
+ larkevent?: LarkEventType;
162
+ }
163
+ /**
164
+ * 构造 LarkSR 参数
165
+ */
166
+ interface ILarkSRConfig {
167
+ /**
168
+ * 必选项 根元素。组件会挂载到跟元素下面
169
+ * 注意*不要*设置为 document.documentElement
170
+ * 默认模式下会通过旋转根元素实现强制横屏模式。
171
+ * @see handelRootElementSize
172
+ * @see scaleMode
173
+ */
174
+ rootElement: HTMLElement;
175
+ /**
176
+ * 必选项 服务器地址. LarkServer 前台访问的地址
177
+ * 如: http://192.168.0.55:8181/
178
+ */
179
+ serverAddress: string;
180
+ /**
181
+ * 可选项。 sdk 授权码。如果不在此处填,则必须在后续的实例里调用 initSDKAuthCode 初始化。
182
+ */
183
+ authCode?: string;
184
+ /**
185
+ * 可选项,授权是否成功
186
+ */
187
+ authCodeCallback?: (isSuccess: boolean, e: any) => void;
188
+ /**
189
+ * 可选项,载入时的背景图片 url
190
+ */
191
+ loadingBgUrl?: string;
192
+ /**
193
+ * 可选项,是否同步传入根的组件的大小样式。
194
+ * 默认开启,将跟组件大小设置为浏览器视口大小
195
+ * 如果关闭,内部组件将按照传入的根元素大小去显示
196
+ * 注意,当关闭时不会自动填充根元素,如果根元素高度为 0 将显示不出来。
197
+ * 注意,当关闭时 mobileForceLandscape 将失去作用。
198
+ */
199
+ handelRootElementSize?: boolean;
200
+ /**
201
+ * 是否在sdk内部监听鼠标键盘等输入事件
202
+ * 如果关闭需要手动发送输入事件
203
+ * 注意关闭时全屏模式和锁定模式将失效,需要在sdk外部触发
204
+ * @see fullScreenMode
205
+ */
206
+ handlInput?: boolean;
207
+ /**
208
+ * 当视频播自动放失败时是否尝试静音播放,静音播放时将抛出事件
209
+ * 静音播放当用户操作屏幕时将尝试播放声音
210
+ */
211
+ mutePlayWhenFiled?: boolean;
212
+ /**
213
+ * 可选项,是否是 vr 监控类型。
214
+ */
215
+ isMonitor?: boolean;
216
+ /**
217
+ * 可选项,码率
218
+ */
219
+ codeRate?: number;
220
+ /**
221
+ * 可选项,帧率
222
+ */
223
+ frameRate?: number;
224
+ /**
225
+ * 可选项,音频帧率
226
+ */
227
+ audioCodeRate?: number;
228
+ /**
229
+ * 可选项,日志级别。默认为 warn
230
+ */
231
+ logLevel?: 'info' | 'warn' | 'error';
232
+ /**
233
+ * 可选项,载入超时时间. 默认为 60s。超过该事件停止载入
234
+ */
235
+ loadingTimeout?: number;
236
+ /**
237
+ * 可选项,是否自动同步剪贴板数据
238
+ */
239
+ syncLocalToCloudClipboard?: boolean;
240
+ /**
241
+ * 可选项,优选选择的视频编码格式
242
+ */
243
+ perferDecoder?: 'auto' | 'vp8' | 'vp9' | 'h264' | 'av1x';
244
+ /**
245
+ * 可选项,视频在容器中的缩放模式
246
+ *
247
+ */
248
+ scaleMode?: ScaleMode;
249
+ /**
250
+ * 全屏模式
251
+ * 0 -》 用户手动触发
252
+ * 1 -》 首次点击进入触发
253
+ * 2 -》 每次点击触发
254
+ */
255
+ fullScreenMode?: number;
256
+ /**
257
+ * 可选项,手机端的全屏模式,值同 fullScreenMode
258
+ */
259
+ mobileFullScreenMode?: number;
260
+ /**
261
+ * 可选项,手机端是否强制横屏
262
+ */
263
+ mobileForceLandscape?: boolean;
264
+ /**
265
+ * 初始化鼠标模式, true 锁定,false 非锁定
266
+ */
267
+ initCursorMode?: boolean;
268
+ }
269
+ /**
270
+ * 通过调用后台接口获取云端应用参数
271
+ * @param config 传入 config @see ILarkSRConfig
272
+ * @param params 进入应用接口参数。appliId 为必填项
273
+ * @returns Promise 创建 larksr client 是否成功
274
+ */
275
+ export declare function CreateLarkSRClientFromeAPI(config: ILarkSRConfig, params: {
276
+ appliId: string;
277
+ playerMode?: number;
278
+ userType?: number;
279
+ roomCode?: string;
280
+ taskId?: string;
281
+ nickname?: string;
282
+ }): Promise<LarkSR>;
283
+ /**
284
+ * 通过从url参数中获取云端应用相关参数
285
+ * @param config 传入 config @see ILarkSRConfig
286
+ * @returns Promise 创建 larksr client 是否成功
287
+ */
288
+ export declare function CreateLarkSRClientFromeUrl(config: ILarkSRConfig): Promise<LarkSR>;
289
+ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
290
+ /**
291
+ * 应用参数,构建时传入
292
+ */
293
+ get params(): AppliParams;
294
+ private _params;
295
+ /**
296
+ * 当前的玩家模式,
297
+ */
298
+ get playerModeType(): PlayerModeType;
299
+ /**
300
+ * 用户类型
301
+ * @see UserType
302
+ */
303
+ get userType(): UserType;
304
+ /**
305
+ * 是否是观看者模式
306
+ */
307
+ get isObMode(): boolean;
308
+ /**
309
+ * 当前是否是交互模式,交互默认即可以操作的模式
310
+ */
311
+ get isInteractiveMode(): boolean;
312
+ get isPixelStreaming(): boolean;
313
+ /**
314
+ * 当前 app 的状态
315
+ */
316
+ get appState(): APP_STATE;
317
+ get app(): Application;
318
+ private _app;
319
+ /**
320
+ * 云端画面是否准备好,准备好后才可以发送输入事件
321
+ */
322
+ get remoteScreenReady(): boolean;
323
+ set remoteScreenReady(ready: boolean);
324
+ private _remoteScreenReady;
325
+ /**
326
+ * 当前的屏幕状态
327
+ * @see ScreenState
328
+ */
329
+ get screenState(): ScreenState;
330
+ private _screenState;
331
+ /**
332
+ * 当前的输入控制
333
+ * @see Operation
334
+ */
335
+ get op(): Operation;
336
+ private _op;
337
+ /**
338
+ * 像素流送输入控制
339
+ */
340
+ private pixelInput;
341
+ private iframeHandler;
342
+ get fullScreen(): FullScreen;
343
+ private _fullScreen;
344
+ get lockPointer(): LockPointer;
345
+ private _lockPointer;
346
+ private _view;
347
+ /**
348
+ * 视频元素
349
+ */
350
+ get videoElement(): HTMLVideoElement;
351
+ /**
352
+ * 视频显示组件
353
+ */
354
+ get videoComponent(): any;
355
+ /**
356
+ * 视频显示组件的父容器
357
+ */
358
+ get containerElement(): any;
359
+ /**
360
+ *
361
+ */
362
+ get viewportElement(): any;
363
+ get rootElement(): HTMLElement;
364
+ private _rootElement;
365
+ get serverAddress(): string;
366
+ private _serverAddress;
367
+ get serverIp(): string;
368
+ get config(): ILarkSRConfig;
369
+ private _config;
370
+ private loadingTimeout;
371
+ private sdkAuth;
372
+ /**
373
+ * 后台分配的用户id
374
+ */
375
+ get uid(): number;
376
+ private _uid;
377
+ /**
378
+ * @returns 是否是 Task的拥有者
379
+ */
380
+ isTaskOwner(): boolean;
381
+ _isTaskOwner: boolean;
382
+ /**
383
+ * LarkSR 客户端。所有操作和事件通过该类传递
384
+ * 注意,如果手动创建该类,要清楚参数的意义,一般只有调试等特殊情况才手动创建该类
385
+ * @see CreateLarkSRClientFromeAPI, CreateLarkSRClientFromeUrl
386
+ * @param config 本地配置,如果有 IAppliParams 相同的配置项,优先级最高
387
+ * @param params [可选参数] 云端应用参数等,通过后台接口或者url参数获取。
388
+ */
389
+ constructor(config: ILarkSRConfig, params?: IAppliParams);
390
+ /**
391
+ *
392
+ * @param id sdk id 初始化sdkid
393
+ * @returns
394
+ */
395
+ initSDKAuthCode(id: string): Promise<void>;
396
+ /**
397
+ * 连接云端渲染资源
398
+ * @params appID 云端资源的 ID
399
+ * @returns Promise 调用接口并校验授权通过返回成功并自动开始连接
400
+ */
401
+ connect(params: {
402
+ appliId: string;
403
+ playerMode?: number;
404
+ userType?: number;
405
+ roomCode?: string;
406
+ taskId?: string;
407
+ nickname?: string;
408
+ }): Promise<void>;
409
+ /**
410
+ * 手动重设进入应用参数
411
+ * @param params
412
+ */
413
+ setAppliParams(params: IAppliParams): void;
414
+ /**
415
+ * 开始云渲染流程
416
+ * 启动时应用参数不能为空,包括 taskID,appServer,appPort
417
+ * @returns 是否成功。主要校验授权码是否成功
418
+ */
419
+ start(): Promise<void>;
420
+ /**
421
+ * 重新开始云渲染流程
422
+ */
423
+ restart(): void;
424
+ /**
425
+ * 重新启动云端应用
426
+ */
427
+ restartApp(): void;
428
+ /**
429
+ * 主动关闭连接
430
+ */
431
+ close(): void;
432
+ /**
433
+ * 切换当前操作者
434
+ * @param uid 用户id
435
+ */
436
+ changeOperater(uid: number): void;
437
+ /**
438
+ * 向云端应用发送文字。当云端应用出现输入框时,可以将本地文本填写进去.
439
+ * @param text 文字
440
+ */
441
+ inputText(text: string): void;
442
+ /**
443
+ * 发送文字消息给数据通道
444
+ * 注意 云端应用要继承数据通道功能
445
+ * @param text 文字
446
+ */
447
+ sendTextToDataChannel(text: string): void;
448
+ /**
449
+ * 发送字节消息给数据通道
450
+ * 注意 云端应用要继承数据通道功能
451
+ * @param binary 字节消息
452
+ */
453
+ sendBinaryToDataChannel(binary: Uint8Array): void;
454
+ /**
455
+ * 手动向iframe外抛出事件
456
+ * 注意一般只在用 iframe 二次集成时才用到
457
+ * @param type
458
+ * @param data
459
+ * @param msg
460
+ */
461
+ postMsg(type: LarkEventType, data?: any, msg?: string): void;
462
+ /**
463
+ * 退出当前页面
464
+ * 注意如果是微信内会调用 WeixinJSBridge 的 close window 方法
465
+ * 可以不使用该方法退出页面
466
+ */
467
+ quit(): void;
468
+ /**
469
+ * 操作相关事件
470
+ * 所有事件坐标相对于云端应用,不相对于网页
471
+ * @param input 操作指令
472
+ */
473
+ sendInput(input: CloudLark.IClientInput): void;
474
+ moseMove(PosX: number, PosY: number, DeltaX: number, DeltaY: number): void;
475
+ mouseTap(PosX: number, PosY: number, key: CloudLark.MouseKey): void;
476
+ mouseDown(PosX: number, PosY: number, key: CloudLark.MouseKey): void;
477
+ mouseUp(PosX: number, PosY: number, key: CloudLark.MouseKey): void;
478
+ mouseWheel(PosX: number, PosY: number, Delata: number): void;
479
+ keyDown(key: string, isRepeat: boolean): void;
480
+ keyUp(key: string): void;
481
+ gamepadButtonDown(userIndex: number, button: number, isRepeat: boolean): void;
482
+ gamepadButtonUp(userIndex: number, button: number): void;
483
+ gamepadTrigger(userIndex: number, isleft: boolean, value: number): void;
484
+ joystick(userIndex: number, thumblx: number, thumbly: number, thumbrx: number, thumbry: number): void;
485
+ touchDown(id: number, x: number, y: number): void;
486
+ touchMove(id: number, x: number, y: number): void;
487
+ touchUp(id: number, x: number, y: number): void;
488
+ getMouseButtonType(button: 'left' | 'mid' | 'right'): CloudLark.MouseKey;
489
+ $emit(type: LarkEventType, data?: any, message?: string): void;
490
+ $emitError(message?: string, code?: number): void;
491
+ $emitInfo(message?: string, code?: number): void;
492
+ private createEvent;
493
+ private taskProcess;
494
+ private startProcess;
495
+ private onAppStateChange;
496
+ private onGotRemoteStream;
497
+ private onCursorStyle;
498
+ private onAppResize;
499
+ private onAppMouseMode;
500
+ private onAppPlayerList;
501
+ private onAppRequestText;
502
+ private onDataChannelText;
503
+ private onDataChannelBinary;
504
+ private onDataChannelOpen;
505
+ private onDataChannelClose;
506
+ private onOperationTimeout;
507
+ private onOperationInput;
508
+ }
509
+ export { LarkSR, ILarkSRConfig, PlayerModeType, UserType, LarkSREvent, LarkEventType, LarkSRClientEvent, AppliParams, AppliParamsUtils, LoadAppliParamsFromUrl, LoadAppliParamsStartAppInfo, EventBase, API, Operation, Capabilities, ScaleMode, VirtualKey, KEYMAP, CloudLark, FullScreen, LockPointer, };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,109 @@
1
+ import { ViewPort } from "./common/interface";
2
+ import { IAppliParams } from "./appli_params";
3
+ import { CloudLark } from "./protobuf/cloudlark";
4
+ import ScaleMode from "./utils/scale_mode";
5
+ import { LocalEvent, EventBase } from './event/event_base';
6
+ export interface ContainerSize {
7
+ marginTop: number;
8
+ marginLeft: number;
9
+ width: number;
10
+ height: number;
11
+ }
12
+ export interface ContainerStyle {
13
+ marginTop: string;
14
+ marginLeft: string;
15
+ width: string;
16
+ height: string;
17
+ cursor: any;
18
+ }
19
+ export declare type ScreenOrientation = 'portrait' | 'landscape';
20
+ export declare enum CursorType {
21
+ ARROW = 0,
22
+ IBEAM = 1,
23
+ WAIT = 2,
24
+ CROSS = 3,
25
+ SIZENWSE = 4,
26
+ SIZENESW = 5,
27
+ SIZEWE = 6,
28
+ SIZENS = 7,
29
+ SIZEALL = 8,
30
+ NO = 9,
31
+ HAND = 10,
32
+ CUSTOM = 11,
33
+ DEFAULT = 1000
34
+ }
35
+ export interface SyncCursorStyle {
36
+ type: CursorType;
37
+ hotX: number;
38
+ hotY: number;
39
+ width: number;
40
+ height: number;
41
+ customBase64: string;
42
+ }
43
+ export declare const enum SCREEN_EVENT_TYPE {
44
+ ReSize = 0
45
+ }
46
+ export interface ScreenEvent extends LocalEvent<SCREEN_EVENT_TYPE> {
47
+ container: ContainerSize;
48
+ viewPort: ViewPort;
49
+ }
50
+ export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEvent> {
51
+ get appSize(): CloudLark.IAppResize;
52
+ set appSize(size: CloudLark.IAppResize);
53
+ private _appSize;
54
+ get viewPort(): ViewPort;
55
+ private _viewPort;
56
+ get viewPortStyle(): string;
57
+ get orientationIndexStyle(): {
58
+ width: string;
59
+ height: string;
60
+ top: string;
61
+ left: string;
62
+ transform: string;
63
+ transformOrigin: string;
64
+ backgroundColor: string;
65
+ } | {
66
+ width: string;
67
+ height: string;
68
+ transform: string;
69
+ transformOrigin: string;
70
+ backgroundColor: string;
71
+ top?: undefined;
72
+ left?: undefined;
73
+ };
74
+ get container(): ContainerSize;
75
+ private _container;
76
+ get containerStyle(): string;
77
+ get screenOrientation(): ScreenOrientation;
78
+ private _screenOrientation;
79
+ get scaleMode(): ScaleMode;
80
+ private _scaleMode;
81
+ get isFullScreen(): boolean;
82
+ private _isFullScreen;
83
+ get isLockMouse(): boolean;
84
+ private _isLockMouse;
85
+ get cursorStyle(): SyncCursorStyle;
86
+ private _cursorStyle;
87
+ get appMouseMode(): CloudLark.IAppMouseMode;
88
+ set appMouseMode(mode: CloudLark.IAppMouseMode);
89
+ private _appMouseMode;
90
+ get operateScale(): {
91
+ scaleX: number;
92
+ scaleY: number;
93
+ };
94
+ get initCursorMode(): boolean;
95
+ private _initCursorMode;
96
+ get isMobile(): boolean;
97
+ private _isMobile;
98
+ get isLocalRenderMouse(): boolean | null | undefined;
99
+ get isLockMosue(): boolean | null | undefined;
100
+ get rootElement(): HTMLElement;
101
+ private _rootElement;
102
+ private videoViewPort;
103
+ private mobileForceLandScape;
104
+ private bgColor;
105
+ private handelRootElementSize;
106
+ constructor(rootElement: HTMLElement, params: IAppliParams, handelRootElementSize?: boolean);
107
+ reset(params: IAppliParams): void;
108
+ resize(): void;
109
+ }
@@ -0,0 +1,11 @@
1
+ export declare class SDKAuth {
2
+ get isSuccess(): boolean;
3
+ private _isSuccess;
4
+ get error(): any;
5
+ private _error;
6
+ constructor();
7
+ auth(id: string): Promise<void>;
8
+ signature(key: string, secret: string, timestamp: string): string;
9
+ check(id: string): boolean;
10
+ save(id: string, expire: string): void;
11
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/dist.zip DELETED
Binary file