larksr_websdk 3.2.320 → 3.2.321

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.
@@ -1,5 +1,5 @@
1
1
  import 'core-js/stable/symbol';
2
- import { LarkSR, LarkEventType, LarkSRClientEvent, AppliParams, LoadAppliParamsFromUrl, AppliParamsUtils, LoadAppliParamsStartAppInfo, EventBase, API, Operation, Capabilities, ScaleMode, CloudLark, FullScreen, LockPointer, ILarkSRConfig, PlayerModeType, UserType, LarkSREvent } from "./larksr";
2
+ import { LarkSR, LarkEventType, LarkSRClientEvent, AppliParams, LoadAppliParamsFromUrl, AppliParamsUtils, LoadAppliParamsStartAppInfo, EventBase, API, Operation, Capabilities, ScaleMode, CloudLark, FullScreen, LockPointer, ILarkSRConfig, PlayerModeType, UserType, LarkSREvent, GESTURE_TYPE } from "./larksr";
3
3
  declare const _default: {
4
4
  LarkSR: typeof LarkSR;
5
5
  API: typeof API;
@@ -16,6 +16,7 @@ declare const _default: {
16
16
  Operation: typeof Operation;
17
17
  LarkSRClientEvent: typeof LarkSRClientEvent;
18
18
  LarkEventType: typeof LarkEventType;
19
+ GESTURE_TYPE: typeof GESTURE_TYPE;
19
20
  KEYMAP: import("./operation/keymap").VritualKeyMapOptions;
20
21
  };
21
22
  export default _default;
@@ -89,7 +89,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
89
89
  startMonitorSteam(): void;
90
90
  restart(): void;
91
91
  restartApp(): void;
92
- rtcOffer(): void;
92
+ rtcOffer(): Promise<void>;
93
93
  setAnswer(sdp: string): void;
94
94
  setIce(sdpMlineindex: number, sdpmid: string, candidate: string): void;
95
95
  sendInput(input: Msg.CloudLark.ClientInput): void;
@@ -113,6 +113,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
113
113
  private onRemoteStream;
114
114
  private onAudioRemoteStream;
115
115
  private onRtcError;
116
+ private onRtcInfo;
116
117
  private onIceStateChange;
117
118
  retryPeerconnection(): void;
118
119
  setAudioEnable(enable: boolean): void | undefined;
@@ -29,7 +29,8 @@ export declare enum WEBRTC_EVENT_TYPE {
29
29
  AI_VOICE_STATUS = 18,
30
30
  AI_VOICE_ASR_RESULT = 19,
31
31
  AI_VOICE_DM_RESULT = 20,
32
- AI_VOICE_ERROR = 21
32
+ AI_VOICE_ERROR = 21,
33
+ INFO = 22
33
34
  }
34
35
  export interface GoogleBitRate {
35
36
  start: number;
@@ -105,7 +106,7 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
105
106
  private localShareTrackBinding;
106
107
  private sdpCreateSuccess;
107
108
  constructor(larksr: LarkSR, config: WebRTCConfig);
108
- create(): void;
109
+ create(streams?: MediaStream | undefined | null): Promise<void>;
109
110
  createOffer(): void;
110
111
  close(): void;
111
112
  setAudioEnable(enable: boolean): void;
@@ -16,6 +16,7 @@ import LockPointer from './utils/lock_pointer';
16
16
  import ScaleMode from './utils/scale_mode';
17
17
  import Capabilities from './utils/capabilities';
18
18
  import Recorder from './lark/recoder';
19
+ import { GESTURE_TYPE } from './operation/gesture';
19
20
  declare enum PlayerModeType {
20
21
  /**
21
22
  * 普通模式
@@ -333,6 +334,19 @@ interface ILarkSRConfig {
333
334
  * 需要注意默认打开的是系统中默认的视频设备。
334
335
  */
335
336
  videoInputAutoStart?: boolean;
337
+ /**
338
+ * mouseZoomDirection
339
+ * 用于移动端捏合缩放操作与应用鼠标缩放的对应关系
340
+ * 1:鼠标滚轮向上为放大,
341
+ * 0:鼠标滚轮向下为放大(default)
342
+ */
343
+ mouseZoomDirection?: number;
344
+ /**
345
+ * 触摸指令模式,对应后台应用管理->应用编辑->移动端高级设置->触摸指令模式 优先级高于后台配置
346
+ * 触摸指令,移动端的触摸指令对应为云端的触屏还是鼠标
347
+ * 'touchScreen' | 'mouse'
348
+ */
349
+ touchOperateMode?: 'touchScreen' | 'mouse';
336
350
  }
337
351
  declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
338
352
  /**
@@ -542,6 +556,10 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
542
556
  * 主动关闭连接
543
557
  */
544
558
  close(): void;
559
+ /**
560
+ * 从DOM种删除渲染组件,注意删除渲染组件之后将无法再次进入应用,所有状态将失效,不可恢复,只能重新new LarkSR
561
+ */
562
+ destroy(): void;
545
563
  /**
546
564
  * 设置是否强制横屏显示内容.
547
565
  * handelRootElementSize 必须设置为 true 才有作用。
@@ -607,8 +625,13 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
607
625
  resetAppMouseLockState(): void;
608
626
  /**
609
627
  * 采集一帧图像
628
+ * @params data: any 抛出采集事件时抛出的附加data,比如采集的时间戳
629
+ * @return { data: any, base64: base64string } 返回传入的 data 和采集的 base64 字符串
610
630
  */
611
- captrueFrame(data: any): void;
631
+ captrueFrame(data: any): {
632
+ data: any;
633
+ base64: any;
634
+ };
612
635
  /**
613
636
  * 操作相关事件
614
637
  * 所有事件坐标相对于云端应用,不相对于网页
@@ -887,4 +910,4 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
887
910
  private onOperationTimeout;
888
911
  private onOperationInput;
889
912
  }
890
- export { LarkSR, ILarkSRConfig, PlayerModeType, UserType, LarkSREvent, LarkEventType, LarkSRClientEvent, AppliParams, AppliParamsUtils, LoadAppliParamsFromUrl, LoadAppliParamsStartAppInfo, EventBase, API, Operation, Capabilities, ScaleMode, VirtualKey, KEYMAP, CloudLark, FullScreen, LockPointer, Recorder, };
913
+ export { LarkSR, ILarkSRConfig, PlayerModeType, UserType, LarkSREvent, LarkEventType, LarkSRClientEvent, AppliParams, AppliParamsUtils, LoadAppliParamsFromUrl, LoadAppliParamsStartAppInfo, EventBase, API, Operation, Capabilities, ScaleMode, VirtualKey, KEYMAP, CloudLark, FullScreen, LockPointer, Recorder, GESTURE_TYPE, };
@@ -9,7 +9,7 @@ export interface GestureEvent extends LocalEvent<GESTRUE_EVENT_TYPE> {
9
9
  motion: Vector;
10
10
  distance: number;
11
11
  }
12
- export declare const enum GESTURE_TYPE {
12
+ export declare enum GESTURE_TYPE {
13
13
  SINGLE_FINGER_TOUCH_START = 1,
14
14
  SINGLE_FINGER_TAP = 2,
15
15
  SINGLE_FINGER_TAP_DOWN = 3,
@@ -43,6 +43,8 @@ export default class Gesture extends EventBase<GESTRUE_EVENT_TYPE, GestureEvent>
43
43
  private touchStartPoints;
44
44
  private touchChangedPoins;
45
45
  private tapStart;
46
+ setTapLimitRadius(radius: number): void;
47
+ setTapLimitTimeout(timeout: number): void;
46
48
  private tapLimit;
47
49
  private lastTap;
48
50
  private tapPressTimeout;
@@ -1,4 +1,5 @@
1
1
  import Operation from './operation';
2
+ import { GESTURE_TYPE } from './gesture';
2
3
  import HandlerBase from './handler_base';
3
4
  export default class GestureHandler extends HandlerBase {
4
5
  private gesture;
@@ -7,6 +8,42 @@ export default class GestureHandler extends HandlerBase {
7
8
  set mouseZoomDirection(direction: number);
8
9
  get mouseZoomDirection(): number;
9
10
  private _mouseZoomDirection;
11
+ /**
12
+ *
13
+ */
14
+ set tapLimitRadius(radius: number);
15
+ /**
16
+ *
17
+ */
18
+ set tapLimitTimeout(timeout: number);
19
+ /**
20
+ *
21
+ */
22
+ set relativeMouseMoveSpeed(speed: number);
23
+ get relativeMouseMoveSpeed(): number;
24
+ private _relativeMouseMoveSpeed;
25
+ /**
26
+ *
27
+ */
28
+ set gestureCallback(callback: null | ((event: {
29
+ type: GESTURE_TYPE;
30
+ x: number;
31
+ y: number;
32
+ rx: number;
33
+ ry: number;
34
+ edge: boolean;
35
+ rawEvent: any;
36
+ }) => void));
37
+ get gestureCallback(): null | ((event: {
38
+ type: GESTURE_TYPE;
39
+ x: number;
40
+ y: number;
41
+ rx: number;
42
+ ry: number;
43
+ edge: boolean;
44
+ rawEvent: any;
45
+ }) => void);
46
+ private _gestureCallback;
10
47
  constructor(rootElement: HTMLElement, op: Operation);
11
48
  startListening(): void;
12
49
  stopListening(): void;
@@ -4,6 +4,9 @@ export default class KeyboardHandler extends HandlerBase {
4
4
  private needSyncKeyState;
5
5
  private fistSyncKeyState;
6
6
  private pressedKeys;
7
+ set preventKeys(keys: string[]);
8
+ get preventKeys(): string[];
9
+ private _preventKeys;
7
10
  constructor(op: Operation);
8
11
  startListening(): void;
9
12
  stopListening(): void;
@@ -1,6 +1,11 @@
1
1
  import { CloudLark } from '../protobuf/cloudlark';
2
2
  import { LocalEvent, EventBase } from '../event/event_base';
3
3
  import { Point } from '../common/interface';
4
+ import GestureHandler from './gesture_handler';
5
+ import KeyboardHandler from './keyboard_handler';
6
+ import MouseHandler from './mouse_handler';
7
+ import GamepadHandler from './gamepad_handler';
8
+ import TouchHandler from './touch_handler';
4
9
  import { LarkSR } from '../larksr';
5
10
  export declare const enum OPREATION_EVENT_TYPE {
6
11
  Input = 0,
@@ -14,11 +19,31 @@ export interface OperationEvent extends LocalEvent<OPREATION_EVENT_TYPE> {
14
19
  cursorPoint?: Point;
15
20
  }
16
21
  export default class Operation extends EventBase<OPREATION_EVENT_TYPE, OperationEvent> {
17
- private gestureHandler;
18
- private keyboardHandler;
19
- private mouseHandler;
20
- private gamepadHandler;
21
- private touchHandler;
22
+ /**
23
+ * 移动端手势处理
24
+ */
25
+ get gestureHandler(): GestureHandler;
26
+ private _gestureHandler;
27
+ /**
28
+ * 键盘处理
29
+ */
30
+ get keyboardHandler(): KeyboardHandler;
31
+ private _keyboardHandler;
32
+ /**
33
+ * 鼠标处理
34
+ */
35
+ get mouseHandler(): MouseHandler;
36
+ private _mouseHandler;
37
+ /**
38
+ * 游戏手柄处理
39
+ */
40
+ get gamepadHandler(): GamepadHandler;
41
+ private _gamepadHandler;
42
+ /**
43
+ * 触摸屏输入处理
44
+ */
45
+ get touchHandler(): TouchHandler;
46
+ private _touchHandler;
22
47
  private _startListen;
23
48
  set enableParse(enable: boolean);
24
49
  get enableParse(): boolean;
@@ -48,5 +48,7 @@ declare class Capabilities {
48
48
  * </ul>
49
49
  */
50
50
  static get os(): string;
51
+ static $isIOSSafari: boolean;
52
+ static get isIOSSafari(): boolean;
51
53
  }
52
54
  export default Capabilities;
@@ -0,0 +1,4 @@
1
+ declare module "ios-inner-height" {
2
+ function innerHeight(): number;
3
+ export = innerHeight;
4
+ }
@@ -14,11 +14,6 @@ export default class Unit {
14
14
  /**
15
15
  * 浏览器窗口大小相关
16
16
  */
17
- /**
18
- * 获取浏览器窗口大小
19
- * @returns { width: 窗口宽, height: 窗口高 }
20
- */
21
- static viewport(): ViewPort;
22
17
  static getElementViewport(element: HTMLElement, baseElementScale?: number): ViewPort;
23
18
  /**
24
19
  * 获取某元素距离文档的距离
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "larksr_websdk",
3
- "version": "3.2.320",
3
+ "version": "3.2.321",
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",
@@ -32,6 +32,7 @@
32
32
  "bowser": "^2.11.0",
33
33
  "core-js": "^3.18.1",
34
34
  "crypto-js": "^4.1.1",
35
+ "ios-inner-height": "^1.1.1",
35
36
  "protobufjs": "^6.11.2",
36
37
  "webrtc-adapter": "^8.1.0",
37
38
  "weixin-js-sdk": "^1.6.0"
package/types/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import 'core-js/stable/symbol';
2
- import { LarkSR, LarkEventType, LarkSRClientEvent, AppliParams, LoadAppliParamsFromUrl, AppliParamsUtils, LoadAppliParamsStartAppInfo, EventBase, API, Operation, Capabilities, ScaleMode, CloudLark, FullScreen, LockPointer, ILarkSRConfig, PlayerModeType, UserType, LarkSREvent } from "./larksr";
2
+ import { LarkSR, LarkEventType, LarkSRClientEvent, AppliParams, LoadAppliParamsFromUrl, AppliParamsUtils, LoadAppliParamsStartAppInfo, EventBase, API, Operation, Capabilities, ScaleMode, CloudLark, FullScreen, LockPointer, ILarkSRConfig, PlayerModeType, UserType, LarkSREvent, GESTURE_TYPE } from "./larksr";
3
3
  declare const _default: {
4
4
  LarkSR: typeof LarkSR;
5
5
  API: typeof API;
@@ -16,6 +16,7 @@ declare const _default: {
16
16
  Operation: typeof Operation;
17
17
  LarkSRClientEvent: typeof LarkSRClientEvent;
18
18
  LarkEventType: typeof LarkEventType;
19
+ GESTURE_TYPE: typeof GESTURE_TYPE;
19
20
  KEYMAP: import("./operation/keymap").VritualKeyMapOptions;
20
21
  };
21
22
  export default _default;
@@ -89,7 +89,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
89
89
  startMonitorSteam(): void;
90
90
  restart(): void;
91
91
  restartApp(): void;
92
- rtcOffer(): void;
92
+ rtcOffer(): Promise<void>;
93
93
  setAnswer(sdp: string): void;
94
94
  setIce(sdpMlineindex: number, sdpmid: string, candidate: string): void;
95
95
  sendInput(input: Msg.CloudLark.ClientInput): void;
@@ -113,6 +113,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
113
113
  private onRemoteStream;
114
114
  private onAudioRemoteStream;
115
115
  private onRtcError;
116
+ private onRtcInfo;
116
117
  private onIceStateChange;
117
118
  retryPeerconnection(): void;
118
119
  setAudioEnable(enable: boolean): void | undefined;
@@ -29,7 +29,8 @@ export declare enum WEBRTC_EVENT_TYPE {
29
29
  AI_VOICE_STATUS = 18,
30
30
  AI_VOICE_ASR_RESULT = 19,
31
31
  AI_VOICE_DM_RESULT = 20,
32
- AI_VOICE_ERROR = 21
32
+ AI_VOICE_ERROR = 21,
33
+ INFO = 22
33
34
  }
34
35
  export interface GoogleBitRate {
35
36
  start: number;
@@ -105,7 +106,7 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
105
106
  private localShareTrackBinding;
106
107
  private sdpCreateSuccess;
107
108
  constructor(larksr: LarkSR, config: WebRTCConfig);
108
- create(): void;
109
+ create(streams?: MediaStream | undefined | null): Promise<void>;
109
110
  createOffer(): void;
110
111
  close(): void;
111
112
  setAudioEnable(enable: boolean): void;
package/types/larksr.d.ts CHANGED
@@ -16,6 +16,7 @@ import LockPointer from './utils/lock_pointer';
16
16
  import ScaleMode from './utils/scale_mode';
17
17
  import Capabilities from './utils/capabilities';
18
18
  import Recorder from './lark/recoder';
19
+ import { GESTURE_TYPE } from './operation/gesture';
19
20
  declare enum PlayerModeType {
20
21
  /**
21
22
  * 普通模式
@@ -333,6 +334,19 @@ interface ILarkSRConfig {
333
334
  * 需要注意默认打开的是系统中默认的视频设备。
334
335
  */
335
336
  videoInputAutoStart?: boolean;
337
+ /**
338
+ * mouseZoomDirection
339
+ * 用于移动端捏合缩放操作与应用鼠标缩放的对应关系
340
+ * 1:鼠标滚轮向上为放大,
341
+ * 0:鼠标滚轮向下为放大(default)
342
+ */
343
+ mouseZoomDirection?: number;
344
+ /**
345
+ * 触摸指令模式,对应后台应用管理->应用编辑->移动端高级设置->触摸指令模式 优先级高于后台配置
346
+ * 触摸指令,移动端的触摸指令对应为云端的触屏还是鼠标
347
+ * 'touchScreen' | 'mouse'
348
+ */
349
+ touchOperateMode?: 'touchScreen' | 'mouse';
336
350
  }
337
351
  declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
338
352
  /**
@@ -542,6 +556,10 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
542
556
  * 主动关闭连接
543
557
  */
544
558
  close(): void;
559
+ /**
560
+ * 从DOM种删除渲染组件,注意删除渲染组件之后将无法再次进入应用,所有状态将失效,不可恢复,只能重新new LarkSR
561
+ */
562
+ destroy(): void;
545
563
  /**
546
564
  * 设置是否强制横屏显示内容.
547
565
  * handelRootElementSize 必须设置为 true 才有作用。
@@ -607,8 +625,13 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
607
625
  resetAppMouseLockState(): void;
608
626
  /**
609
627
  * 采集一帧图像
628
+ * @params data: any 抛出采集事件时抛出的附加data,比如采集的时间戳
629
+ * @return { data: any, base64: base64string } 返回传入的 data 和采集的 base64 字符串
610
630
  */
611
- captrueFrame(data: any): void;
631
+ captrueFrame(data: any): {
632
+ data: any;
633
+ base64: any;
634
+ };
612
635
  /**
613
636
  * 操作相关事件
614
637
  * 所有事件坐标相对于云端应用,不相对于网页
@@ -887,4 +910,4 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
887
910
  private onOperationTimeout;
888
911
  private onOperationInput;
889
912
  }
890
- export { LarkSR, ILarkSRConfig, PlayerModeType, UserType, LarkSREvent, LarkEventType, LarkSRClientEvent, AppliParams, AppliParamsUtils, LoadAppliParamsFromUrl, LoadAppliParamsStartAppInfo, EventBase, API, Operation, Capabilities, ScaleMode, VirtualKey, KEYMAP, CloudLark, FullScreen, LockPointer, Recorder, };
913
+ export { LarkSR, ILarkSRConfig, PlayerModeType, UserType, LarkSREvent, LarkEventType, LarkSRClientEvent, AppliParams, AppliParamsUtils, LoadAppliParamsFromUrl, LoadAppliParamsStartAppInfo, EventBase, API, Operation, Capabilities, ScaleMode, VirtualKey, KEYMAP, CloudLark, FullScreen, LockPointer, Recorder, GESTURE_TYPE, };
@@ -9,7 +9,7 @@ export interface GestureEvent extends LocalEvent<GESTRUE_EVENT_TYPE> {
9
9
  motion: Vector;
10
10
  distance: number;
11
11
  }
12
- export declare const enum GESTURE_TYPE {
12
+ export declare enum GESTURE_TYPE {
13
13
  SINGLE_FINGER_TOUCH_START = 1,
14
14
  SINGLE_FINGER_TAP = 2,
15
15
  SINGLE_FINGER_TAP_DOWN = 3,
@@ -43,6 +43,8 @@ export default class Gesture extends EventBase<GESTRUE_EVENT_TYPE, GestureEvent>
43
43
  private touchStartPoints;
44
44
  private touchChangedPoins;
45
45
  private tapStart;
46
+ setTapLimitRadius(radius: number): void;
47
+ setTapLimitTimeout(timeout: number): void;
46
48
  private tapLimit;
47
49
  private lastTap;
48
50
  private tapPressTimeout;
@@ -1,4 +1,5 @@
1
1
  import Operation from './operation';
2
+ import { GESTURE_TYPE } from './gesture';
2
3
  import HandlerBase from './handler_base';
3
4
  export default class GestureHandler extends HandlerBase {
4
5
  private gesture;
@@ -7,6 +8,42 @@ export default class GestureHandler extends HandlerBase {
7
8
  set mouseZoomDirection(direction: number);
8
9
  get mouseZoomDirection(): number;
9
10
  private _mouseZoomDirection;
11
+ /**
12
+ *
13
+ */
14
+ set tapLimitRadius(radius: number);
15
+ /**
16
+ *
17
+ */
18
+ set tapLimitTimeout(timeout: number);
19
+ /**
20
+ *
21
+ */
22
+ set relativeMouseMoveSpeed(speed: number);
23
+ get relativeMouseMoveSpeed(): number;
24
+ private _relativeMouseMoveSpeed;
25
+ /**
26
+ *
27
+ */
28
+ set gestureCallback(callback: null | ((event: {
29
+ type: GESTURE_TYPE;
30
+ x: number;
31
+ y: number;
32
+ rx: number;
33
+ ry: number;
34
+ edge: boolean;
35
+ rawEvent: any;
36
+ }) => void));
37
+ get gestureCallback(): null | ((event: {
38
+ type: GESTURE_TYPE;
39
+ x: number;
40
+ y: number;
41
+ rx: number;
42
+ ry: number;
43
+ edge: boolean;
44
+ rawEvent: any;
45
+ }) => void);
46
+ private _gestureCallback;
10
47
  constructor(rootElement: HTMLElement, op: Operation);
11
48
  startListening(): void;
12
49
  stopListening(): void;
@@ -4,6 +4,9 @@ export default class KeyboardHandler extends HandlerBase {
4
4
  private needSyncKeyState;
5
5
  private fistSyncKeyState;
6
6
  private pressedKeys;
7
+ set preventKeys(keys: string[]);
8
+ get preventKeys(): string[];
9
+ private _preventKeys;
7
10
  constructor(op: Operation);
8
11
  startListening(): void;
9
12
  stopListening(): void;
@@ -1,6 +1,11 @@
1
1
  import { CloudLark } from '../protobuf/cloudlark';
2
2
  import { LocalEvent, EventBase } from '../event/event_base';
3
3
  import { Point } from '../common/interface';
4
+ import GestureHandler from './gesture_handler';
5
+ import KeyboardHandler from './keyboard_handler';
6
+ import MouseHandler from './mouse_handler';
7
+ import GamepadHandler from './gamepad_handler';
8
+ import TouchHandler from './touch_handler';
4
9
  import { LarkSR } from '../larksr';
5
10
  export declare const enum OPREATION_EVENT_TYPE {
6
11
  Input = 0,
@@ -14,11 +19,31 @@ export interface OperationEvent extends LocalEvent<OPREATION_EVENT_TYPE> {
14
19
  cursorPoint?: Point;
15
20
  }
16
21
  export default class Operation extends EventBase<OPREATION_EVENT_TYPE, OperationEvent> {
17
- private gestureHandler;
18
- private keyboardHandler;
19
- private mouseHandler;
20
- private gamepadHandler;
21
- private touchHandler;
22
+ /**
23
+ * 移动端手势处理
24
+ */
25
+ get gestureHandler(): GestureHandler;
26
+ private _gestureHandler;
27
+ /**
28
+ * 键盘处理
29
+ */
30
+ get keyboardHandler(): KeyboardHandler;
31
+ private _keyboardHandler;
32
+ /**
33
+ * 鼠标处理
34
+ */
35
+ get mouseHandler(): MouseHandler;
36
+ private _mouseHandler;
37
+ /**
38
+ * 游戏手柄处理
39
+ */
40
+ get gamepadHandler(): GamepadHandler;
41
+ private _gamepadHandler;
42
+ /**
43
+ * 触摸屏输入处理
44
+ */
45
+ get touchHandler(): TouchHandler;
46
+ private _touchHandler;
22
47
  private _startListen;
23
48
  set enableParse(enable: boolean);
24
49
  get enableParse(): boolean;
@@ -48,5 +48,7 @@ declare class Capabilities {
48
48
  * </ul>
49
49
  */
50
50
  static get os(): string;
51
+ static $isIOSSafari: boolean;
52
+ static get isIOSSafari(): boolean;
51
53
  }
52
54
  export default Capabilities;
@@ -0,0 +1,4 @@
1
+ declare module "ios-inner-height" {
2
+ function innerHeight(): number;
3
+ export = innerHeight;
4
+ }
@@ -14,11 +14,6 @@ export default class Unit {
14
14
  /**
15
15
  * 浏览器窗口大小相关
16
16
  */
17
- /**
18
- * 获取浏览器窗口大小
19
- * @returns { width: 窗口宽, height: 窗口高 }
20
- */
21
- static viewport(): ViewPort;
22
17
  static getElementViewport(element: HTMLElement, baseElementScale?: number): ViewPort;
23
18
  /**
24
19
  * 获取某元素距离文档的距离