larksr_websdk 3.2.35 → 3.2.38

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.
@@ -77,6 +77,7 @@ export default class API {
77
77
  static GetStartInfoPath: string;
78
78
  private static PocHostApplGetUrl;
79
79
  private static TaskInfoClientStartedPath;
80
+ private static PortMappingListPath;
80
81
  static HostAppliGetUrl(params: {
81
82
  appliId: string;
82
83
  playerMode?: number;
@@ -113,5 +114,6 @@ export default class API {
113
114
  static LogError(errorCode: number, errorMsg: string, params: string, config: ILarkSRConfig): void;
114
115
  static ClientInfo(config: ILarkSRConfig, params: AppliParams): void;
115
116
  static TaskInfoClientStarted(config: ILarkSRConfig, params: AppliParams): void;
117
+ static PortMappingList(config: ILarkSRConfig): Promise<unknown>;
116
118
  static joinParam(params: any): string;
117
119
  }
@@ -263,5 +263,17 @@ export declare class AppliParamsUtils {
263
263
  static getIntOption(option: string | null | undefined, emptyValue?: number): number;
264
264
  static getBgColor(option: string | null | undefined): string;
265
265
  }
266
+ /**
267
+ * WARNING 服务器端返回数据随机性较大,统一在该函数里做兼容处理
268
+ * 服务器端可能随意修改字段名称或值,需要注意测试
269
+ * @param startAppInfo
270
+ * @returns
271
+ */
266
272
  export declare function LoadAppliParamsFromUrl(): IAppliParams;
273
+ /**
274
+ * WARNING 服务器端返回数据随机性较大,统一在该函数里做兼容处理
275
+ * 服务器端可能随意修改字段名称或值,需要注意测试
276
+ * @param startAppInfo
277
+ * @returns
278
+ */
267
279
  export declare function LoadAppliParamsStartAppInfo(startAppInfo: StartAppInfo): IAppliParams;
@@ -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 发出的事件
@@ -420,6 +424,11 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
420
424
  */
421
425
  get uid(): number;
422
426
  private _uid;
427
+ /**
428
+ * 云端应用是否是预启动状态
429
+ */
430
+ get isPreStart(): boolean;
431
+ private _isPreStart;
423
432
  /**
424
433
  * @returns 是否是 Task的拥有者
425
434
  */
@@ -447,6 +456,8 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
447
456
  userType?: number;
448
457
  roomCode?: string;
449
458
  taskId?: string;
459
+ regionId?: string;
460
+ groupId?: string;
450
461
  }): Promise<void>;
451
462
  /**
452
463
  * 连接云端渲染资源
@@ -494,6 +505,13 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
494
505
  * 主动关闭连接
495
506
  */
496
507
  close(): void;
508
+ /**
509
+ * 设置是否强制横屏显示内容.
510
+ * handelRootElementSize 必须设置为 true 才有作用。
511
+ * 要注意强制横屏模式下网页的坐标系xy和视觉上相反,如果通过外部输入 input 事件。要注意调整
512
+ * @param force 是否强制横屏
513
+ */
514
+ setMobileForceLandScape(force: boolean): void;
497
515
  /**
498
516
  * 切换当前操作者
499
517
  * @param uid 用户id
@@ -108,5 +108,6 @@ export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEven
108
108
  private larksr;
109
109
  constructor(rootElement: HTMLElement, params: IAppliParams, larksr: LarkSR, handelRootElementSize?: boolean);
110
110
  reset(params: IAppliParams): void;
111
+ setMobileForceLandScape(force: boolean): void;
111
112
  resize(): void;
112
113
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "larksr_websdk",
3
- "version": "3.2.35",
3
+ "version": "3.2.38",
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
@@ -77,6 +77,7 @@ export default class API {
77
77
  static GetStartInfoPath: string;
78
78
  private static PocHostApplGetUrl;
79
79
  private static TaskInfoClientStartedPath;
80
+ private static PortMappingListPath;
80
81
  static HostAppliGetUrl(params: {
81
82
  appliId: string;
82
83
  playerMode?: number;
@@ -113,5 +114,6 @@ export default class API {
113
114
  static LogError(errorCode: number, errorMsg: string, params: string, config: ILarkSRConfig): void;
114
115
  static ClientInfo(config: ILarkSRConfig, params: AppliParams): void;
115
116
  static TaskInfoClientStarted(config: ILarkSRConfig, params: AppliParams): void;
117
+ static PortMappingList(config: ILarkSRConfig): Promise<unknown>;
116
118
  static joinParam(params: any): string;
117
119
  }
@@ -263,5 +263,17 @@ export declare class AppliParamsUtils {
263
263
  static getIntOption(option: string | null | undefined, emptyValue?: number): number;
264
264
  static getBgColor(option: string | null | undefined): string;
265
265
  }
266
+ /**
267
+ * WARNING 服务器端返回数据随机性较大,统一在该函数里做兼容处理
268
+ * 服务器端可能随意修改字段名称或值,需要注意测试
269
+ * @param startAppInfo
270
+ * @returns
271
+ */
266
272
  export declare function LoadAppliParamsFromUrl(): IAppliParams;
273
+ /**
274
+ * WARNING 服务器端返回数据随机性较大,统一在该函数里做兼容处理
275
+ * 服务器端可能随意修改字段名称或值,需要注意测试
276
+ * @param startAppInfo
277
+ * @returns
278
+ */
267
279
  export declare function LoadAppliParamsStartAppInfo(startAppInfo: StartAppInfo): IAppliParams;
@@ -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 发出的事件
@@ -420,6 +424,11 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
420
424
  */
421
425
  get uid(): number;
422
426
  private _uid;
427
+ /**
428
+ * 云端应用是否是预启动状态
429
+ */
430
+ get isPreStart(): boolean;
431
+ private _isPreStart;
423
432
  /**
424
433
  * @returns 是否是 Task的拥有者
425
434
  */
@@ -447,6 +456,8 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
447
456
  userType?: number;
448
457
  roomCode?: string;
449
458
  taskId?: string;
459
+ regionId?: string;
460
+ groupId?: string;
450
461
  }): Promise<void>;
