larksr_websdk 3.2.8 → 3.2.12

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.
@@ -67,6 +67,8 @@ export interface StartAppInfo {
67
67
  roomCode?: string;
68
68
  nickName?: string;
69
69
  nickname?: string;
70
+ appKey?: string;
71
+ groupId?: string;
70
72
  }
71
73
  export default class API {
72
74
  static CheckUTLockInfoPath: string;
@@ -96,6 +98,10 @@ export default class API {
96
98
  userType?: number;
97
99
  roomCode?: string;
98
100
  taskId?: string;
101
+ clientMac?: string;
102
+ groupId?: string;
103
+ regionId?: string;
104
+ targetServerIp?: string;
99
105
  appKey?: string;
100
106
  timestamp?: string;
101
107
  signature?: string;
@@ -188,6 +188,8 @@ export interface IAppliParams {
188
188
  enableRttIcon: boolean;
189
189
  enableSoundRequire: boolean;
190
190
  toastLevel: number;
191
+ appKey: string;
192
+ groupId: string;
191
193
  }
192
194
  export declare enum AppliType {
193
195
  DESKTOP = 1,
@@ -245,6 +247,8 @@ export declare class AppliParams implements IAppliParams {
245
247
  enableRttIcon: boolean;
246
248
  enableSoundRequire: boolean;
247
249
  toastLevel: number;
250
+ appKey: string;
251
+ groupId: string;
248
252
  static copyAndCreate(params?: IAppliParams): AppliParams;
249
253
  static setUpWithSDKConfig(params: IAppliParams, config: ILarkSRConfig): AppliParams;
250
254
  }
@@ -15,7 +15,7 @@ import FullScreen from './utils/full_screen';
15
15
  import LockPointer from './utils/lock_pointer';
16
16
  import ScaleMode from './utils/scale_mode';
17
17
  import Capabilities from './utils/capabilities';
18
- declare const enum PlayerModeType {
18
+ declare enum PlayerModeType {
19
19
  /**
20
20
  * 普通模式
21
21
  */
@@ -32,7 +32,7 @@ declare const enum PlayerModeType {
32
32
  /**
33
33
  * 当前用户的身份
34
34
  */
35
- declare const enum UserType {
35
+ declare enum UserType {
36
36
  /**
37
37
  * 观看者
38
38
  */
@@ -69,7 +69,11 @@ declare enum LarkSRClientEvent {
69
69
  /**
70
70
  * 获取到远端视频流 .
71
71
  */
72
- GOT_REMOTE_STREAM = "gotremotesteam",
72
+ GOT_REMOTE_STREAM = "gotremotestream",
73
+ /**
74
+ * 获取到远端音频流 .
75
+ */
76
+ GOT_REMOTE_AUDIO_STREAM = "gotremoteaudiostream",
73
77
  /**
74
78
  * 视频加载成功,等待播放 .
75
79
  */
@@ -160,6 +164,9 @@ interface LarkSREvent extends LocalEvent<LarkSRClientEvent> {
160
164
  code?: number;
161
165
  larkevent?: LarkEventType;
162
166
  }
167
+ declare type PublicPortMapping = {
168
+ [key: string]: string;
169
+ };
163
170
  /**
164
171
  * 构造 LarkSR 参数
165
172
  */
@@ -267,6 +274,19 @@ interface ILarkSRConfig {
267
274
  * 初始化鼠标模式, true 锁定,false 非锁定
268
275
  */
269
276
  initCursorMode?: boolean;
277
+ /**
278
+ * 渲染服务器外网端口映射
279
+ * 格式为 key=[渲染服务器IP:PORT] value=[外网IP:PORT]
280
+ * {
281
+ * "RENDER-A-IP:RENDER-A-PORT1": "PUBLIC-A-IP:PORT1",
282
+ * "RENDER-B-IP:RENDER-B-PORT1": "PUBLIC-A-IP:PORT2",
283
+ * "RENDER-C-IP:RENDER-C-PORT1": "PUBLIC-A-IP:PORT3",
284
+ * "RENDER-D-IP:RENDER-D-PORT1": "PUBLIC-B-IP:PORT1",
285
+ * "RENDER-E-IP:RENDER-E-PORT1": "PUBLIC-B-IP:PORT2",
286
+ * "RENDER-E-IP:RENDER-E-PORT2": "PUBLIC-C-IP:PORT1",
287
+ * }
288
+ */
289
+ publicPortMapping?: PublicPortMapping;
270
290
  }
271
291
  /**
272
292
  * 通过平行云托管平台创建客户端并启动应用
@@ -294,7 +314,13 @@ export declare function CreateLarkSRClientFromeAPI(config: ILarkSRConfig, params
294
314
  userType?: number;
295
315
  roomCode?: string;
296
316
  taskId?: string;
297
- nickname?: string;
317
+ clientMac?: string;
318
+ groupId?: string;
319
+ regionId?: string;
320
+ targetServerIp?: string;
321
+ appKey?: string;
322
+ timestamp?: string;
323
+ signature?: string;
298
324
  }): Promise<LarkSR>;
299
325
  /**
300
326
  * 通过从url参数中获取云端应用相关参数
@@ -344,6 +370,10 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
344
370
  */
345
371
  get screenState(): ScreenState;
346
372
  private _screenState;
373
+ /**
374
+ * 动态设置scalemode
375
+ */
376
+ set scaleMode(scaleMode: ScaleMode);
347
377
  /**
348
378
  * 当前的输入控制
349
379
  * @see Operation
@@ -368,6 +398,14 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
368
398
  * 视频显示组件
369
399
  */
370
400
  get videoComponent(): any;
401
+ /**
402
+ * 音频元素
403
+ */
404
+ get audioElement(): HTMLAudioElement;
405
+ /**
406
+ * 是否有单独的音频流
407
+ */
408
+ get isSeprateAudioTrack(): any;
371
409
  /**
372
410
  * 视频显示组件的父容器
373
411
  */
@@ -396,8 +434,7 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
396
434
  _isTaskOwner: boolean;
397
435
  /**
398
436
  * LarkSR 客户端。所有操作和事件通过该类传递
399
- * 注意,如果手动创建该类,要清楚参数的意义,一般只有调试等特殊情况才手动创建该类
400
- * @see CreateLarkSRClientFromeAPI, CreateLarkSRClientFromeUrl
437
+ * @see CreateLarkSRClientFromeAPI, @see CreateLarkSRClientFromeUrl @see CreateLarkSRClientFromePXYHost
401
438
  * @param config 本地配置,如果有 IAppliParams 相同的配置项,优先级最高
402
439
  * @param params [可选参数] 云端应用参数等,通过后台接口或者url参数获取。
403
440
  */
@@ -426,11 +463,18 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
426
463
  userType?: number;
427
464
  roomCode?: string;
428
465
  taskId?: string;
429
- nickname?: string;
466
+ clientMac?: string;
467
+ groupId?: string;
468
+ regionId?: string;
469
+ targetServerIp?: string;
430
470
  appKey?: string;
431
471
  timestamp?: string;
432
472
  signature?: string;
433
473
  }): Promise<void>;
474
+ /**
475
+ * 用户手动填昵称,需要在 start 或 connect 之前设置才能生效。
476
+ */
477
+ setNickname(nickname: string): void;
434
478
  /**
435
479
  * 手动重设进入应用参数
436
480
  * @param params
@@ -490,6 +534,7 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
490
534
  * 可以不使用该方法退出页面
491
535
  */
492
536
  quit(): void;
537
+ resetAppMouseLockState(): void;
493
538
  /**
494
539
  * 操作相关事件
495
540
  * 所有事件坐标相对于云端应用,不相对于网页
@@ -515,10 +560,12 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
515
560
  $emitError(message?: string, code?: number): void;
516
561
  $emitInfo(message?: string, code?: number): void;
517
562
  private createEvent;
563
+ private setupListener;
518
564
  private taskProcess;
519
565
  private startProcess;
520
566
  private onAppStateChange;
521
567
  private onGotRemoteStream;
568
+ private onGotRemoteAudioStream;
522
569
  private onCursorStyle;
523
570
  private onAppResize;
524
571
  private onAppMouseMode;
@@ -78,6 +78,7 @@ export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEven
78
78
  get screenOrientation(): ScreenOrientation;
79
79
  private _screenOrientation;
80
80
  get scaleMode(): ScaleMode;
81
+ set scaleMode(scaleMode: ScaleMode);
81
82
  private _scaleMode;
82
83
  get isFullScreen(): boolean;
83
84
  private _isFullScreen;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "larksr_websdk",
3
- "version": "3.2.8",
3
+ "version": "3.2.12",
4
4
  "description": "Larksr websdk. Easy to build a cloud render client for larksr system or ue4 pixelstreaming.docs: https://pingxingyun.github.io/webclient_sdk/",
5
5
  "keywords": [
6
6
  "pingxingyun",
package/types/api.d.ts CHANGED
@@ -67,6 +67,8 @@ export interface StartAppInfo {
67
67
  roomCode?: string;
68
68
  nickName?: string;
69
69
  nickname?: string;
70
+ appKey?: string;
71
+ groupId?: string;
70
72
  }
71
73
  export default class API {
72
74
  static CheckUTLockInfoPath: string;
@@ -96,6 +98,10 @@ export default class API {
96
98
  userType?: number;
97
99
  roomCode?: string;
98
100
  taskId?: string;
101
+ clientMac?: string;
102
+ groupId?: string;
103
+ regionId?: string;
104
+ targetServerIp?: string;
99
105
  appKey?: string;
100
106
  timestamp?: string;
101
107
  signature?: string;
@@ -188,6 +188,8 @@ export interface IAppliParams {
188
188
  enableRttIcon: boolean;
189
189
  enableSoundRequire: boolean;
190
190
  toastLevel: number;
191
+ appKey: string;
192
+ groupId: string;
191
193
  }
192
194
  export declare enum AppliType {
193
195
  DESKTOP = 1,
@@ -245,6 +247,8 @@ export declare class AppliParams implements IAppliParams {
245
247
  enableRttIcon: boolean;
246
248
  enableSoundRequire: boolean;
247
249
  toastLevel: number;
250
+ appKey: string;
251
+ groupId: string;
248
252
  static copyAndCreate(params?: IAppliParams): AppliParams;
249
253
  static setUpWithSDKConfig(params: IAppliParams, config: ILarkSRConfig): AppliParams;
250
254
  }
@@ -26,17 +26,18 @@ export declare enum APP_EVENT_TYPE {
26
26
  INFO = 3,
27
27
  APP_CLOSE = 4,
28
28
  REMOTE_STREAM = 5,
29
- SYNC_CURSORSTYLE = 6,
30
- APP_STATE_CHANGE = 7,
31
- NET_STATE = 8,
32
- LK_APP_RESIZE = 9,
33
- LK_APP_MOUSE_MODE = 10,
34
- LK_APP_PLAER_LIST = 11,
35
- LK_APP_REQUEST_TEXT = 12,
36
- LK_DATA_CHANNEL_RENDERSERVER_TEXT_MESSAGE = 13,
37
- LK_DATA_CHANNEL_RENDERSERVER_BINARY_MESSAGE = 14,
38
- LK_DATA_CHANNEL_RENDERSERVER_OPEN = 15,
39
- LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 16
29
+ REMOTE_AUDIO_STREAM = 6,
30
+ SYNC_CURSORSTYLE = 7,
31
+ APP_STATE_CHANGE = 8,
32
+ NET_STATE = 9,
33
+ LK_APP_RESIZE = 10,
34
+ LK_APP_MOUSE_MODE = 11,
35
+ LK_APP_PLAER_LIST = 12,
36
+ LK_APP_REQUEST_TEXT = 13,
37
+ LK_DATA_CHANNEL_RENDERSERVER_TEXT_MESSAGE = 14,
38
+ LK_DATA_CHANNEL_RENDERSERVER_BINARY_MESSAGE = 15,
39
+ LK_DATA_CHANNEL_RENDERSERVER_OPEN = 16,
40
+ LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 17
40
41
  }
41
42
  export interface AppEvent extends LocalEvent<APP_EVENT_TYPE> {
42
43
  data?: any;
@@ -93,6 +94,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
93
94
  private onLocalSdp;
94
95
  private onLoacalIce;
95
96
  private onRemoteStream;
97
+ private onAudioRemoteStream;
96
98
  private onRtcError;
97
99
  private onIceStateChange;
98
100
  retryPeerconnection(): void;
@@ -0,0 +1,24 @@
1
+ export default class IceCandidateParser {
2
+ sdpMLineIndex: number | null;
3
+ sdpMid: string | null;
4
+ usernameFragment: string | null;
5
+ header: string;
6
+ private props;
7
+ constructor(ice: RTCIceCandidateInit);
8
+ get foundation(): string;
9
+ set foundation(f: string);
10
+ get component(): string;
11
+ set component(f: string);
12
+ get protocol(): string;
13
+ set protocol(p: string);
14
+ get priority(): string;
15
+ set priority(p: string);
16
+ get ip(): string;
17
+ set ip(ip: string);
18
+ get port(): string;
19
+ set port(port: string);
20
+ get type(): string;
21
+ get candidate(): string;
22
+ genNewIceCandidateInit(): RTCIceCandidateInit;
23
+ genNewIceCandidate(): RTCIceCandidate;
24
+ }
@@ -9,22 +9,23 @@ export declare enum IceState {
9
9
  }
10
10
  export declare enum WEBRTC_EVENT_TYPE {
11
11
  GOT_REMOTE_STREAM = 0,
12
- ICE_STATE_CHANGE = 1,
13
- LK_APP_RESIZE = 2,
14
- LK_APP_MOUSE_MODE = 3,
15
- LK_APP_PLAER_LIST = 4,
16
- LK_APP_REQUEST_TEXT = 5,
17
- LK_DATA_CHANNEL_RENDERSERVER_TEXT_MESSAGE = 6,
18
- LK_DATA_CHANNEL_RENDERSERVER_BINARY_MESSAGE = 7,
19
- LK_DATA_CHANNEL_RENDERSERVER_OPEN = 8,
20
- LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 9,
21
- LK_RTC_EVENT_PEERCONNECTION_STATE = 10,
22
- NET_STATE = 11,
23
- SYNC_CURSORSTYLE = 12,
24
- BAD_NETWORK = 13,
25
- ERROR = 14,
26
- RTC_SDP = 15,
27
- RTC_ICECANDIDATE = 16
12
+ GOT_REMOTE_AUDIO_STREAM = 1,
13
+ ICE_STATE_CHANGE = 2,
14
+ LK_APP_RESIZE = 3,
15
+ LK_APP_MOUSE_MODE = 4,
16
+ LK_APP_PLAER_LIST = 5,
17
+ LK_APP_REQUEST_TEXT = 6,
18
+ LK_DATA_CHANNEL_RENDERSERVER_TEXT_MESSAGE = 7,
19
+ LK_DATA_CHANNEL_RENDERSERVER_BINARY_MESSAGE = 8,
20
+ LK_DATA_CHANNEL_RENDERSERVER_OPEN = 9,
21
+ LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 10,
22
+ LK_RTC_EVENT_PEERCONNECTION_STATE = 11,
23
+ NET_STATE = 12,
24
+ SYNC_CURSORSTYLE = 13,
25
+ BAD_NETWORK = 14,
26
+ ERROR = 15,
27
+ RTC_SDP = 16,
28
+ RTC_ICECANDIDATE = 17
28
29
  }
29
30
  export interface GoogleBitRate {
30
31
  start: number;
@@ -84,12 +85,14 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
84
85
  private lastPacktetsLost;
85
86
  private lastPacktetsReceived;
86
87
  private larksr;
88
+ private audioStream;
89
+ private videoStream;
87
90
  constructor(larksr: LarkSR, config: WebRTCConfig);
88
91
  create(): void;
89
92
  createOffer(): void;
90
93
  close(): void;
91
94
  onRemoteDescription(des: RTCSessionDescriptionInit): void;
92
- onReceiveCandidate(candateInit: RTCIceCandidateInit | null): void;
95
+ onReceiveCandidate(candateInit: RTCIceCandidateInit): void;
93
96
  startNetTest(): void;
94
97
  stopNetTest(): void;
95
98
  sendInput(input: Input.CloudLark.ClientInput): void;
@@ -105,7 +108,7 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
105
108
  private onCreateOfferSuccess;
106
109
  private onIceCandidate;
107
110
  private onIceStateChange;
108
- private gotRemoteStream;
111
+ private ontrack;
109
112
  private addIceCandidate;
110
113
  private iceStateChange;
111
114
  private $emit;
package/types/larksr.d.ts CHANGED
@@ -15,7 +15,7 @@ import FullScreen from './utils/full_screen';
15
15
  import LockPointer from './utils/lock_pointer';
16
16
  import ScaleMode from './utils/scale_mode';
17
17
  import Capabilities from './utils/capabilities';
18
- declare const enum PlayerModeType {
18
+ declare enum PlayerModeType {
19
19
  /**
20
20
  * 普通模式
21
21
  */
@@ -32,7 +32,7 @@ declare const enum PlayerModeType {
32
32
  /**
33
33
  * 当前用户的身份
34
34
  */
35
- declare const enum UserType {
35
+ declare enum UserType {
36
36
  /**
37
37
  * 观看者
38
38
  */
@@ -69,7 +69,11 @@ declare enum LarkSRClientEvent {
69
69
  /**
70
70
  * 获取到远端视频流 .
71
71
  */
72
- GOT_REMOTE_STREAM = "gotremotesteam",
72
+ GOT_REMOTE_STREAM = "gotremotestream",
73
+ /**
74
+ * 获取到远端音频流 .
75
+ */
76
+ GOT_REMOTE_AUDIO_STREAM = "gotremoteaudiostream",
73
77
  /**
74
78
  * 视频加载成功,等待播放 .
75
79
  */
@@ -160,6 +164,9 @@ interface LarkSREvent extends LocalEvent<LarkSRClientEvent> {
160
164
  code?: number;
161
165
  larkevent?: LarkEventType;
162
166
  }
167
+ declare type PublicPortMapping = {
168
+ [key: string]: string;
169
+ };
163
170
  /**
164
171
  * 构造 LarkSR 参数
165
172
  */
@@ -267,6 +274,19 @@ interface ILarkSRConfig {
267
274
  * 初始化鼠标模式, true 锁定,false 非锁定
268
275
  */
269
276
  initCursorMode?: boolean;
277
+ /**
278
+ * 渲染服务器外网端口映射
279
+ * 格式为 key=[渲染服务器IP:PORT] value=[外网IP:PORT]
280
+ * {
281
+ * "RENDER-A-IP:RENDER-A-PORT1": "PUBLIC-A-IP:PORT1",
282
+ * "RENDER-B-IP:RENDER-B-PORT1": "PUBLIC-A-IP:PORT2",
283
+ * "RENDER-C-IP:RENDER-C-PORT1": "PUBLIC-A-IP:PORT3",
284
+ * "RENDER-D-IP:RENDER-D-PORT1": "PUBLIC-B-IP:PORT1",
285
+ * "RENDER-E-IP:RENDER-E-PORT1": "PUBLIC-B-IP:PORT2",
286
+ * "RENDER-E-IP:RENDER-E-PORT2": "PUBLIC-C-IP:PORT1",
287
+ * }
288
+ */
289
+ publicPortMapping?: PublicPortMapping;
270
290
  }
271
291
  /**
272
292
  * 通过平行云托管平台创建客户端并启动应用
@@ -294,7 +314,13 @@ export declare function CreateLarkSRClientFromeAPI(config: ILarkSRConfig, params
294
314
  userType?: number;
295
315
  roomCode?: string;
296
316
  taskId?: string;
297
- nickname?: string;
317
+ clientMac?: string;
318
+ groupId?: string;
319
+ regionId?: string;
320
+ targetServerIp?: string;
321
+ appKey?: string;
322
+ timestamp?: string;
323
+ signature?: string;
298
324
  }): Promise<LarkSR>;
299
325
  /**
300
326
  * 通过从url参数中获取云端应用相关参数
@@ -344,6 +370,10 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
344
370
  */
345
371
  get screenState(): ScreenState;
346
372
  private _screenState;
373
+ /**
374
+ * 动态设置scalemode
375
+ */
376
+ set scaleMode(scaleMode: ScaleMode);
347
377
  /**
348
378
  * 当前的输入控制
349
379
  * @see Operation
@@ -368,6 +398,14 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
368
398
  * 视频显示组件
369
399
  */
370
400
  get videoComponent(): any;
401
+ /**
402
+ * 音频元素
403
+ */
404
+ get audioElement(): HTMLAudioElement;
405
+ /**
406
+ * 是否有单独的音频流
407
+ */
408
+ get isSeprateAudioTrack(): any;
371
409
  /**
372
410
  * 视频显示组件的父容器
373
411
  */
@@ -396,8 +434,7 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
396
434
  _isTaskOwner: boolean;
397
435
  /**
398
436
  * LarkSR 客户端。所有操作和事件通过该类传递
399
- * 注意,如果手动创建该类,要清楚参数的意义,一般只有调试等特殊情况才手动创建该类
400
- * @see CreateLarkSRClientFromeAPI, CreateLarkSRClientFromeUrl
437
+ * @see CreateLarkSRClientFromeAPI, @see CreateLarkSRClientFromeUrl @see CreateLarkSRClientFromePXYHost
401
438
  * @param config 本地配置,如果有 IAppliParams 相同的配置项,优先级最高
402
439
  * @param params [可选参数] 云端应用参数等,通过后台接口或者url参数获取。
403
440
  */
@@ -426,11 +463,18 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
426
463
  userType?: number;
427
464
  roomCode?: string;
428
465
  taskId?: string;
429
- nickname?: string;
466
+ clientMac?: string;
467
+ groupId?: string;
468
+ regionId?: string;
469
+ targetServerIp?: string;
430
470
  appKey?: string;
431
471
  timestamp?: string;
432
472
  signature?: string;
433
473
  }): Promise<void>;
474
+ /**
475
+ * 用户手动填昵称,需要在 start 或 connect 之前设置才能生效。
476
+ */
477
+ setNickname(nickname: string): void;
434
478
  /**
435
479
  * 手动重设进入应用参数
436
480
  * @param params
@@ -490,6 +534,7 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
490
534
  * 可以不使用该方法退出页面
491
535
  */
492
536
  quit(): void;
537
+ resetAppMouseLockState(): void;
493
538
  /**
494
539
  * 操作相关事件
495
540
  * 所有事件坐标相对于云端应用,不相对于网页
@@ -515,10 +560,12 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
515
560
  $emitError(message?: string, code?: number): void;
516
561
  $emitInfo(message?: string, code?: number): void;
517
562
  private createEvent;
563
+ private setupListener;
518
564
  private taskProcess;
519
565
  private startProcess;
520
566
  private onAppStateChange;
521
567
  private onGotRemoteStream;
568
+ private onGotRemoteAudioStream;
522
569
  private onCursorStyle;
523
570
  private onAppResize;
524
571
  private onAppMouseMode;
@@ -1,14 +1,17 @@
1
1
  import { CloudLark } from '../protobuf/cloudlark';
2
2
  import { LocalEvent, EventBase } from '../event/event_base';
3
+ import { Point } from '../common/interface';
3
4
  import { LarkSR } from '../larksr';
4
5
  export declare const enum OPREATION_EVENT_TYPE {
5
6
  Input = 0,
6
7
  NoOperationTimeout = 1,
7
- ClipboardText = 2
8
+ ClipboardText = 2,
9
+ CursorMove = 3
8
10
  }
9
11
  export interface OperationEvent extends LocalEvent<OPREATION_EVENT_TYPE> {
10
12
  input?: CloudLark.ClientInput;
11
13
  data?: any;
14
+ cursorPoint?: Point;
12
15
  }
13
16
  export default class Operation extends EventBase<OPREATION_EVENT_TYPE, OperationEvent> {
14
17
  private gestureHandler;
@@ -39,6 +42,7 @@ export default class Operation extends EventBase<OPREATION_EVENT_TYPE, Operation
39
42
  setTouchEnable(enable: boolean): void;
40
43
  resetLocalRendreMousePosition(): void;
41
44
  setAppMouseMode(mode: CloudLark.IAppMouseMode): void;
45
+ resetAppMouseLockState(): void;
42
46
  startListening(): void;
43
47
  stopListenling(): void;
44
48
  private startOperationCheck;
@@ -61,4 +65,5 @@ export default class Operation extends EventBase<OPREATION_EVENT_TYPE, Operation
61
65
  $emitTouchUp(id: number, x: number, y: number): void;
62
66
  $emitInputEvent(input: CloudLark.IClientInput): void;
63
67
  $emitNoOperationTimeoutEvent(): void;
68
+ $emitCursorMove(p: Point): void;
64
69
  }
@@ -78,6 +78,7 @@ export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEven
78
78
  get screenOrientation(): ScreenOrientation;
79
79
  private _screenOrientation;
80
80
  get scaleMode(): ScaleMode;
81
+ set scaleMode(scaleMode: ScaleMode);
81
82
  private _scaleMode;
82
83
  get isFullScreen(): boolean;
83
84
  private _isFullScreen;