larksr_websdk 3.2.7 → 3.2.8

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.
@@ -73,12 +73,32 @@ export default class API {
73
73
  static GetTaskPATH: string;
74
74
  static ClientLogErrorPath: string;
75
75
  static GetStartInfoPath: string;
76
+ private static PocHostApplGetUrl;
77
+ static HostAppliGetUrl(params: {
78
+ appliId: string;
79
+ playerMode?: number;
80
+ userType?: number;
81
+ roomCode?: string;
82
+ taskId?: string;
83
+ }): Promise<{
84
+ host: string;
85
+ origin: string;
86
+ params: {
87
+ appliId: string;
88
+ appKey: string;
89
+ timestamp: string;
90
+ signature: string;
91
+ };
92
+ }>;
76
93
  static GetStartInfo(serverAddress: string, params: {
77
94
  appliId: string;
78
95
  playerMode?: number;
79
96
  userType?: number;
80
97
  roomCode?: string;
81
98
  taskId?: string;
99
+ appKey?: string;
100
+ timestamp?: string;
101
+ signature?: string;
82
102
  }): Promise<StartAppInfo>;
83
103
  static CheckUTLockInfo(config: ILarkSRConfig): Promise<UTLockInfo>;
84
104
  static GetTask(config: ILarkSRConfig, taskid: string): Promise<GetTaskResult>;
@@ -1,7 +1,8 @@
1
1
  import 'core-js/stable/symbol';
2
- import { LarkSR, 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, CreateLarkSRClientFromePXYHost, CreateLarkSRClientFromeAPI, CreateLarkSRClientFromeUrl, 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;
5
6
  CreateLarkSRClientFromeAPI: typeof CreateLarkSRClientFromeAPI;
6
7
  CreateLarkSRClientFromeUrl: typeof CreateLarkSRClientFromeUrl;
7
8
  API: typeof API;
@@ -173,10 +173,12 @@ interface ILarkSRConfig {
173
173
  */
174
174
  rootElement: HTMLElement;
175
175
  /**
176
- * 必选项 服务器地址. LarkServer 前台访问的地址
176
+ * 可选项 服务器地址. LarkServer 前台访问的地址
177
177
  * 如: http://192.168.0.55:8181/
178
+ * 当使用托管服务时服务器地址自动分配,可留空。
179
+ * 使用托管服务时@see CreateLarkSRClientFromePXYHost @see larksr.connectWithPxyHost
178
180
  */
179
- serverAddress: string;
181
+ serverAddress?: string;
180
182
  /**
181
183
  * 可选项。 sdk 授权码。如果不在此处填,则必须在后续的实例里调用 initSDKAuthCode 初始化。
182
184
  */
@@ -266,6 +268,20 @@ interface ILarkSRConfig {
266
268
  */
267
269
  initCursorMode?: boolean;
268
270
  }
271
+ /**
272
+ * 通过平行云托管平台创建客户端并启动应用
273
+ * @param config 传入 config @see ILarkSRConfig
274
+ * @param params 进入应用接口参数。appliId 为必填项
275
+ * @returns Promise 创建 larksr client 是否成功
276
+ */
277
+ export declare function CreateLarkSRClientFromePXYHost(config: ILarkSRConfig, params: {
278
+ appliId: string;
279
+ playerMode?: number;
280
+ userType?: number;
281
+ roomCode?: string;
282
+ taskId?: string;
283
+ nickname?: string;
284
+ }): Promise<LarkSR>;
269
285
  /**
270
286
  * 通过调用后台接口获取云端应用参数
271
287
  * @param config 传入 config @see ILarkSRConfig
@@ -363,7 +379,6 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
363
379
  get rootElement(): HTMLElement;
364
380
  private _rootElement;
365
381
  get serverAddress(): string;
366
- private _serverAddress;
367
382
  get serverIp(): string;
368
383
  get config(): ILarkSRConfig;
369
384
  private _config;
@@ -393,6 +408,13 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
393
408
  * @returns
394
409
  */
395
410
  initSDKAuthCode(id: string): Promise<void>;
411
+ connectWithPxyHost(params: {
412
+ appliId: string;
413
+ playerMode?: number;
414
+ userType?: number;
415
+ roomCode?: string;
416
+ taskId?: string;
417
+ }): Promise<void>;
396
418
  /**
397
419
  * 连接云端渲染资源
398
420
  * @params appID 云端资源的 ID
@@ -405,6 +427,9 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
405
427
  roomCode?: string;
406
428
  taskId?: string;
407
429
  nickname?: string;
430
+ appKey?: string;
431
+ timestamp?: string;
432
+ signature?: string;
408
433
  }): Promise<void>;
409
434
  /**
410
435
  * 手动重设进入应用参数
@@ -3,6 +3,7 @@ import { IAppliParams } from "./appli_params";
3
3
  import { CloudLark } from "./protobuf/cloudlark";
4
4
  import ScaleMode from "./utils/scale_mode";
5
5
  import { LocalEvent, EventBase } from './event/event_base';
6
+ import { LarkSR } from "./larksr";
6
7
  export interface ContainerSize {
7
8
  marginTop: number;
8
9
  marginLeft: number;
@@ -83,7 +84,9 @@ export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEven
83
84
  get isLockMouse(): boolean;
84
85
  private _isLockMouse;
85
86
  get cursorStyle(): SyncCursorStyle;
87
+ set cursorStyle(style: SyncCursorStyle);
86
88
  private _cursorStyle;
89
+ private get cursorCSSStyle();
87
90
  get appMouseMode(): CloudLark.IAppMouseMode;
88
91
  set appMouseMode(mode: CloudLark.IAppMouseMode);
89
92
  private _appMouseMode;
@@ -103,7 +106,8 @@ export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEven
103
106
  private mobileForceLandScape;
104
107
  private bgColor;
105
108
  private handelRootElementSize;
106
- constructor(rootElement: HTMLElement, params: IAppliParams, handelRootElementSize?: boolean);
109
+ private larksr;
110
+ constructor(rootElement: HTMLElement, params: IAppliParams, larksr: LarkSR, handelRootElementSize?: boolean);
107
111
  reset(params: IAppliParams): void;
108
112
  resize(): void;
109
113
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "larksr_websdk",
3
- "version": "3.2.7",
3
+ "version": "3.2.8",
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
@@ -73,12 +73,32 @@ export default class API {
73
73
  static GetTaskPATH: string;
74
74
  static ClientLogErrorPath: string;
75
75
  static GetStartInfoPath: string;
76
+ private static PocHostApplGetUrl;
77
+ static HostAppliGetUrl(params: {
78
+ appliId: string;
79
+ playerMode?: number;
80
+ userType?: number;
81
+ roomCode?: string;
82
+ taskId?: string;
83
+ }): Promise<{
84
+ host: string;
85
+ origin: string;
86
+ params: {
87
+ appliId: string;
88
+ appKey: string;
89
+ timestamp: string;
90
+ signature: string;
91
+ };
92
+ }>;
76
93
  static GetStartInfo(serverAddress: string, params: {
77
94
  appliId: string;
78
95
  playerMode?: number;
79
96
  userType?: number;
80
97
  roomCode?: string;
81
98
  taskId?: string;
99
+ appKey?: string;
100
+ timestamp?: string;
101
+ signature?: string;
82
102
  }): Promise<StartAppInfo>;
83
103
  static CheckUTLockInfo(config: ILarkSRConfig): Promise<UTLockInfo>;
84
104
  static GetTask(config: ILarkSRConfig, taskid: string): Promise<GetTaskResult>;
package/types/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import 'core-js/stable/symbol';
2
- import { LarkSR, 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, CreateLarkSRClientFromePXYHost, CreateLarkSRClientFromeAPI, CreateLarkSRClientFromeUrl, 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;
5
6
  CreateLarkSRClientFromeAPI: typeof CreateLarkSRClientFromeAPI;
6
7
  CreateLarkSRClientFromeUrl: typeof CreateLarkSRClientFromeUrl;
7
8
  API: typeof API;
@@ -76,6 +76,8 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
76
76
  setIce(sdpMlineindex: number, sdpmid: string, candidate: string): void;
77
77
  sendInput(input: Msg.CloudLark.ClientInput): void;
78
78
  sendInputBuffer(buffer: ArrayBuffer): void;
79
+ private sendToWebsocektChannelBuffer;
80
+ private sendToWebsocektChannelMsg;
79
81
  private onChannelOpen;
80
82
  private onClose;
81
83
  private onChannelMsg;
@@ -96,6 +98,9 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
96
98
  retryPeerconnection(): void;
97
99
  private onPeerConnectionDisconnect;
98
100
  private onBadNetwork;
101
+ private onPixelStreamingPlayerList;
102
+ private onPixelStreamingDataChannelState;
103
+ private onPixelStreamingDataChannelData;
99
104
  private onCursorStyle;
100
105
  private onAppResize;
101
106
  private onAppMouseMode;
package/types/larksr.d.ts CHANGED
@@ -173,10 +173,12 @@ interface ILarkSRConfig {
173
173
  */
174
174
  rootElement: HTMLElement;
175
175
  /**
176
- * 必选项 服务器地址. LarkServer 前台访问的地址
176
+ * 可选项 服务器地址. LarkServer 前台访问的地址
177
177
  * 如: http://192.168.0.55:8181/
178
+ * 当使用托管服务时服务器地址自动分配,可留空。
179
+ * 使用托管服务时@see CreateLarkSRClientFromePXYHost @see larksr.connectWithPxyHost
178
180
  */
179
- serverAddress: string;
181
+ serverAddress?: string;
180
182
  /**
181
183
  * 可选项。 sdk 授权码。如果不在此处填,则必须在后续的实例里调用 initSDKAuthCode 初始化。
182
184
  */
@@ -266,6 +268,20 @@ interface ILarkSRConfig {
266
268
  */
267
269
  initCursorMode?: boolean;
268
270
  }
271
+ /**
272
+ * 通过平行云托管平台创建客户端并启动应用
273
+ * @param config 传入 config @see ILarkSRConfig
274
+ * @param params 进入应用接口参数。appliId 为必填项
275
+ * @returns Promise 创建 larksr client 是否成功
276
+ */
277
+ export declare function CreateLarkSRClientFromePXYHost(config: ILarkSRConfig, params: {
278
+ appliId: string;
279
+ playerMode?: number;
280
+ userType?: number;
281
+ roomCode?: string;
282
+ taskId?: string;
283
+ nickname?: string;
284
+ }): Promise<LarkSR>;
269
285
  /**
270
286
  * 通过调用后台接口获取云端应用参数
271
287
  * @param config 传入 config @see ILarkSRConfig
@@ -363,7 +379,6 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
363
379
  get rootElement(): HTMLElement;
364
380
  private _rootElement;
365
381
  get serverAddress(): string;
366
- private _serverAddress;
367
382
  get serverIp(): string;
368
383
  get config(): ILarkSRConfig;
369
384
  private _config;
@@ -393,6 +408,13 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
393
408
  * @returns
394
409
  */
395
410
  initSDKAuthCode(id: string): Promise<void>;
411
+ connectWithPxyHost(params: {
412
+ appliId: string;
413
+ playerMode?: number;
414
+ userType?: number;
415
+ roomCode?: string;
416
+ taskId?: string;
417
+ }): Promise<void>;
396
418
  /**
397
419
  * 连接云端渲染资源
398
420
  * @params appID 云端资源的 ID
@@ -405,6 +427,9 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
405
427
  roomCode?: string;
406
428
  taskId?: string;
407
429
  nickname?: string;
430
+ appKey?: string;
431
+ timestamp?: string;
432
+ signature?: string;
408
433
  }): Promise<void>;
409
434
  /**
410
435
  * 手动重设进入应用参数
@@ -3,10 +3,12 @@ import { LocalEvent, EventBase } from '../event/event_base';
3
3
  import { LarkSR } from '../larksr';
4
4
  export declare const enum OPREATION_EVENT_TYPE {
5
5
  Input = 0,
6
- NoOperationTimeout = 1
6
+ NoOperationTimeout = 1,
7
+ ClipboardText = 2
7
8
  }
8
9
  export interface OperationEvent extends LocalEvent<OPREATION_EVENT_TYPE> {
9
10
  input?: CloudLark.ClientInput;
11
+ data?: any;
10
12
  }
11
13
  export default class Operation extends EventBase<OPREATION_EVENT_TYPE, OperationEvent> {
12
14
  private gestureHandler;