451
462
  /**
452
463
  * 连接云端渲染资源
@@ -494,6 +505,13 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
494
505
  * 主动关闭连接
495
506
  */
496
507
  close(): void;
508
+ /**
509
+ * 设置是否强制横屏显示内容.
510
+ * handelRootElementSize 必须设置为 true 才有作用。
511
+ * 要注意强制横屏模式下网页的坐标系xy和视觉上相反,如果通过外部输入 input 事件。要注意调整
512
+ * @param force 是否强制横屏
513
+ */
514
+ setMobileForceLandScape(force: boolean): void;
497
515
  /**
498
516
  * 切换当前操作者
499
517
  * @param uid 用户id
@@ -430,6 +430,9 @@ export namespace CloudLark {
430
430
 
431
431
  /** TaskResponse uid */
432
432
  uid?: (number|null);
433
+
434
+ /** TaskResponse prestart */
435
+ prestart?: (boolean|null);
433
436
  }
434
437
 
435
438
  /** Represents a TaskResponse. */
@@ -447,6 +450,9 @@ export namespace CloudLark {
447
450
  /** TaskResponse uid. */
448
451
  public uid: number;
449
452
 
453
+ /** TaskResponse prestart. */
454
+ public prestart: boolean;
455
+
450
456
  /**
451
457
  * Creates a new TaskResponse instance using the specified properties.
452
458
  * @param [properties] Properties to set
@@ -6884,6 +6890,102 @@ export namespace CloudLark {
6884
6890
  public toJSON(): { [k: string]: any };
6885
6891
  }
6886
6892
 
6893
+ /** Properties of an AivoiceError. */
6894
+ interface IAivoiceError {
6895
+
6896
+ /** AivoiceError voiceId */
6897
+ voiceId?: (number|null);
6898
+
6899
+ /** AivoiceError text */
6900
+ text?: (string|null);
6901
+ }
6902
+
6903
+ /** Represents an AivoiceError. */
6904
+ class AivoiceError implements IAivoiceError {
6905
+
6906
+ /**
6907
+ * Constructs a new AivoiceError.
6908
+ * @param [properties] Properties to set
6909
+ */
6910
+ constructor(properties?: CloudLark.IAivoiceError);
6911
+
6912
+ /** AivoiceError voiceId. */
6913
+ public voiceId: number;
6914
+
6915
+ /** AivoiceError text. */
6916
+ public text: string;
6917
+
6918
+ /**
6919
+ * Creates a new AivoiceError instance using the specified properties.
6920
+ * @param [properties] Properties to set
6921
+ * @returns AivoiceError instance
6922
+ */
6923
+ public static create(properties?: CloudLark.IAivoiceError): CloudLark.AivoiceError;
6924
+
6925
+ /**
6926
+ * Encodes the specified AivoiceError message. Does not implicitly {@link CloudLark.AivoiceError.verify|verify} messages.
6927
+ * @param message AivoiceError message or plain object to encode
6928
+ * @param [writer] Writer to encode to
6929
+ * @returns Writer
6930
+ */
6931
+ public static encode(message: CloudLark.IAivoiceError, writer?: $protobuf.Writer): $protobuf.Writer;
6932
+
6933
+ /**
6934
+ * Encodes the specified AivoiceError message, length delimited. Does not implicitly {@link CloudLark.AivoiceError.verify|verify} messages.
6935
+ * @param message AivoiceError message or plain object to encode
6936
+ * @param [writer] Writer to encode to
6937
+ * @returns Writer
6938
+ */
6939
+ public static encodeDelimited(message: CloudLark.IAivoiceError, writer?: $protobuf.Writer): $protobuf.Writer;
6940
+
6941
+ /**
6942
+ * Decodes an AivoiceError message from the specified reader or buffer.
6943
+ * @param reader Reader or buffer to decode from
6944
+ * @param [length] Message length if known beforehand
6945
+ * @returns AivoiceError
6946
+ * @throws {Error} If the payload is not a reader or valid buffer
6947
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6948
+ */
6949
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CloudLark.AivoiceError;
6950
+
6951
+ /**
6952
+ * Decodes an AivoiceError message from the specified reader or buffer, length delimited.
6953
+ * @param reader Reader or buffer to decode from
6954
+ * @returns AivoiceError
6955
+ * @throws {Error} If the payload is not a reader or valid buffer
6956
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6957
+ */
6958
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CloudLark.AivoiceError;
6959
+
6960
+ /**
6961
+ * Verifies an AivoiceError message.
6962
+ * @param message Plain object to verify
6963
+ * @returns `null` if valid, otherwise the reason why it is not
6964
+ */
6965
+ public static verify(message: { [k: string]: any }): (string|null);
6966
+
6967
+ /**
6968
+ * Creates an AivoiceError message from a plain object. Also converts values to their respective internal types.
6969
+ * @param object Plain object
6970
+ * @returns AivoiceError
6971
+ */
6972
+ public static fromObject(object: { [k: string]: any }): CloudLark.AivoiceError;
6973
+
6974
+ /**
6975
+ * Creates a plain object from an AivoiceError message. Also converts values to other types if specified.
6976
+ * @param message AivoiceError
6977
+ * @param [options] Conversion options
6978
+ * @returns Plain object
6979
+ */
6980
+ public static toObject(message: CloudLark.AivoiceError, options?: $protobuf.IConversionOptions): { [k: string]: any };
6981
+
6982
+ /**
6983
+ * Converts this AivoiceError to JSON.
6984
+ * @returns JSON object
6985
+ */
6986
+ public toJSON(): { [k: string]: any };
6987
+ }
6988
+
6887
6989
  /** Properties of a ClientInput. */
6888
6990
  interface IClientInput {
6889
6991
 
@@ -7150,6 +7252,9 @@ export namespace CloudLark {
7150
7252
 
7151
7253
  /** AppNotification aiVoiceServiceStatus */
7152
7254
  aiVoiceServiceStatus?: (CloudLark.IAiVoiceServiceStatus|null);
7255
+
7256
+ /** AppNotification aiVoiceErr */
7257
+ aiVoiceErr?: (CloudLark.IAivoiceError|null);
7153
7258
  }
7154
7259
 
7155
7260
  /** Represents an AppNotification. */
@@ -7194,8 +7299,11 @@ export namespace CloudLark {
7194
7299
  /** AppNotification aiVoiceServiceStatus. */
7195
7300
  public aiVoiceServiceStatus?: (CloudLark.IAiVoiceServiceStatus|null);
7196
7301
 
7302
+ /** AppNotification aiVoiceErr. */
7303
+ public aiVoiceErr?: (CloudLark.IAivoiceError|null);
7304
+
7197
7305
  /** AppNotification notify. */
7198
- public notify?: ("resize"|"mousemode"|"updatePlayers"|"requestInput"|"gamepadOutput"|"datachannelState"|"appDcMsg"|"cursorStyle"|"aiVoiceRealtimeParseresult"|"aiVoiceResult"|"aiVoiceServiceStatus");
7306
+ public notify?: ("resize"|"mousemode"|"updatePlayers"|"requestInput"|"gamepadOutput"|"datachannelState"|"appDcMsg"|"cursorStyle"|"aiVoiceRealtimeParseresult"|"aiVoiceResult"|"aiVoiceServiceStatus"|"aiVoiceErr");
7199
7307
 
7200
7308
  /**
7201
7309
  * Creates a new AppNotification instance using the specified properties.
@@ -108,5 +108,6 @@ export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEven
108
108
  private larksr;
109
109
  constructor(rootElement: HTMLElement, params: IAppliParams, larksr: LarkSR, handelRootElementSize?: boolean);
110
110
  reset(params: IAppliParams): void;
111
+ setMobileForceLandScape(force: boolean): void;
111
112
  resize(): void;
112
113
  }