larksr_websdk 3.2.15 → 3.2.32

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.
@@ -93,6 +93,7 @@ export default class API {
93
93
  };
94
94
  }>;
95
95
  static GetStartInfo(serverAddress: string, params: {
96
+ sdkId: string;
96
97
  appliId: string;
97
98
  playerMode?: number;
98
99
  userType?: number;
@@ -132,7 +132,7 @@ export interface IAppliParams {
132
132
  /**
133
133
  * 口令:8位唯一码,写入TaskInfo. 房间code,备用。
134
134
  */
135
- roomCode: number;
135
+ roomCode: string;
136
136
  /**
137
137
  * debug task. 跳过task检测
138
138
  */
@@ -231,7 +231,7 @@ export declare class AppliParams implements IAppliParams {
231
231
  playerMode: number;
232
232
  userType: number;
233
233
  nickname: string;
234
- roomCode: number;
234
+ roomCode: string;
235
235
  debugTask: boolean;
236
236
  debugWebServer: string;
237
237
  loadingTimeout: number;
@@ -1,10 +1,7 @@
1
1
  import 'core-js/stable/symbol';
2
- import { LarkSR, CreateLarkSRClientFromePXYHost, CreateLarkSRClientFromeAPI, CreateLarkSRClientFromeUrl, 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 } from "./larksr";
3
3
  declare const _default: {
4
4
  LarkSR: typeof LarkSR;
5
- CreateLarkSRClientFromePXYHost: typeof CreateLarkSRClientFromePXYHost;
6
- CreateLarkSRClientFromeAPI: typeof CreateLarkSRClientFromeAPI;
7
- CreateLarkSRClientFromeUrl: typeof CreateLarkSRClientFromeUrl;
8
5
  API: typeof API;
9
6
  AppliParams: typeof AppliParams;
10
7
  LoadAppliParamsFromUrl: typeof LoadAppliParamsFromUrl;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { EventBase, LocalEvent } from './event/event_base';
6
6
  import Application, { APP_STATE } from './lark/application';
7
- import { AppliParams, AppliParamsUtils, IAppliParams, LoadAppliParamsFromUrl, LoadAppliParamsStartAppInfo } from './appli_params';
7
+ import { AppliParams, AppliParamsUtils, LoadAppliParamsFromUrl, LoadAppliParamsStartAppInfo } from './appli_params';
8
8
  import { LarkEventType } from './lark/lark_event_type';
9
9
  import API from './api';
10
10
  import ScreenState from './screen_state';
@@ -46,6 +46,14 @@ declare enum UserType {
46
46
  * LarkSR 实例会发出的事件
47
47
  */
48
48
  declare enum LarkSRClientEvent {
49
+ /**
50
+ * TASK 创建成功,返回 Task 相关信息
51
+ */
52
+ TASK_CREATE_SUCCESS = "taskcreatesuccess",
53
+ /**
54
+ * TASK 创建失败
55
+ */
56
+ TASK_CREATE_FAILED = "taskcreatefailed",
49
57
  /**
50
58
  * 连接渲染服务器成功 .
51
59
  */
@@ -153,7 +161,19 @@ declare enum LarkSRClientEvent {
153
161
  /**
154
162
  * 一般信息提示
155
163
  */
156
- INFO = "info"
164
+ INFO = "info",
165
+ /**
166
+ * 语音对话的状态
167
+ */
168
+ AI_VOICE_STATUS = "aivoicestatus",
169
+ /**
170
+ * 语音识别转文字的结果
171
+ */
172
+ AI_VOICE_ASR_RESULT = "aivoiceasrresult",
173
+ /**
174
+ * 对话返回的结果
175
+ */
176
+ AI_VOICE_DM_RESULT = "aivoicedmresult"
157
177
  }
158
178
  /**
159
179
  * LarkSR 发出的事件
@@ -192,6 +212,7 @@ interface ILarkSRConfig {
192
212
  authCode?: string;
193
213
  /**
194
214
  * 可选项,授权是否成功
215
+ * @deprecated 目前不会回调该参数。如果SDK验证失败将在 connect 返回失败
195
216
  */
196
217
  authCodeCallback?: (isSuccess: boolean, e: any) => void;
197
218
  /**
@@ -288,46 +309,6 @@ interface ILarkSRConfig {
288
309
  */
289
310
  publicPortMapping?: PublicPortMapping;
290
311
  }
291
- /**
292
- * 通过平行云托管平台创建客户端并启动应用
293
- * @param config 传入 config @see ILarkSRConfig
294
- * @param params 进入应用接口参数。appliId 为必填项
295
- * @returns Promise 创建 larksr client 是否成功
296
- */
297
- export declare function CreateLarkSRClientFromePXYHost(config: ILarkSRConfig, params: {
298
- appliId: string;
299
- playerMode?: number;
300
- userType?: number;
301
- roomCode?: string;
302
- taskId?: string;
303
- nickname?: string;
304
- }): Promise<LarkSR>;
305
- /**
306
- * 通过调用后台接口获取云端应用参数
307
- * @param config 传入 config @see ILarkSRConfig
308
- * @param params 进入应用接口参数。appliId 为必填项
309
- * @returns Promise 创建 larksr client 是否成功
310
- */
311
- export declare function CreateLarkSRClientFromeAPI(config: ILarkSRConfig, params: {
312
- appliId: string;
313
- playerMode?: number;
314
- userType?: number;
315
- roomCode?: string;
316
- taskId?: string;
317
- clientMac?: string;
318
- groupId?: string;
319
- regionId?: string;
320
- targetServerIp?: string;
321
- appKey?: string;
322
- timestamp?: string;
323
- signature?: string;
324
- }): Promise<LarkSR>;
325
- /**
326
- * 通过从url参数中获取云端应用相关参数
327
- * @param config 传入 config @see ILarkSRConfig
328
- * @returns Promise 创建 larksr client 是否成功
329
- */
330
- export declare function CreateLarkSRClientFromeUrl(config: ILarkSRConfig): Promise<LarkSR>;
331
312
  declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
332
313
  /**
333
314
  * 应用参数,构建时传入
@@ -374,6 +355,11 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
374
355
  * 动态设置scalemode
375
356
  */
376
357
  set scaleMode(scaleMode: ScaleMode);
358
+ get mouseZoomDirection(): number;
359
+ /**
360
+ * 动态设置滚轮和缩放手势对应关系
361
+ */
362
+ set mouseZoomDirection(direction: number);
377
363
  /**
378
364
  * 当前的输入控制
379
365
  * @see Operation
@@ -429,7 +415,6 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
429
415
  get config(): ILarkSRConfig;
430
416
  private _config;
431
417
  private loadingTimeout;
432
- private sdkAuth;
433
418
  /**
434
419
  * 后台分配的用户id
435
420
  */
@@ -447,13 +432,11 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
447
432
  get initCursorMode(): boolean;
448
433
  /**
449
434
  * LarkSR 客户端。所有操作和事件通过该类传递
450
- * @see CreateLarkSRClientFromeAPI, @see CreateLarkSRClientFromeUrl @see CreateLarkSRClientFromePXYHost
451
- * @param config 本地配置,如果有 IAppliParams 相同的配置项,优先级最高
452
- * @param params [可选参数] 云端应用参数等,通过后台接口或者url参数获取。
435
+ * @param config 本地配置,优先级最高
453
436
  */
454
- constructor(config: ILarkSRConfig, params?: IAppliParams);
437
+ constructor(config: ILarkSRConfig);
455
438
  /**
456
- *
439
+ * 单独设置sdk授权码,目前总会返回成功 promise,具体验证失败将在 connectWithPxyHost 或 connect 返回
457
440
  * @param id sdk id 初始化sdkid
458
441
  * @returns
459
442
  */
@@ -492,13 +475,13 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
492
475
  * 手动重设进入应用参数
493
476
  * @param params
494
477
  */
495
- setAppliParams(params: IAppliParams): void;
478
+ private setAppliParams;
496
479
  /**
497
480
  * 开始云渲染流程
498
481
  * 启动时应用参数不能为空,包括 taskID,appServer,appPort
499
482
  * @returns 是否成功。主要校验授权码是否成功
500
483
  */
501
- start(): Promise<void>;
484
+ private start;
502
485
  /**
503
486
  * 重新开始云渲染流程
504
487
  */
@@ -521,6 +504,24 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
521
504
  * @param text 文字
522
505
  */
523
506
  inputText(text: string): void;
507
+ /**
508
+ * 开始智能语音对话文本输入
509
+ * 应在只能语音为开始状态下开始输入
510
+ * @param text 输入的文本
511
+ * @returns 返回对话 ID
512
+ */
513
+ aiDmTextInput(text: string): number;
514
+ /**
515
+ * 开始智能语音对话语音输入,自动请求录音权限
516
+ * 应在只能语音为开始状态下开始输入
517
+ * @returns 成功返回对话id,失败返回异常
518
+ */
519
+ startAiDmVoiceInput(): Promise<number>;
520
+ /**
521
+ * 停止智能语音输入,通知语音引擎当前用户输入对话结束
522
+ * @returns 返回当前对话的id
523
+ */
524
+ stopAiDmVoiceInput(): number;
524
525
  /**
525
526
  * 发送文字消息给数据通道
526
527
  * 注意 云端应用要继承数据通道功能
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "larksr_websdk",
3
- "version": "3.2.15",
3
+ "version": "3.2.32",
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
@@ -93,6 +93,7 @@ export default class API {
93
93
  };
94
94
  }>;
95
95
  static GetStartInfo(serverAddress: string, params: {
96
+ sdkId: string;
96
97
  appliId: string;
97
98
  playerMode?: number;
98
99
  userType?: number;
@@ -132,7 +132,7 @@ export interface IAppliParams {
132
132
  /**
133
133
  * 口令:8位唯一码,写入TaskInfo. 房间code,备用。
134
134
  */
135
- roomCode: number;
135
+ roomCode: string;
136
136
  /**
137
137
  * debug task. 跳过task检测
138
138
  */
@@ -231,7 +231,7 @@ export declare class AppliParams implements IAppliParams {
231
231
  playerMode: number;
232
232
  userType: number;
233
233
  nickname: string;
234
- roomCode: number;
234
+ roomCode: string;
235
235
  debugTask: boolean;
236
236
  debugWebServer: string;
237
237
  loadingTimeout: number;
package/types/index.d.ts CHANGED
@@ -1,10 +1,7 @@
1
1
  import 'core-js/stable/symbol';
2
- import { LarkSR, CreateLarkSRClientFromePXYHost, CreateLarkSRClientFromeAPI, CreateLarkSRClientFromeUrl, 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 } from "./larksr";
3
3
  declare const _default: {
4
4
  LarkSR: typeof LarkSR;
5
- CreateLarkSRClientFromePXYHost: typeof CreateLarkSRClientFromePXYHost;
6
- CreateLarkSRClientFromeAPI: typeof CreateLarkSRClientFromeAPI;
7
- CreateLarkSRClientFromeUrl: typeof CreateLarkSRClientFromeUrl;
8
5
  API: typeof API;
9
6
  AppliParams: typeof AppliParams;
10
7
  LoadAppliParamsFromUrl: typeof LoadAppliParamsFromUrl;
@@ -4,6 +4,7 @@ import WebSocektChannel from './websocket_channel';
4
4
  import WebsocketProxy from './websocket_proxy';
5
5
  import { LarkSR } from '../larksr';
6
6
  import PixelStreamingWebsocketChannel from './test_pixel_streaming';
7
+ import { RECORDER_STATE } from './recoder';
7
8
  export declare enum APP_STATE {
8
9
  BEFORE_CREATE = 0,
9
10
  INITED = 1,
@@ -37,7 +38,10 @@ export declare enum APP_EVENT_TYPE {
37
38
  LK_DATA_CHANNEL_RENDERSERVER_TEXT_MESSAGE = 14,
38
39
  LK_DATA_CHANNEL_RENDERSERVER_BINARY_MESSAGE = 15,
39
40
  LK_DATA_CHANNEL_RENDERSERVER_OPEN = 16,
40
- LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 17
41
+ LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 17,
42
+ AI_VOICE_STATUS = 18,
43
+ AI_VOICE_ASR_RESULT = 19,
44
+ AI_VOICE_DM_RESULT = 20
41
45
  }
42
46
  export interface AppEvent extends LocalEvent<APP_EVENT_TYPE> {
43
47
  data?: any;
@@ -53,6 +57,9 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
53
57
  private _state;
54
58
  private retryTime;
55
59
  private larksr;
60
+ get voiceId(): number;
61
+ get recodeState(): RECORDER_STATE;
62
+ private recoder;
56
63
  constructor(larksr: LarkSR);
57
64
  init(): void;
58
65
  initPc(): void;
@@ -62,6 +69,10 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
62
69
  inputText(text: string): void;
63
70
  sendTextToDataChannel(text: string): void;
64
71
  sendBinaryToDataChannel(binary: Uint8Array): void;
72
+ aiDmTextInput(text: string): number;
73
+ startAiDmVoiceInput(): Promise<number>;
74
+ stopAiDmVoiceInput(): number;
75
+ private onRecoderData;
65
76
  start(): Promise<void>;
66
77
  connect(): Promise<PixelStreamingWebsocketChannel> | Promise<WebsocketProxy> | Promise<WebSocektChannel> | undefined;
67
78
  disConnect(): void;
@@ -113,6 +124,9 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
113
124
  private onDataChannelOpen;
114
125
  private onDataChannelClose;
115
126
  private onPeerConnectionState;
127
+ private onAiVoiceStatus;
128
+ private onAiVoiceAsrResult;
129
+ private onAiVoiceDMResult;
116
130
  appStateChange(state: APP_STATE): void;
117
131
  private infoMsg;
118
132
  private errorMsg;
@@ -1,7 +1,7 @@
1
1
  export declare enum LarkEventType {
2
2
  LK_WEB_CLIENT_LOAD_SUCCESS = 1,
3
- LK_API_ENTERAPPLI_SUCCESS = 10,
4
- LK_API_ENTERAPPLI_FAILED = 11,
3
+ LK_TASK_CREATE_SUCCESS = 10,
4
+ LK_TASK_CREATE_FAILED = 11,
5
5
  LK_TASK_SYNC_APP = 20,
6
6
  LK_TASK_SYNC_APP_FAILED = 21,
7
7
  LK_RENDER_SERVER_CONNECTED = 100,
@@ -33,6 +33,7 @@ export declare enum LarkEventType {
33
33
  LK_VIDEO_LOADED = 700,
34
34
  LK_VIDEO_PLAY_FAILED = 701,
35
35
  LK_GOT_REMOTE_STREAM = 710,
36
+ LK_VIDEO_PLAY_SUCCSS = 711,
36
37
  LK_NOTIFY_CLIENT_LOGOUT_PLAYER_LOGOUT = 800,
37
38
  LK_NOTIFY_CLIENT_LOGOUT_TASKOWNER_LOGOUT = 801,
38
39
  LK_APP_PROCESS_NOTIFI_APP_QUIT = 900,
@@ -25,7 +25,10 @@ export declare enum WEBRTC_EVENT_TYPE {
25
25
  BAD_NETWORK = 14,
26
26
  ERROR = 15,
27
27
  RTC_SDP = 16,
28
- RTC_ICECANDIDATE = 17
28
+ RTC_ICECANDIDATE = 17,
29
+ AI_VOICE_STATUS = 18,
30
+ AI_VOICE_ASR_RESULT = 19,
31
+ AI_VOICE_DM_RESULT = 20
29
32
  }
30
33
  export interface GoogleBitRate {
31
34
  start: number;
@@ -0,0 +1,55 @@
1
+ import { EventBase, LocalEvent } from '../event/event_base';
2
+ export declare enum RECORDER_STATE {
3
+ READY = 0,
4
+ RECORDING = 1
5
+ }
6
+ export declare const RECODER_DEFAULT_CONFIG: {
7
+ sampleRate: number;
8
+ sampleBits: number;
9
+ bufferSize: number;
10
+ };
11
+ /**
12
+ * LarkSR 实例会发出的事件
13
+ */
14
+ export declare enum RecodeEventType {
15
+ DATA = 0
16
+ }
17
+ /**
18
+ * LarkSR 发出的事件
19
+ */
20
+ export interface RecodeEvent extends LocalEvent<RecodeEventType> {
21
+ voiceId: number;
22
+ sliceId: number;
23
+ data: Uint8Array;
24
+ }
25
+ export default class Recorder extends EventBase<RecodeEventType, RecodeEvent> {
26
+ get state(): RECORDER_STATE;
27
+ private _state;
28
+ private ctx;
29
+ private sampleRate;
30
+ private sampleBits;
31
+ private recorder;
32
+ private source;
33
+ private stream;
34
+ private buffer;
35
+ private bufferSize;
36
+ get voiceId(): number;
37
+ updateVoiceId(): number;
38
+ private _voiceId;
39
+ constructor({ bufferSize, sampleRate, sampleBits, }?: {
40
+ sampleRate: number;
41
+ sampleBits: number;
42
+ bufferSize: number;
43
+ });
44
+ start(): Promise<number>;
45
+ pause(): void;
46
+ clear(): void;
47
+ /**
48
+ * @deprecated
49
+ * @returns
50
+ */
51
+ private getRecord;
52
+ private merge;
53
+ private compress;
54
+ private encodeToPCM;
55
+ }
package/types/larksr.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { EventBase, LocalEvent } from './event/event_base';
6
6
  import Application, { APP_STATE } from './lark/application';
7
- import { AppliParams, AppliParamsUtils, IAppliParams, LoadAppliParamsFromUrl, LoadAppliParamsStartAppInfo } from './appli_params';
7
+ import { AppliParams, AppliParamsUtils, LoadAppliParamsFromUrl, LoadAppliParamsStartAppInfo } from './appli_params';
8
8
  import { LarkEventType } from './lark/lark_event_type';
9
9
  import API from './api';
10
10
  import ScreenState from './screen_state';
@@ -46,6 +46,14 @@ declare enum UserType {
46
46
  * LarkSR 实例会发出的事件
47
47
  */
48
48
  declare enum LarkSRClientEvent {
49
+ /**
50
+ * TASK 创建成功,返回 Task 相关信息
51
+ */
52
+ TASK_CREATE_SUCCESS = "taskcreatesuccess",
53
+ /**
54
+ * TASK 创建失败
55
+ */
56
+ TASK_CREATE_FAILED = "taskcreatefailed",
49
57
  /**
50
58
  * 连接渲染服务器成功 .
51
59
  */
@@ -153,7 +161,19 @@ declare enum LarkSRClientEvent {
153
161
  /**
154
162
  * 一般信息提示
155
163
  */
156
- INFO = "info"
164
+ INFO = "info",
165
+ /**
166
+ * 语音对话的状态
167
+ */
168
+ AI_VOICE_STATUS = "aivoicestatus",
169
+ /**
170
+ * 语音识别转文字的结果
171
+ */
172
+ AI_VOICE_ASR_RESULT = "aivoiceasrresult",
173
+ /**
174
+ * 对话返回的结果
175
+ */
176
+ AI_VOICE_DM_RESULT = "aivoicedmresult"
157
177
  }
158
178
  /**
159
179
  * LarkSR 发出的事件
@@ -192,6 +212,7 @@ interface ILarkSRConfig {
192
212
  authCode?: string;
193
213
  /**
194
214
  * 可选项,授权是否成功
215
+ * @deprecated 目前不会回调该参数。如果SDK验证失败将在 connect 返回失败
195
216
  */
196
217
  authCodeCallback?: (isSuccess: boolean, e: any) => void;
197
218
  /**
@@ -288,46 +309,6 @@ interface ILarkSRConfig {
288
309
  */
289
310
  publicPortMapping?: PublicPortMapping;
290
311
  }
291
- /**
292
- * 通过平行云托管平台创建客户端并启动应用
293
- * @param config 传入 config @see ILarkSRConfig
294
- * @param params 进入应用接口参数。appliId 为必填项
295
- * @returns Promise 创建 larksr client 是否成功
296
- */
297
- export declare function CreateLarkSRClientFromePXYHost(config: ILarkSRConfig, params: {
298
- appliId: string;
299
- playerMode?: number;
300
- userType?: number;
301
- roomCode?: string;
302
- taskId?: string;
303
- nickname?: string;
304
- }): Promise<LarkSR>;
305
- /**
306
- * 通过调用后台接口获取云端应用参数
307
- * @param config 传入 config @see ILarkSRConfig
308
- * @param params 进入应用接口参数。appliId 为必填项
309
- * @returns Promise 创建 larksr client 是否成功
310
- */
311
- export declare function CreateLarkSRClientFromeAPI(config: ILarkSRConfig, params: {
312
- appliId: string;
313
- playerMode?: number;
314
- userType?: number;
315
- roomCode?: string;
316
- taskId?: string;
317
- clientMac?: string;
318
- groupId?: string;
319
- regionId?: string;
320
- targetServerIp?: string;
321
- appKey?: string;
322
- timestamp?: string;
323
- signature?: string;
324
- }): Promise<LarkSR>;
325
- /**
326
- * 通过从url参数中获取云端应用相关参数
327
- * @param config 传入 config @see ILarkSRConfig
328
- * @returns Promise 创建 larksr client 是否成功
329
- */
330
- export declare function CreateLarkSRClientFromeUrl(config: ILarkSRConfig): Promise<LarkSR>;
331
312
  declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
332
313
  /**
333
314
  * 应用参数,构建时传入
@@ -374,6 +355,11 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
374
355
  * 动态设置scalemode
375
356
  */
376
357
  set scaleMode(scaleMode: ScaleMode);
358
+ get mouseZoomDirection(): number;
359
+ /**
360
+ * 动态设置滚轮和缩放手势对应关系
361
+ */
362
+ set mouseZoomDirection(direction: number);
377
363
  /**
378
364
  * 当前的输入控制
379
365
  * @see Operation
@@ -429,7 +415,6 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
429
415
  get config(): ILarkSRConfig;
430
416
  private _config;
431
417
  private loadingTimeout;
432
- private sdkAuth;
433
418
  /**
434
419
  * 后台分配的用户id
435
420
  */
@@ -447,13 +432,11 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
447
432
  get initCursorMode(): boolean;
448
433
  /**
449
434
  * LarkSR 客户端。所有操作和事件通过该类传递
450
- * @see CreateLarkSRClientFromeAPI, @see CreateLarkSRClientFromeUrl @see CreateLarkSRClientFromePXYHost
451
- * @param config 本地配置,如果有 IAppliParams 相同的配置项,优先级最高
452
- * @param params [可选参数] 云端应用参数等,通过后台接口或者url参数获取。
435
+ * @param config 本地配置,优先级最高
453
436
  */
454
- constructor(config: ILarkSRConfig, params?: IAppliParams);
437
+ constructor(config: ILarkSRConfig);
455
438
  /**
456
- *
439
+ * 单独设置sdk授权码,目前总会返回成功 promise,具体验证失败将在 connectWithPxyHost 或 connect 返回
457
440
  * @param id sdk id 初始化sdkid
458
441
  * @returns
459
442
  */
@@ -492,13 +475,13 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
492
475
  * 手动重设进入应用参数
493
476
  * @param params
494
477
  */
495
- setAppliParams(params: IAppliParams): void;
478
+ private setAppliParams;
496
479
  /**
497
480
  * 开始云渲染流程
498
481
  * 启动时应用参数不能为空,包括 taskID,appServer,appPort
499
482
  * @returns 是否成功。主要校验授权码是否成功
500
483
  */
501
- start(): Promise<void>;
484
+ private start;
502
485
  /**
503
486
  * 重新开始云渲染流程
504
487
  */
@@ -521,6 +504,24 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
521
504
  * @param text 文字
522
505
  */
523
506
  inputText(text: string): void;
507
+ /**
508
+ * 开始智能语音对话文本输入
509
+ * 应在只能语音为开始状态下开始输入
510
+ * @param text 输入的文本
511
+ * @returns 返回对话 ID
512
+ */
513
+ aiDmTextInput(text: string): number;
514
+ /**
515
+ * 开始智能语音对话语音输入,自动请求录音权限
516
+ * 应在只能语音为开始状态下开始输入
517
+ * @returns 成功返回对话id,失败返回异常
518
+ */
519
+ startAiDmVoiceInput(): Promise<number>;
520
+ /**
521
+ * 停止智能语音输入,通知语音引擎当前用户输入对话结束
522
+ * @returns 返回当前对话的id
523
+ */
524
+ stopAiDmVoiceInput(): number;
524
525
  /**
525
526
  * 发送文字消息给数据通道
526
527
  * 注意 云端应用要继承数据通道功能
@@ -4,6 +4,9 @@ export default class GestureHandler extends HandlerBase {
4
4
  private gesture;
5
5
  private rootElement;
6
6
  private pressedMouseButtons;
7
+ set mouseZoomDirection(direction: number);
8
+ get mouseZoomDirection(): number;
9
+ private _mouseZoomDirection;
7
10
  constructor(rootElement: HTMLElement, op: Operation);
8
11
  startListening(): void;
9
12
  stopListening(): void;
@@ -3,13 +3,16 @@ import HandlerBase from './handler_base';
3
3
  export default class KeyboardHandler extends HandlerBase {
4
4
  private needSyncKeyState;
5
5
  private fistSyncKeyState;
6
+ private pressedKeys;
6
7
  constructor(op: Operation);
7
8
  startListening(): void;
8
9
  stopListening(): void;
10
+ private onLockPointChange;
9
11
  private keyboardListenerSetup;
10
12
  private onKeyDown;
11
13
  private onKeyUp;
12
14
  private onWindowBlur;
13
15
  private onWindowFocus;
14
16
  private onWindowVisibilityChange;
17
+ private releaseKeys;
15
18
  }
@@ -8,6 +8,7 @@ export default class MouseHandler extends HandlerBase {
8
8
  private isFocus;
9
9
  private rootElement;
10
10
  private subscribeUpdatePlayerListFromProtoAction;
11
+ private pressedMouseButtons;
11
12
  constructor(rootElement: HTMLElement, op: Operation);
12
13
  resetLocalRendreMousePosition(p: Point): void;
13
14
  setRootElement(rootElement: HTMLElement): void;
@@ -36,5 +37,6 @@ export default class MouseHandler extends HandlerBase {
36
37
  private onWindowBlur;
37
38
  private onWindowFocus;
38
39
  private onWindowVisibilityChange;
40
+ private releaseMouseButtons;
39
41
  private toastMsg;
40
42
  }
@@ -18,7 +18,6 @@ export default class Operation extends EventBase<OPREATION_EVENT_TYPE, Operation
18
18
  private keyboardHandler;
19
19
  private mouseHandler;
20
20
  private gamepadHandler;
21
- private useTouch;
22
21
  private touchHandler;
23
22
  private _startListen;
24
23
  set enableParse(enable: boolean);
@@ -35,11 +34,14 @@ export default class Operation extends EventBase<OPREATION_EVENT_TYPE, Operation
35
34
  get screenState(): import("../screen_state").default;
36
35
  get fullScreen(): import("../larksr").FullScreen;
37
36
  get lockPointer(): import("../larksr").LockPointer;
37
+ get mouseZoomDirection(): number;
38
+ set mouseZoomDirection(direction: number);
38
39
  constructor(rootElement: HTMLElement, larksr: LarkSR);
39
40
  setMouseEnable(enable: boolean): void;
40
41
  setKeyboardEnable(enable: boolean): void;
41
42
  setGamepadEnable(enable: boolean): void;
42
43
  setTouchEnable(enable: boolean): void;
44
+ setGestureEnable(enable: boolean): void;
43
45
  resetLocalRendreMousePosition(): void;
44
46
  setAppMouseMode(mode: CloudLark.IAppMouseMode): void;
45
47
  resetAppMouseLockState(): void;