larksr_websdk 3.2.33 → 3.2.36

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.
@@ -76,6 +76,7 @@ export default class API {
76
76
  static ClientLogErrorPath: string;
77
77
  static GetStartInfoPath: string;
78
78
  private static PocHostApplGetUrl;
79
+ private static TaskInfoClientStartedPath;
79
80
  static HostAppliGetUrl(params: {
80
81
  appliId: string;
81
82
  playerMode?: number;
@@ -111,5 +112,6 @@ export default class API {
111
112
  static GetTask(config: ILarkSRConfig, taskid: string): Promise<GetTaskResult>;
112
113
  static LogError(errorCode: number, errorMsg: string, params: string, config: ILarkSRConfig): void;
113
114
  static ClientInfo(config: ILarkSRConfig, params: AppliParams): void;
115
+ static TaskInfoClientStarted(config: ILarkSRConfig, params: AppliParams): void;
114
116
  static joinParam(params: any): string;
115
117
  }
@@ -173,7 +173,11 @@ declare enum LarkSRClientEvent {
173
173
  /**
174
174
  * 对话返回的结果
175
175
  */
176
- AI_VOICE_DM_RESULT = "aivoicedmresult"
176
+ AI_VOICE_DM_RESULT = "aivoicedmresult",
177
+ /**
178
+ * 对话出错详细信息
179
+ */
180
+ AI_VOICE_ERROR = "aivoiceerror"
177
181
  }
178
182
  /**
179
183
  * LarkSR 发出的事件
@@ -556,23 +560,180 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
556
560
  /**
557
561
  * 操作相关事件
558
562
  * 所有事件坐标相对于云端应用,不相对于网页
563
+ * CloudLark.IClientInput 是所有操作指令接口对象的合集
564
+ * 可以单独使用下面 moseMove 等接口
559
565
  * @param input 操作指令
560
566
  */
561
567
  sendInput(input: CloudLark.IClientInput): void;
568
+ /**
569
+ * 向云端发送鼠标移动事件
570
+ * 事件坐标相对于云端应用,不相对于网页
571
+ * 计算方式可以参考 https://github.com/pingxingyun/lark_sr_websdk_demos 例子中 v_cursor.vue getVMouseTouchPosition 方法
572
+ * 原理是通过 LarkSR 对象的成员 screenState.operateScale 获取相对的缩放,
573
+ * 本地坐标 X larksr.screenState.operateScale.scaleX / scaleY 即可得到相对云端的坐标
574
+ *
575
+ * @param PosX 相对云端鼠标 X 点坐标
576
+ * @param PosY 相对云端鼠标 Y 点坐标
577
+ * @param DeltaX 相对云端鼠标 X 轴移动距离
578
+ * @param DeltaY 相对云端鼠标 X 轴移动距离
579
+ */
580
+ mouseMove(PosX: number, PosY: number, DeltaX: number, DeltaY: number): void;
581
+ /**
582
+ * 向云端发送鼠标移动事件
583
+ * 事件坐标相对于云端应用,不相对于网页
584
+ * 计算方式可以参考 https://github.com/pingxingyun/lark_sr_websdk_demos 例子中 v_cursor.vue getVMouseTouchPosition 方法
585
+ * 原理是通过 LarkSR 对象的成员 screenState.operateScale 获取相对的缩放,
586
+ * 本地坐标 X larksr.screenState.operateScale.scaleX / scaleY 即可得到相对云端的坐标
587
+ *
588
+ * @param PosX 相对云端鼠标 X 点坐标
589
+ * @param PosY 相对云端鼠标 Y 点坐标
590
+ * @param DeltaX 相对云端鼠标 X 轴移动距离
591
+ * @param DeltaY 相对云端鼠标 X 轴移动距离
592
+ */
562
593
  moseMove(PosX: number, PosY: number, DeltaX: number, DeltaY: number): void;
594
+ /**
595
+ * 向云端发送鼠标单击事件
596
+ * X Y 坐标计算方式同 mouseMove
597
+ *
598
+ * @param PosX 相对云端鼠标 X 点坐标
599
+ * @param PosY 相对云端鼠标 Y 点坐标
600
+ * @param key LEFT = 0,RIGHT = 1, MIDDLE = 2
601
+ */
563
602
  mouseTap(PosX: number, PosY: number, key: CloudLark.MouseKey): void;
603
+ /**
604
+ * 向云端发送鼠标按下事件
605
+ * X Y 坐标计算方式同 mouseMove
606
+ *
607
+ * @param PosX 相对云端鼠标 X 点坐标
608
+ * @param PosY 相对云端鼠标 Y 点坐标
609
+ * @param key LEFT = 0,RIGHT = 1, MIDDLE = 2
610
+ */
564
611
  mouseDown(PosX: number, PosY: number, key: CloudLark.MouseKey): void;
612
+ /**
613
+ * 向云端发送鼠标抬起事件
614
+ * X Y 坐标计算方式同 mouseMove
615
+ *
616
+ * @param PosX 相对云端鼠标 X 点坐标
617
+ * @param PosY 相对云端鼠标 Y 点坐标
618
+ * @param key LEFT = 0,RIGHT = 1, MIDDLE = 2
619
+ */
565
620
  mouseUp(PosX: number, PosY: number, key: CloudLark.MouseKey): void;
621
+ /**
622
+ * 向云端发送鼠标滚轮事件
623
+ * X Y 坐标计算方式同 mouseMove
624
+ *
625
+ * @param PosX 相对云端鼠标 X 点坐标
626
+ * @param PosY 相对云端鼠标 Y 点坐标
627
+ * @param Delata 120/-120 鼠标滚轮滚动的数值
628
+ */
566
629
  mouseWheel(PosX: number, PosY: number, Delata: number): void;
630
+ /**
631
+ * 向云端发送键盘按键按下事件
632
+ * @param key KeyboardEvent.code 字段,具体内容参考 Chrome https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values
633
+ * @param isRepeat KeyboardEvent.repeat 字段,参考https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat
634
+ * @returns 是否发送成功,如果key参数传递错误可能发送失败
635
+ */
567
636
  keyDown(key: string, isRepeat: boolean): void;
637
+ /**
638
+ * 向云端发送键盘按键抬起事件
639
+ * @param key KeyboardEvent.code 字段,具体内容参考 Chrome https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values
640
+ * @returns 是否发送成功,如果key参数传递错误可能发送失败
641
+ */
568
642
  keyUp(key: string): void;
643
+ /**
644
+ * 手柄接口消息按照 windows xbox 360 手柄标准定义,即包含 xbox 360 手柄的功能,如按钮,摇杆,扳机键。windows 上最多支持4个手柄,
645
+ * 当前版本服务端只处理1个手柄,后续会放开多个手柄的支持。接口中发送的按键值为对应的 windows 中定义的按键值。
646
+ * 向云端发送手柄按钮按下事件
647
+ * 參考 js 中获取手柄事件,参考 https://developer.mozilla.org/zh-CN/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
648
+ * @param userIndex 手柄的索引,硬件设备索引 0-3. 第一个连接的手柄为0,第二个为1,以此类推。
649
+ * @param button 按鍵 @see https://docs.microsoft.com/en-us/windows/win32/api/xinput/ns-xinput-xinput_gamepad
650
+ * export const enum XINPUT_BUTTONS {
651
+ * XINPUT_GAMEPAD_DPAD_UP = 0x0001,
652
+ * XINPUT_GAMEPAD_DPAD_DOWN = 0x0002,
653
+ * XINPUT_GAMEPAD_DPAD_LEFT = 0x0004,
654
+ * XINPUT_GAMEPAD_DPAD_RIGHT = 0x0008,
655
+ * XINPUT_GAMEPAD_START = 0x0010,
656
+ * XINPUT_GAMEPAD_BACK = 0x0020,
657
+ * XINPUT_GAMEPAD_LEFT_THUMB = 0x0040,
658
+ * XINPUT_GAMEPAD_RIGHT_THUMB = 0x0080,
659
+ * XINPUT_GAMEPAD_LEFT_SHOULDER = 0x0100,
660
+ * XINPUT_GAMEPAD_RIGHT_SHOULDER = 0x0200,
661
+ * XINPUT_GAMEPAD_A = 0x1000,
662
+ * XINPUT_GAMEPAD_B = 0x2000,
663
+ * XINPUT_GAMEPAD_X = 0x4000,
664
+ * XINPUT_GAMEPAD_Y = 0x8000,
665
+ * XINPUT_UNKNOWN = -1,
666
+ * }
667
+ * @param isRepeat 是否重复按下
668
+ * @returns
669
+ */
569
670
  gamepadButtonDown(userIndex: number, button: number, isRepeat: boolean): void;
671
+ /**
672
+ * 向云端发送手柄按钮抬起事件
673
+ * 參考 https://developer.mozilla.org/zh-CN/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
674
+ * @param userIndex 手柄的索引
675
+ * @param button 按鍵
676
+ * @returns
677
+ */
570
678
  gamepadButtonUp(userIndex: number, button: number): void;
679
+ /**
680
+ * 向云端发送手柄按trigger键事件
681
+ * 參考 https://developer.mozilla.org/zh-CN/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
682
+ * @param userIndex 手柄的索引
683
+ * @param isleft 是否是左trigger
684
+ * @param value trigger的值 扳机键的值 0-255
685
+ * @returns
686
+ */
571
687
  gamepadTrigger(userIndex: number, isleft: boolean, value: number): void;
688
+ /**
689
+ * 向云端发送手柄按摇杆的值,即 axes 值
690
+ * win MAX
691
+ * |
692
+ * MIN-------------MAX
693
+ * |
694
+ * MIN
695
+ * js 中获取硬件手柄參考 https://developer.mozilla.org/zh-CN/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
696
+ * @param userIndex 手柄的索引
697
+ * @param thumblx 左摇杆 X 值,-32767 到 32767
698
+ * @param thumbly 左摇杆 Y 值,-32767 到 32767
699
+ * @param thumbrx 右摇杆 X 值,-32767 到 32767
700
+ * @param thumbry 右摇杆 Y 值,-32767 到 32767
701
+ * @returns
702
+ */
572
703
  joystick(userIndex: number, thumblx: number, thumbly: number, thumbrx: number, thumbry: number): void;
704
+ /**
705
+ * 向云端发送触摸按下事件
706
+ * 坐标位置与 mouseMove 相同,相对与云端的鼠标移动位置
707
+ * @param id 手指的id,当前触摸事件按下手指的 id,同一个手指 id 相同。id 应每次触摸增加。即 touchdown 时 +1,
708
+ * touch move 和 touch up 时保持。当前手指未离开,又有新的手指 touchdown 时再 +1 获得新的 id
709
+ * @param x 相对云端的x轴坐标
710
+ * @param y 相对云端的y轴坐标
711
+ * @returns
712
+ */
573
713
  touchDown(id: number, x: number, y: number): void;
714
+ /**
715
+ * 向云端发送触摸移动事件
716
+ * 坐标位置与 mouseMove 相同,相对与云端的鼠标移动位置
717
+ * @param id 手指的id
718
+ * @param x 相对云端的x轴坐标
719
+ * @param y 相对云端的y轴坐标
720
+ * @returns
721
+ */
574
722
  touchMove(id: number, x: number, y: number): void;
723
+ /**
724
+ * 向云端发送触摸抬起事件
725
+ * 坐标位置与 mouseMove 相同,相对与云端的鼠标移动位置
726
+ * @param id 手指的id
727
+ * @param x 相对云端的x轴坐标
728
+ * @param y 相对云端的y轴坐标
729
+ * @returns
730
+ */
575
731
  touchUp(id: number, x: number, y: number): void;
732
+ /**
733
+ * 字符串转换为输入的鼠标按键值
734
+ * @param button 'left' | 'mid' | 'right'
735
+ * @returns LEFT = 0,RIGHT = 1,MIDDLE = 2
736
+ */
576
737
  getMouseButtonType(button: 'left' | 'mid' | 'right'): CloudLark.MouseKey;
577
738
  $emit(type: LarkEventType, data?: any, message?: string): void;
578
739
  $emitError(message?: string, code?: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "larksr_websdk",
3
- "version": "3.2.33",
3
+ "version": "3.2.36",
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",
@@ -64,6 +64,7 @@
64
64
  "url-loader": "^4.1.1",
65
65
  "webpack": "^5.54.0",
66
66
  "webpack-cli": "^4.8.0",
67
- "webpack-dev-server": "^4.3.0"
67
+ "webpack-dev-server": "^4.3.0",
68
+ "vconsole": "^3.12.1"
68
69
  }
69
70
  }
package/types/api.d.ts CHANGED
@@ -76,6 +76,7 @@ export default class API {
76
76
  static ClientLogErrorPath: string;
77
77
  static GetStartInfoPath: string;
78
78
  private static PocHostApplGetUrl;
79
+ private static TaskInfoClientStartedPath;
79
80
  static HostAppliGetUrl(params: {
80
81
  appliId: string;
81
82
  playerMode?: number;
@@ -111,5 +112,6 @@ export default class API {
111
112
  static GetTask(config: ILarkSRConfig, taskid: string): Promise<GetTaskResult>;
112
113
  static LogError(errorCode: number, errorMsg: string, params: string, config: ILarkSRConfig): void;
113
114
  static ClientInfo(config: ILarkSRConfig, params: AppliParams): void;
115
+ static TaskInfoClientStarted(config: ILarkSRConfig, params: AppliParams): void;
114
116
  static joinParam(params: any): string;
115
117
  }
@@ -41,7 +41,8 @@ export declare enum APP_EVENT_TYPE {
41
41
  LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 17,
42
42
  AI_VOICE_STATUS = 18,
43
43
  AI_VOICE_ASR_RESULT = 19,
44
- AI_VOICE_DM_RESULT = 20
44
+ AI_VOICE_DM_RESULT = 20,
45
+ AI_VOICE_ERROR = 21
45
46
  }
46
47
  export interface AppEvent extends LocalEvent<APP_EVENT_TYPE> {
47
48
  data?: any;
@@ -127,6 +128,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
127
128
  private onAiVoiceStatus;
128
129
  private onAiVoiceAsrResult;
129
130
  private onAiVoiceDMResult;
131
+ private onAiVoiceError;
130
132
  appStateChange(state: APP_STATE): void;
131
133
  private infoMsg;
132
134
  private errorMsg;
@@ -28,7 +28,8 @@ export declare enum WEBRTC_EVENT_TYPE {
28
28
  RTC_ICECANDIDATE = 17,
29
29
  AI_VOICE_STATUS = 18,
30
30
  AI_VOICE_ASR_RESULT = 19,
31
- AI_VOICE_DM_RESULT = 20
31
+ AI_VOICE_DM_RESULT = 20,
32
+ AI_VOICE_ERROR = 21
32
33
  }
33
34
  export interface GoogleBitRate {
34
35
  start: number;
package/types/larksr.d.ts CHANGED
@@ -173,7 +173,11 @@ declare enum LarkSRClientEvent {
173
173
  /**
174
174
  * 对话返回的结果
175
175
  */
176
- AI_VOICE_DM_RESULT = "aivoicedmresult"
176
+ AI_VOICE_DM_RESULT = "aivoicedmresult",
177
+ /**
178
+ * 对话出错详细信息
179
+ */
180
+ AI_VOICE_ERROR = "aivoiceerror"
177
181
  }
178
182
  /**
179
183
  * LarkSR 发出的事件
@@ -556,23 +560,180 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
556
560
  /**
557
561
  * 操作相关事件
558
562
  * 所有事件坐标相对于云端应用,不相对于网页
563
+ * CloudLark.IClientInput 是所有操作指令接口对象的合集
564
+ * 可以单独使用下面 moseMove 等接口
559
565
  * @param input 操作指令
560
566
  */
561
567
  sendInput(input: CloudLark.IClientInput): void;
568
+ /**
569
+ * 向云端发送鼠标移动事件
570
+ * 事件坐标相对于云端应用,不相对于网页
571
+ * 计算方式可以参考 https://github.com/pingxingyun/lark_sr_websdk_demos 例子中 v_cursor.vue getVMouseTouchPosition 方法
572
+ * 原理是通过 LarkSR 对象的成员 screenState.operateScale 获取相对的缩放,
573
+ * 本地坐标 X larksr.screenState.operateScale.scaleX / scaleY 即可得到相对云端的坐标
574
+ *
575
+ * @param PosX 相对云端鼠标 X 点坐标
576
+ * @param PosY 相对云端鼠标 Y 点坐标
577
+ * @param DeltaX 相对云端鼠标 X 轴移动距离
578
+ * @param DeltaY 相对云端鼠标 X 轴移动距离
579
+ */
580
+ mouseMove(PosX: number, PosY: number, DeltaX: number, DeltaY: number): void;
581
+ /**
582
+ * 向云端发送鼠标移动事件
583
+ * 事件坐标相对于云端应用,不相对于网页
584
+ * 计算方式可以参考 https://github.com/pingxingyun/lark_sr_websdk_demos 例子中 v_cursor.vue getVMouseTouchPosition 方法
585
+ * 原理是通过 LarkSR 对象的成员 screenState.operateScale 获取相对的缩放,
586
+ * 本地坐标 X larksr.screenState.operateScale.scaleX / scaleY 即可得到相对云端的坐标
587
+ *
588
+ * @param PosX 相对云端鼠标 X 点坐标
589
+ * @param PosY 相对云端鼠标 Y 点坐标
590
+ * @param DeltaX 相对云端鼠标 X 轴移动距离
591
+ * @param DeltaY 相对云端鼠标 X 轴移动距离
592
+ */
562
593
  moseMove(PosX: number, PosY: number, DeltaX: number, DeltaY: number): void;
594
+ /**
595
+ * 向云端发送鼠标单击事件
596
+ * X Y 坐标计算方式同 mouseMove
597
+ *
598
+ * @param PosX 相对云端鼠标 X 点坐标
599
+ * @param PosY 相对云端鼠标 Y 点坐标
600
+ * @param key LEFT = 0,RIGHT = 1, MIDDLE = 2
601
+ */
563
602
  mouseTap(PosX: number, PosY: number, key: CloudLark.MouseKey): void;
603
+ /**
604
+ * 向云端发送鼠标按下事件
605
+ * X Y 坐标计算方式同 mouseMove
606
+ *
607
+ * @param PosX 相对云端鼠标 X 点坐标
608
+ * @param PosY 相对云端鼠标 Y 点坐标
609
+ * @param key LEFT = 0,RIGHT = 1, MIDDLE = 2
610
+ */
564
611
  mouseDown(PosX: number, PosY: number, key: CloudLark.MouseKey): void;
612
+ /**
613
+ * 向云端发送鼠标抬起事件
614
+ * X Y 坐标计算方式同 mouseMove
615
+ *
616
+ * @param PosX 相对云端鼠标 X 点坐标
617
+ * @param PosY 相对云端鼠标 Y 点坐标
618
+ * @param key LEFT = 0,RIGHT = 1, MIDDLE = 2
619
+ */
565
620
  mouseUp(PosX: number, PosY: number, key: CloudLark.MouseKey): void;
621
+ /**
622
+ * 向云端发送鼠标滚轮事件
623
+ * X Y 坐标计算方式同 mouseMove
624
+ *
625
+ * @param PosX 相对云端鼠标 X 点坐标
626
+ * @param PosY 相对云端鼠标 Y 点坐标
627
+ * @param Delata 120/-120 鼠标滚轮滚动的数值
628
+ */
566
629
  mouseWheel(PosX: number, PosY: number, Delata: number): void;
630
+ /**
631
+ * 向云端发送键盘按键按下事件
632
+ * @param key KeyboardEvent.code 字段,具体内容参考 Chrome https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values
633
+ * @param isRepeat KeyboardEvent.repeat 字段,参考https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat
634
+ * @returns 是否发送成功,如果key参数传递错误可能发送失败
635
+ */
567
636
  keyDown(key: string, isRepeat: boolean): void;
637
+ /**
638
+ * 向云端发送键盘按键抬起事件
639
+ * @param key KeyboardEvent.code 字段,具体内容参考 Chrome https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values
640
+ * @returns 是否发送成功,如果key参数传递错误可能发送失败
641
+ */
568
642
  keyUp(key: string): void;
643
+ /**
644
+ * 手柄接口消息按照 windows xbox 360 手柄标准定义,即包含 xbox 360 手柄的功能,如按钮,摇杆,扳机键。windows 上最多支持4个手柄,
645
+ * 当前版本服务端只处理1个手柄,后续会放开多个手柄的支持。接口中发送的按键值为对应的 windows 中定义的按键值。
646
+ * 向云端发送手柄按钮按下事件
647
+ * 參考 js 中获取手柄事件,参考 https://developer.mozilla.org/zh-CN/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
648
+ * @param userIndex 手柄的索引,硬件设备索引 0-3. 第一个连接的手柄为0,第二个为1,以此类推。
649
+ * @param button 按鍵 @see https://docs.microsoft.com/en-us/windows/win32/api/xinput/ns-xinput-xinput_gamepad
650
+ * export const enum XINPUT_BUTTONS {
651
+ * XINPUT_GAMEPAD_DPAD_UP = 0x0001,
652
+ * XINPUT_GAMEPAD_DPAD_DOWN = 0x0002,
653
+ * XINPUT_GAMEPAD_DPAD_LEFT = 0x0004,
654
+ * XINPUT_GAMEPAD_DPAD_RIGHT = 0x0008,
655
+ * XINPUT_GAMEPAD_START = 0x0010,
656
+ * XINPUT_GAMEPAD_BACK = 0x0020,
657
+ * XINPUT_GAMEPAD_LEFT_THUMB = 0x0040,
658
+ * XINPUT_GAMEPAD_RIGHT_THUMB = 0x0080,
659
+ * XINPUT_GAMEPAD_LEFT_SHOULDER = 0x0100,
660
+ * XINPUT_GAMEPAD_RIGHT_SHOULDER = 0x0200,
661
+ * XINPUT_GAMEPAD_A = 0x1000,
662
+ * XINPUT_GAMEPAD_B = 0x2000,
663
+ * XINPUT_GAMEPAD_X = 0x4000,
664
+ * XINPUT_GAMEPAD_Y = 0x8000,
665
+ * XINPUT_UNKNOWN = -1,
666
+ * }
667
+ * @param isRepeat 是否重复按下
668
+ * @returns
669
+ */
569
670
  gamepadButtonDown(userIndex: number, button: number, isRepeat: boolean): void;
671
+ /**
672
+ * 向云端发送手柄按钮抬起事件
673
+ * 參考 https://developer.mozilla.org/zh-CN/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
674
+ * @param userIndex 手柄的索引
675
+ * @param button 按鍵
676
+ * @returns
677
+ */
570
678
  gamepadButtonUp(userIndex: number, button: number): void;
679
+ /**
680
+ * 向云端发送手柄按trigger键事件
681
+ * 參考 https://developer.mozilla.org/zh-CN/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
682
+ * @param userIndex 手柄的索引
683
+ * @param isleft 是否是左trigger
684
+ * @param value trigger的值 扳机键的值 0-255
685
+ * @returns
686
+ */
571
687
  gamepadTrigger(userIndex: number, isleft: boolean, value: number): void;
688
+ /**
689
+ * 向云端发送手柄按摇杆的值,即 axes 值
690
+ * win MAX
691
+ * |
692
+ * MIN-------------MAX
693
+ * |
694
+ * MIN
695
+ * js 中获取硬件手柄參考 https://developer.mozilla.org/zh-CN/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
696
+ * @param userIndex 手柄的索引
697
+ * @param thumblx 左摇杆 X 值,-32767 到 32767
698
+ * @param thumbly 左摇杆 Y 值,-32767 到 32767
699
+ * @param thumbrx 右摇杆 X 值,-32767 到 32767
700
+ * @param thumbry 右摇杆 Y 值,-32767 到 32767
701
+ * @returns
702
+ */
572
703
  joystick(userIndex: number, thumblx: number, thumbly: number, thumbrx: number, thumbry: number): void;
704
+ /**
705
+ * 向云端发送触摸按下事件
706
+ * 坐标位置与 mouseMove 相同,相对与云端的鼠标移动位置
707
+ * @param id 手指的id,当前触摸事件按下手指的 id,同一个手指 id 相同。id 应每次触摸增加。即 touchdown 时 +1,
708
+ * touch move 和 touch up 时保持。当前手指未离开,又有新的手指 touchdown 时再 +1 获得新的 id
709
+ * @param x 相对云端的x轴坐标
710
+ * @param y 相对云端的y轴坐标
711
+ * @returns
712
+ */
573
713
  touchDown(id: number, x: number, y: number): void;
714
+ /**
715
+ * 向云端发送触摸移动事件
716
+ * 坐标位置与 mouseMove 相同,相对与云端的鼠标移动位置
717
+ * @param id 手指的id
718
+ * @param x 相对云端的x轴坐标
719
+ * @param y 相对云端的y轴坐标
720
+ * @returns
721
+ */
574
722
  touchMove(id: number, x: number, y: number): void;
723
+ /**
724
+ * 向云端发送触摸抬起事件
725
+ * 坐标位置与 mouseMove 相同,相对与云端的鼠标移动位置
726
+ * @param id 手指的id
727
+ * @param x 相对云端的x轴坐标
728
+ * @param y 相对云端的y轴坐标
729
+ * @returns
730
+ */
575
731
  touchUp(id: number, x: number, y: number): void;
732
+ /**
733
+ * 字符串转换为输入的鼠标按键值
734
+ * @param button 'left' | 'mid' | 'right'
735
+ * @returns LEFT = 0,RIGHT = 1,MIDDLE = 2
736
+ */
576
737
  getMouseButtonType(button: 'left' | 'mid' | 'right'): CloudLark.MouseKey;
577
738
  $emit(type: LarkEventType, data?: any, message?: string): void;
578
739
  $emitError(message?: string, code?: number): void;
@@ -6884,6 +6884,102 @@ export namespace CloudLark {
6884
6884
  public toJSON(): { [k: string]: any };
6885
6885
  }
6886
6886
 
6887
+ /** Properties of an AivoiceError. */
6888
+ interface IAivoiceError {
6889
+
6890
+ /** AivoiceError voiceId */
6891
+ voiceId?: (number|null);
6892
+
6893
+ /** AivoiceError text */
6894
+ text?: (string|null);
6895
+ }
6896
+
6897
+ /** Represents an AivoiceError. */
6898
+ class AivoiceError implements IAivoiceError {
6899
+
6900
+ /**
6901
+ * Constructs a new AivoiceError.
6902
+ * @param [properties] Properties to set
6903
+ */
6904
+ constructor(properties?: CloudLark.IAivoiceError);
6905
+
6906
+ /** AivoiceError voiceId. */
6907
+ public voiceId: number;
6908
+
6909
+ /** AivoiceError text. */
6910
+ public text: string;
6911
+
6912
+ /**
6913
+ * Creates a new AivoiceError instance using the specified properties.
6914
+ * @param [properties] Properties to set
6915
+ * @returns AivoiceError instance
6916
+ */
6917
+ public static create(properties?: CloudLark.IAivoiceError): CloudLark.AivoiceError;
6918
+
6919
+ /**
6920
+ * Encodes the specified AivoiceError message. Does not implicitly {@link CloudLark.AivoiceError.verify|verify} messages.
6921
+ * @param message AivoiceError message or plain object to encode
6922
+ * @param [writer] Writer to encode to
6923
+ * @returns Writer
6924
+ */
6925
+ public static encode(message: CloudLark.IAivoiceError, writer?: $protobuf.Writer): $protobuf.Writer;
6926
+
6927
+ /**
6928
+ * Encodes the specified AivoiceError message, length delimited. Does not implicitly {@link CloudLark.AivoiceError.verify|verify} messages.
6929
+ * @param message AivoiceError message or plain object to encode
6930
+ * @param [writer] Writer to encode to
6931
+ * @returns Writer
6932
+ */
6933
+ public static encodeDelimited(message: CloudLark.IAivoiceError, writer?: $protobuf.Writer): $protobuf.Writer;
6934
+
6935
+ /**
6936
+ * Decodes an AivoiceError message from the specified reader or buffer.
6937
+ * @param reader Reader or buffer to decode from
6938
+ * @param [length] Message length if known beforehand
6939
+ * @returns AivoiceError
6940
+ * @throws {Error} If the payload is not a reader or valid buffer
6941
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6942
+ */
6943
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CloudLark.AivoiceError;
6944
+
6945
+ /**
6946
+ * Decodes an AivoiceError message from the specified reader or buffer, length delimited.
6947
+ * @param reader Reader or buffer to decode from
6948
+ * @returns AivoiceError
6949
+ * @throws {Error} If the payload is not a reader or valid buffer
6950
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6951
+ */
6952
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CloudLark.AivoiceError;
6953
+
6954
+ /**
6955
+ * Verifies an AivoiceError message.
6956
+ * @param message Plain object to verify
6957
+ * @returns `null` if valid, otherwise the reason why it is not
6958
+ */
6959
+ public static verify(message: { [k: string]: any }): (string|null);
6960
+
6961
+ /**
6962
+ * Creates an AivoiceError message from a plain object. Also converts values to their respective internal types.
6963
+ * @param object Plain object
6964
+ * @returns AivoiceError
6965
+ */
6966
+ public static fromObject(object: { [k: string]: any }): CloudLark.AivoiceError;
6967
+
6968
+ /**
6969
+ * Creates a plain object from an AivoiceError message. Also converts values to other types if specified.
6970
+ * @param message AivoiceError
6971
+ * @param [options] Conversion options
6972
+ * @returns Plain object
6973
+ */
6974
+ public static toObject(message: CloudLark.AivoiceError, options?: $protobuf.IConversionOptions): { [k: string]: any };
6975
+
6976
+ /**
6977
+ * Converts this AivoiceError to JSON.
6978
+ * @returns JSON object
6979
+ */
6980
+ public toJSON(): { [k: string]: any };
6981
+ }
6982
+
6887
6983
  /** Properties of a ClientInput. */
6888
6984
  interface IClientInput {
6889
6985
 
@@ -7150,6 +7246,9 @@ export namespace CloudLark {
7150
7246
 
7151
7247
  /** AppNotification aiVoiceServiceStatus */
7152
7248
  aiVoiceServiceStatus?: (CloudLark.IAiVoiceServiceStatus|null);
7249
+
7250
+ /** AppNotification aiVoiceErr */
7251
+ aiVoiceErr?: (CloudLark.IAivoiceError|null);
7153
7252
  }
7154
7253
 
7155
7254
  /** Represents an AppNotification. */
@@ -7194,8 +7293,11 @@ export namespace CloudLark {
7194
7293
  /** AppNotification aiVoiceServiceStatus. */
7195
7294
  public aiVoiceServiceStatus?: (CloudLark.IAiVoiceServiceStatus|null);
7196
7295
 
7296
+ /** AppNotification aiVoiceErr. */
7297
+ public aiVoiceErr?: (CloudLark.IAivoiceError|null);
7298
+
7197
7299
  /** AppNotification notify. */
7198
- public notify?: ("resize"|"mousemode"|"updatePlayers"|"requestInput"|"gamepadOutput"|"datachannelState"|"appDcMsg"|"cursorStyle"|"aiVoiceRealtimeParseresult"|"aiVoiceResult"|"aiVoiceServiceStatus");
7300
+ public notify?: ("resize"|"mousemode"|"updatePlayers"|"requestInput"|"gamepadOutput"|"datachannelState"|"appDcMsg"|"cursorStyle"|"aiVoiceRealtimeParseresult"|"aiVoiceResult"|"aiVoiceServiceStatus"|"aiVoiceErr");
7199
7301
 
7200
7302
  /**
7201
7303
  * Creates a new AppNotification instance using the specified properties.