larksr_websdk 3.2.6 → 3.2.7
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.
- package/README.md +32 -24
- package/dist/doc/index.md +43 -3
- package/dist/larksr-web-sdk.min.js +2 -2
- package/dist/types/api.d.ts +1 -0
- package/dist/types/appli_params.d.ts +3 -0
- package/dist/types/larksr.d.ts +27 -3
- package/dist/types/screen_state.d.ts +1 -0
- package/package.json +9 -6
- package/types/api.d.ts +88 -0
- package/types/appli_params.d.ts +263 -0
- package/{dist/types → types}/common/cmd.d.ts +0 -0
- package/{dist/types → types}/common/constant.d.ts +0 -0
- package/{dist/types → types}/common/interface.d.ts +0 -0
- package/types/config.d.ts +59 -0
- package/{dist/types → types}/event/bus.d.ts +0 -0
- package/{dist/types → types}/event/event_base.d.ts +0 -0
- package/{dist/types → types}/event/events.d.ts +0 -0
- package/{dist/types → types}/event/iframe_poster.d.ts +0 -0
- package/{dist/types → types}/event/message.d.ts +0 -0
- package/types/index.d.ts +24 -0
- package/{dist/types → types}/lark/Worker.d.ts +0 -0
- package/{dist/types → types}/lark/application.d.ts +0 -0
- package/{dist/types → types}/lark/custom.d.ts +0 -0
- package/{dist/types → types}/lark/lark_event_type.d.ts +0 -0
- package/{dist/types → types}/lark/message.d.ts +0 -0
- package/{dist/types → types}/lark/peer_connection.d.ts +0 -0
- package/{dist/types → types}/lark/sdp_util.d.ts +0 -0
- package/{dist/types → types}/lark/test_pixel_streaming.d.ts +0 -0
- package/{dist/types → types}/lark/websocket_channel.d.ts +0 -0
- package/{dist/types → types}/lark/websocket_proxy.d.ts +0 -0
- package/types/larksr.d.ts +509 -0
- package/{dist/types → types}/localization/base.d.ts +0 -0
- package/{dist/types → types}/localization/gesture_ins.d.ts +0 -0
- package/{dist/types → types}/localization/language.d.ts +0 -0
- package/{dist/types → types}/localization/loader.d.ts +0 -0
- package/{dist/types → types}/localization/message.d.ts +0 -0
- package/{dist/types → types}/localization/ui.d.ts +0 -0
- package/{dist/types → types}/operation/gamepad_handler.d.ts +0 -0
- package/{dist/types → types}/operation/gesture.d.ts +0 -0
- package/{dist/types → types}/operation/gesture_handler.d.ts +0 -0
- package/{dist/types → types}/operation/handler_base.d.ts +0 -0
- package/{dist/types → types}/operation/keyboard_handler.d.ts +0 -0
- package/{dist/types → types}/operation/keymap.d.ts +0 -0
- package/{dist/types → types}/operation/letter_keymap.d.ts +0 -0
- package/{dist/types → types}/operation/mouse_handler.d.ts +0 -0
- package/{dist/types → types}/operation/num_keymap.d.ts +0 -0
- package/{dist/types → types}/operation/operation.d.ts +0 -0
- package/{dist/types → types}/operation/pixel_streaming_input.d.ts +0 -0
- package/{dist/types → types}/operation/touch_handler.d.ts +0 -0
- package/{dist/types → types}/operation/utils.d.ts +0 -0
- package/{dist/types → types}/protobuf/cloudlark.d.ts +0 -0
- package/{dist/types → types}/protobuf/message.d.ts +0 -0
- package/types/screen_state.d.ts +109 -0
- package/types/sdk_auth.d.ts +11 -0
- /package/{dist/types → types}/utils/browser_type.d.ts +0 -0
- /package/{dist/types → types}/utils/capabilities.d.ts +0 -0
- /package/{dist/types → types}/utils/full_screen.d.ts +0 -0
- /package/{dist/types → types}/utils/lock_pointer.d.ts +0 -0
- /package/{dist/types → types}/utils/log.d.ts +0 -0
- /package/{dist/types → types}/utils/scale_mode.d.ts +0 -0
- /package/{dist/types → types}/utils/unit.d.ts +0 -0
- package/dist/dist.zip +0 -0
package/dist/types/api.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ScaleMode from './utils/scale_mode';
|
|
2
2
|
import { StartAppInfo } from './api';
|
|
3
|
+
import { ILarkSRConfig } from './larksr';
|
|
3
4
|
export interface IAppliParams {
|
|
4
5
|
/**
|
|
5
6
|
* appserver 的ip地址
|
|
@@ -244,6 +245,8 @@ export declare class AppliParams implements IAppliParams {
|
|
|
244
245
|
enableRttIcon: boolean;
|
|
245
246
|
enableSoundRequire: boolean;
|
|
246
247
|
toastLevel: number;
|
|
248
|
+
static copyAndCreate(params?: IAppliParams): AppliParams;
|
|
249
|
+
static setUpWithSDKConfig(params: IAppliParams, config: ILarkSRConfig): AppliParams;
|
|
247
250
|
}
|
|
248
251
|
export declare function CreateAppliParams(): IAppliParams;
|
|
249
252
|
export declare class AppliParamsUtils {
|
package/dist/types/larksr.d.ts
CHANGED
|
@@ -278,6 +278,7 @@ export declare function CreateLarkSRClientFromeAPI(config: ILarkSRConfig, params
|
|
|
278
278
|
userType?: number;
|
|
279
279
|
roomCode?: string;
|
|
280
280
|
taskId?: string;
|
|
281
|
+
nickname?: string;
|
|
281
282
|
}): Promise<LarkSR>;
|
|
282
283
|
/**
|
|
283
284
|
* 通过从url参数中获取云端应用相关参数
|
|
@@ -289,7 +290,7 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
|
|
|
289
290
|
/**
|
|
290
291
|
* 应用参数,构建时传入
|
|
291
292
|
*/
|
|
292
|
-
get params():
|
|
293
|
+
get params(): AppliParams;
|
|
293
294
|
private _params;
|
|
294
295
|
/**
|
|
295
296
|
* 当前的玩家模式,
|
|
@@ -383,17 +384,36 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
|
|
|
383
384
|
* 注意,如果手动创建该类,要清楚参数的意义,一般只有调试等特殊情况才手动创建该类
|
|
384
385
|
* @see CreateLarkSRClientFromeAPI, CreateLarkSRClientFromeUrl
|
|
385
386
|
* @param config 本地配置,如果有 IAppliParams 相同的配置项,优先级最高
|
|
386
|
-
* @param params 云端应用参数等,通过后台接口或者url参数获取。
|
|
387
|
+
* @param params [可选参数] 云端应用参数等,通过后台接口或者url参数获取。
|
|
387
388
|
*/
|
|
388
|
-
constructor(config: ILarkSRConfig, params
|
|
389
|
+
constructor(config: ILarkSRConfig, params?: IAppliParams);
|
|
389
390
|
/**
|
|
390
391
|
*
|
|
391
392
|
* @param id sdk id 初始化sdkid
|
|
392
393
|
* @returns
|
|
393
394
|
*/
|
|
394
395
|
initSDKAuthCode(id: string): Promise<void>;
|
|
396
|
+
/**
|
|
397
|
+
* 连接云端渲染资源
|
|
398
|
+
* @params appID 云端资源的 ID
|
|
399
|
+
* @returns Promise 调用接口并校验授权通过返回成功并自动开始连接
|
|
400
|
+
*/
|
|
401
|
+
connect(params: {
|
|
402
|
+
appliId: string;
|
|
403
|
+
playerMode?: number;
|
|
404
|
+
userType?: number;
|
|
405
|
+
roomCode?: string;
|
|
406
|
+
taskId?: string;
|
|
407
|
+
nickname?: string;
|
|
408
|
+
}): Promise<void>;
|
|
409
|
+
/**
|
|
410
|
+
* 手动重设进入应用参数
|
|
411
|
+
* @param params
|
|
412
|
+
*/
|
|
413
|
+
setAppliParams(params: IAppliParams): void;
|
|
395
414
|
/**
|
|
396
415
|
* 开始云渲染流程
|
|
416
|
+
* 启动时应用参数不能为空,包括 taskID,appServer,appPort
|
|
397
417
|
* @returns 是否成功。主要校验授权码是否成功
|
|
398
418
|
*/
|
|
399
419
|
start(): Promise<void>;
|
|
@@ -405,6 +425,10 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
|
|
|
405
425
|
* 重新启动云端应用
|
|
406
426
|
*/
|
|
407
427
|
restartApp(): void;
|
|
428
|
+
/**
|
|
429
|
+
* 主动关闭连接
|
|
430
|
+
*/
|
|
431
|
+
close(): void;
|
|
408
432
|
/**
|
|
409
433
|
* 切换当前操作者
|
|
410
434
|
* @param uid 用户id
|
|
@@ -104,5 +104,6 @@ export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEven
|
|
|
104
104
|
private bgColor;
|
|
105
105
|
private handelRootElementSize;
|
|
106
106
|
constructor(rootElement: HTMLElement, params: IAppliParams, handelRootElementSize?: boolean);
|
|
107
|
+
reset(params: IAppliParams): void;
|
|
107
108
|
resize(): void;
|
|
108
109
|
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "larksr_websdk",
|
|
3
|
-
"version": "3.2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.2.7",
|
|
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",
|
|
7
7
|
"larksr",
|
|
8
8
|
"cloudrendeing",
|
|
9
9
|
"webrtc",
|
|
10
|
-
"cloudxr"
|
|
10
|
+
"cloudxr",
|
|
11
|
+
"pixelstreaming"
|
|
11
12
|
],
|
|
12
13
|
"main": "./dist/larksr-web-sdk.min.js",
|
|
13
|
-
"types": "./
|
|
14
|
+
"types": "./types/index.d.ts",
|
|
14
15
|
"files": [
|
|
15
|
-
"dist"
|
|
16
|
+
"dist",
|
|
17
|
+
"types",
|
|
18
|
+
"doc,"
|
|
16
19
|
],
|
|
17
20
|
"scripts": {
|
|
18
21
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -20,7 +23,7 @@
|
|
|
20
23
|
"build": "webpack --config webpack.config.js",
|
|
21
24
|
"build:typings": "tsc --build tsconfig.type.json",
|
|
22
25
|
"copy-dts": "copyfiles -u 1 \"src/**/*.d.ts\" dist/types/",
|
|
23
|
-
"dist": "webpack --config webpack.config.js && copyfiles -u 1 \"src/**/*.d.ts\"
|
|
26
|
+
"dist": "webpack --config webpack.config.js && copyfiles -u 1 \"src/**/*.d.ts\" ./types/ && copyfiles -u 1 \"doc/*\" dist/doc/ && copyfiles -u 1 \"types/*\" ./dist/types/"
|
|
24
27
|
},
|
|
25
28
|
"author": "fcx@pingxingyun.com",
|
|
26
29
|
"license": "ISC",
|
package/types/api.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ILarkSRConfig } from './larksr';
|
|
2
|
+
import { AppliParams } from './appli_params';
|
|
3
|
+
export interface UTLockInfo {
|
|
4
|
+
checkUtLockMessage: string;
|
|
5
|
+
checkUtLockResult: boolean;
|
|
6
|
+
remainMinutes: number;
|
|
7
|
+
}
|
|
8
|
+
export interface GetTaskResult {
|
|
9
|
+
adminViewer: number;
|
|
10
|
+
appKey: string;
|
|
11
|
+
appliId: string;
|
|
12
|
+
appliType: number;
|
|
13
|
+
city: string;
|
|
14
|
+
clientIp: string;
|
|
15
|
+
country: string;
|
|
16
|
+
createDate: string;
|
|
17
|
+
dcs: number;
|
|
18
|
+
limitMaxFps: number;
|
|
19
|
+
offScreen: number;
|
|
20
|
+
playerListToggle: number;
|
|
21
|
+
playerMode: number;
|
|
22
|
+
province: string;
|
|
23
|
+
publicIp: string;
|
|
24
|
+
reserveFlag: number;
|
|
25
|
+
serverId: string;
|
|
26
|
+
serverIp: string;
|
|
27
|
+
shareUrl: string;
|
|
28
|
+
startAt: string;
|
|
29
|
+
startParam: string;
|
|
30
|
+
startProcType: number;
|
|
31
|
+
status: number;
|
|
32
|
+
taskId: string;
|
|
33
|
+
updateDate: string;
|
|
34
|
+
useGamepad: number;
|
|
35
|
+
wm: number;
|
|
36
|
+
}
|
|
37
|
+
export interface StartAppInfo {
|
|
38
|
+
appliId: string;
|
|
39
|
+
appliType: number;
|
|
40
|
+
appliName: string;
|
|
41
|
+
taskId: string;
|
|
42
|
+
renderServerIp: string;
|
|
43
|
+
wsProxy: string;
|
|
44
|
+
preferPublicIp: string;
|
|
45
|
+
renderServerPort: number;
|
|
46
|
+
initCursorMode: number;
|
|
47
|
+
rttLimit: string;
|
|
48
|
+
touchOperateMode: string;
|
|
49
|
+
fullScreenMode: number;
|
|
50
|
+
mobileForceLandscape: number;
|
|
51
|
+
mobileFullScreenMode: number;
|
|
52
|
+
language: string;
|
|
53
|
+
noOperationTimeout: string;
|
|
54
|
+
serverId: string;
|
|
55
|
+
network: string;
|
|
56
|
+
playerListToggle: number;
|
|
57
|
+
bgColor: string;
|
|
58
|
+
logLevel: string;
|
|
59
|
+
mobileVirtualJoystick: number;
|
|
60
|
+
initWinSize: number;
|
|
61
|
+
taskStatus: number;
|
|
62
|
+
mouseZoomDirection: number;
|
|
63
|
+
useGamepad: number;
|
|
64
|
+
rttLimitInterval: string;
|
|
65
|
+
playerMode?: number;
|
|
66
|
+
userType?: number;
|
|
67
|
+
roomCode?: string;
|
|
68
|
+
nickName?: string;
|
|
69
|
+
nickname?: string;
|
|
70
|
+
}
|
|
71
|
+
export default class API {
|
|
72
|
+
static CheckUTLockInfoPath: string;
|
|
73
|
+
static GetTaskPATH: string;
|
|
74
|
+
static ClientLogErrorPath: string;
|
|
75
|
+
static GetStartInfoPath: string;
|
|
76
|
+
static GetStartInfo(serverAddress: string, params: {
|
|
77
|
+
appliId: string;
|
|
78
|
+
playerMode?: number;
|
|
79
|
+
userType?: number;
|
|
80
|
+
roomCode?: string;
|
|
81
|
+
taskId?: string;
|
|
82
|
+
}): Promise<StartAppInfo>;
|
|
83
|
+
static CheckUTLockInfo(config: ILarkSRConfig): Promise<UTLockInfo>;
|
|
84
|
+
static GetTask(config: ILarkSRConfig, taskid: string): Promise<GetTaskResult>;
|
|
85
|
+
static LogError(errorCode: number, errorMsg: string, params: string, config: ILarkSRConfig): void;
|
|
86
|
+
static ClientInfo(config: ILarkSRConfig, params: AppliParams): void;
|
|
87
|
+
static joinParam(params: any): string;
|
|
88
|
+
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import ScaleMode from './utils/scale_mode';
|
|
2
|
+
import { StartAppInfo } from './api';
|
|
3
|
+
import { ILarkSRConfig } from './larksr';
|
|
4
|
+
export interface IAppliParams {
|
|
5
|
+
/**
|
|
6
|
+
* appserver 的ip地址
|
|
7
|
+
*/
|
|
8
|
+
appServer: string;
|
|
9
|
+
/**
|
|
10
|
+
* appserver 的端口号
|
|
11
|
+
*/
|
|
12
|
+
appPort: string;
|
|
13
|
+
/**
|
|
14
|
+
* appli type
|
|
15
|
+
*/
|
|
16
|
+
appliType: number;
|
|
17
|
+
/**
|
|
18
|
+
* 是否使用 websocket 代理
|
|
19
|
+
*/
|
|
20
|
+
wsProxy: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 优先使用的外网ip. 用在webrtc ice处替换为高优先级的ip
|
|
23
|
+
*/
|
|
24
|
+
preferPubOutIp: string;
|
|
25
|
+
/**
|
|
26
|
+
* taskid
|
|
27
|
+
*/
|
|
28
|
+
taskid: string;
|
|
29
|
+
/**
|
|
30
|
+
* 当前应用名称
|
|
31
|
+
*/
|
|
32
|
+
appliName: string;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated
|
|
35
|
+
* 应用的宽高。现在云端自动获取宽高
|
|
36
|
+
*/
|
|
37
|
+
width: number;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated
|
|
40
|
+
* 应用的宽高。现在云端自动获取宽高
|
|
41
|
+
*/
|
|
42
|
+
height: number;
|
|
43
|
+
/**
|
|
44
|
+
* 缩放模式
|
|
45
|
+
*/
|
|
46
|
+
scaleMode: ScaleMode;
|
|
47
|
+
/**
|
|
48
|
+
* 日志级别
|
|
49
|
+
* @default 'warn'
|
|
50
|
+
*/
|
|
51
|
+
logLevel: 'info' | 'warn' | 'error';
|
|
52
|
+
/**
|
|
53
|
+
* 无操作时间。超时断开连接.
|
|
54
|
+
*/
|
|
55
|
+
noOperationTimeout: number;
|
|
56
|
+
/**
|
|
57
|
+
* 是否显示右下角的水印。
|
|
58
|
+
*/
|
|
59
|
+
waterMark: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* 检测的rtt值,rtt超过该值将提示用户网络环境差
|
|
62
|
+
*/
|
|
63
|
+
rttLimit: number;
|
|
64
|
+
/**
|
|
65
|
+
* 检测的丢包率。丢包率超过该值提示用户网络环境差
|
|
66
|
+
*/
|
|
67
|
+
packetLostLimit: number;
|
|
68
|
+
/**
|
|
69
|
+
* 丢包率和rtt提示的时间间隔。
|
|
70
|
+
*/
|
|
71
|
+
rttLimitInterval: number;
|
|
72
|
+
/**
|
|
73
|
+
* 码率. 用在在创建 webrtc sdp时替换为此码率。
|
|
74
|
+
*/
|
|
75
|
+
codeRate: number;
|
|
76
|
+
/**
|
|
77
|
+
* audio code rate
|
|
78
|
+
* https://stackoverflow.com/questions/33649283/how-to-set-up-sdp-for-high-quality-opus-audio
|
|
79
|
+
* a=fmtp:111 minptime=10;useinbandfec=1; stereo=1; maxaveragebitrate=510000
|
|
80
|
+
*/
|
|
81
|
+
audioCodeRate: number;
|
|
82
|
+
/**
|
|
83
|
+
* 帧率,在登录task时传给后端。
|
|
84
|
+
*/
|
|
85
|
+
frameRate: number;
|
|
86
|
+
/**
|
|
87
|
+
* 网络状态,影响 webrtc offer 创建时最低码率。
|
|
88
|
+
*/
|
|
89
|
+
network: 'local' | 'public';
|
|
90
|
+
/**
|
|
91
|
+
* 使用的语言,目前只支持英语和中文。
|
|
92
|
+
*/
|
|
93
|
+
language: string;
|
|
94
|
+
/**
|
|
95
|
+
* 初始的鼠标锁定模式
|
|
96
|
+
* false:非锁定模式
|
|
97
|
+
* true:锁定模式
|
|
98
|
+
*/
|
|
99
|
+
initCursorMode: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* 背景颜色
|
|
102
|
+
*/
|
|
103
|
+
bgColor: string;
|
|
104
|
+
/**
|
|
105
|
+
* 全屏模式
|
|
106
|
+
* 0 -》 用户手动触发
|
|
107
|
+
* 1 -》 首次点击进入触发
|
|
108
|
+
* 2 -》 每次点击触发
|
|
109
|
+
*/
|
|
110
|
+
fullScreenMode: number;
|
|
111
|
+
/**
|
|
112
|
+
* 手机端全屏模式
|
|
113
|
+
* 0 -》 用户手动触发
|
|
114
|
+
* 1 -》 首次点击进入触发
|
|
115
|
+
* 2 -》 每次点击触发
|
|
116
|
+
*/
|
|
117
|
+
mobileFullScreenMode: number;
|
|
118
|
+
/**
|
|
119
|
+
* 一人操作多人看 0 普通模式 1 交互模式(可以一人操作多人看)
|
|
120
|
+
* 2 多人互动模式,鼠标键盘都放开
|
|
121
|
+
*/
|
|
122
|
+
playerMode: number;
|
|
123
|
+
/**
|
|
124
|
+
* 用户类型 number
|
|
125
|
+
* 所有者:1 观察者:0;
|
|
126
|
+
*/
|
|
127
|
+
userType: number;
|
|
128
|
+
/**
|
|
129
|
+
* 用户昵称
|
|
130
|
+
*/
|
|
131
|
+
nickname: string;
|
|
132
|
+
/**
|
|
133
|
+
* 口令:8位唯一码,写入TaskInfo. 房间code,备用。
|
|
134
|
+
*/
|
|
135
|
+
roomCode: number;
|
|
136
|
+
/**
|
|
137
|
+
* debug task. 跳过task检测
|
|
138
|
+
*/
|
|
139
|
+
debugTask: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* debug webserver
|
|
142
|
+
*/
|
|
143
|
+
debugWebServer: string;
|
|
144
|
+
/**
|
|
145
|
+
* laoding timeout
|
|
146
|
+
* 5 * 60
|
|
147
|
+
*/
|
|
148
|
+
loadingTimeout: number;
|
|
149
|
+
/**
|
|
150
|
+
* share url
|
|
151
|
+
*/
|
|
152
|
+
shareUrl: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* 是否强制横屏
|
|
155
|
+
*/
|
|
156
|
+
mobileForceLandscape: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* 移动端初始化初始化是否显示手柄
|
|
159
|
+
*/
|
|
160
|
+
mobileVirtualJoystick: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* mouseZoomDirection
|
|
163
|
+
* 用于移动端捏合缩放操作与应用鼠标缩放的对应关系
|
|
164
|
+
* 1:鼠标滚轮向上为放大,
|
|
165
|
+
* 0:鼠标滚轮向下为放大(default)
|
|
166
|
+
*/
|
|
167
|
+
mouseZoomDirection: number;
|
|
168
|
+
/**
|
|
169
|
+
* 初始是否显示玩家列表
|
|
170
|
+
*/
|
|
171
|
+
showPlayerList: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* 优先使用的解码器
|
|
174
|
+
*/
|
|
175
|
+
perferDecoder: 'auto' | 'vp8' | 'vp9' | 'h264' | 'av1x';
|
|
176
|
+
/**
|
|
177
|
+
* 触摸操作对应的操作方式,触摸屏还是鼠标
|
|
178
|
+
*/
|
|
179
|
+
touchOperateMode: 'touchScreen' | 'mouse';
|
|
180
|
+
/**
|
|
181
|
+
* appid
|
|
182
|
+
*/
|
|
183
|
+
appliId: string;
|
|
184
|
+
/**
|
|
185
|
+
*
|
|
186
|
+
*/
|
|
187
|
+
syncLocalToCloudClipboard: boolean;
|
|
188
|
+
enableRttIcon: boolean;
|
|
189
|
+
enableSoundRequire: boolean;
|
|
190
|
+
toastLevel: number;
|
|
191
|
+
}
|
|
192
|
+
export declare enum AppliType {
|
|
193
|
+
DESKTOP = 1,
|
|
194
|
+
SHARED = 2,
|
|
195
|
+
PIXEL_STREAMING = 13,
|
|
196
|
+
VR = 3,
|
|
197
|
+
VR_STEAM = 5,
|
|
198
|
+
NV_VR = 6,
|
|
199
|
+
XR = 7,
|
|
200
|
+
PXY_AR = 9,
|
|
201
|
+
NV_AR = 11
|
|
202
|
+
}
|
|
203
|
+
export declare class AppliParams implements IAppliParams {
|
|
204
|
+
appServer: string;
|
|
205
|
+
appPort: string;
|
|
206
|
+
appliType: AppliType;
|
|
207
|
+
wsProxy: boolean;
|
|
208
|
+
preferPubOutIp: string;
|
|
209
|
+
taskid: string;
|
|
210
|
+
appliName: string;
|
|
211
|
+
width: number;
|
|
212
|
+
height: number;
|
|
213
|
+
scaleMode: ScaleMode;
|
|
214
|
+
logLevel: 'info' | 'warn' | 'error';
|
|
215
|
+
noOperationTimeout: number;
|
|
216
|
+
waterMark: boolean;
|
|
217
|
+
rttLimit: number;
|
|
218
|
+
packetLostLimit: number;
|
|
219
|
+
rttLimitInterval: number;
|
|
220
|
+
codeRate: number;
|
|
221
|
+
audioCodeRate: number;
|
|
222
|
+
frameRate: number;
|
|
223
|
+
network: 'local' | 'public';
|
|
224
|
+
language: string;
|
|
225
|
+
initCursorMode: boolean;
|
|
226
|
+
bgColor: string;
|
|
227
|
+
fullScreenMode: number;
|
|
228
|
+
mobileFullScreenMode: number;
|
|
229
|
+
playerMode: number;
|
|
230
|
+
userType: number;
|
|
231
|
+
nickname: string;
|
|
232
|
+
roomCode: number;
|
|
233
|
+
debugTask: boolean;
|
|
234
|
+
debugWebServer: string;
|
|
235
|
+
loadingTimeout: number;
|
|
236
|
+
shareUrl: boolean;
|
|
237
|
+
mobileForceLandscape: boolean;
|
|
238
|
+
mobileVirtualJoystick: boolean;
|
|
239
|
+
mouseZoomDirection: number;
|
|
240
|
+
showPlayerList: boolean;
|
|
241
|
+
perferDecoder: 'auto' | 'vp8' | 'vp9' | 'h264' | 'av1x';
|
|
242
|
+
touchOperateMode: 'touchScreen' | 'mouse';
|
|
243
|
+
appliId: string;
|
|
244
|
+
syncLocalToCloudClipboard: boolean;
|
|
245
|
+
enableRttIcon: boolean;
|
|
246
|
+
enableSoundRequire: boolean;
|
|
247
|
+
toastLevel: number;
|
|
248
|
+
static copyAndCreate(params?: IAppliParams): AppliParams;
|
|
249
|
+
static setUpWithSDKConfig(params: IAppliParams, config: ILarkSRConfig): AppliParams;
|
|
250
|
+
}
|
|
251
|
+
export declare function CreateAppliParams(): IAppliParams;
|
|
252
|
+
export declare class AppliParamsUtils {
|
|
253
|
+
static getScaleMode(init: number | null | undefined): string;
|
|
254
|
+
static getNetwork(init: number | null | undefined): 'local' | 'public';
|
|
255
|
+
static getLogLevel(level: string | null | undefined): 'info' | 'warn';
|
|
256
|
+
static getBoolOption(option: string | null | undefined | boolean, emptyValue?: boolean): boolean;
|
|
257
|
+
static getNumberBoolOption(option: string | null | undefined | number, emptyValue?: boolean): boolean;
|
|
258
|
+
static getStringOption(option: string | null | undefined, emptyValue?: string): string;
|
|
259
|
+
static getIntOption(option: string | null | undefined, emptyValue?: number): number;
|
|
260
|
+
static getBgColor(option: string | null | undefined): string;
|
|
261
|
+
}
|
|
262
|
+
export declare function LoadAppliParamsFromUrl(): IAppliParams;
|
|
263
|
+
export declare function LoadAppliParamsStartAppInfo(startAppInfo: StartAppInfo): IAppliParams;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import ScaleModel from './utils/scale_mode';
|
|
2
|
+
export default class Config {
|
|
3
|
+
static BuildType: 'local' | 'public';
|
|
4
|
+
static LocalHomepagePath: string;
|
|
5
|
+
/**
|
|
6
|
+
*/
|
|
7
|
+
static VersionMarjor: number;
|
|
8
|
+
static VersionMinorr: number;
|
|
9
|
+
static VersionRevise: number;
|
|
10
|
+
static VersionBuild: number;
|
|
11
|
+
/**
|
|
12
|
+
* webrtc 断开连接重试次数
|
|
13
|
+
*/
|
|
14
|
+
static RetryTime: number;
|
|
15
|
+
/**
|
|
16
|
+
* design width/height
|
|
17
|
+
* TODO reset with 0. check with render server.
|
|
18
|
+
*/
|
|
19
|
+
static OriginW: number;
|
|
20
|
+
static OriginH: number;
|
|
21
|
+
/**
|
|
22
|
+
* 默认码率从应用服务器接收码率
|
|
23
|
+
*/
|
|
24
|
+
static CodeRate: number;
|
|
25
|
+
static AudioCodeRate: number;
|
|
26
|
+
static FrameRate: number;
|
|
27
|
+
/**
|
|
28
|
+
* default scale mode. 以应用原始尺寸的缩放
|
|
29
|
+
*/
|
|
30
|
+
static ScaleMode: ScaleModel;
|
|
31
|
+
/**
|
|
32
|
+
* default net work.
|
|
33
|
+
*/
|
|
34
|
+
static Network: 'local' | 'public';
|
|
35
|
+
/**
|
|
36
|
+
* 鼠标模式
|
|
37
|
+
* 0 == 相对
|
|
38
|
+
* 1 == 绝对
|
|
39
|
+
*/
|
|
40
|
+
static MouseMode: number;
|
|
41
|
+
/**
|
|
42
|
+
* replace server ip for aws
|
|
43
|
+
*/
|
|
44
|
+
static ForceIceAddr: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* 禁用 VPX
|
|
47
|
+
*/
|
|
48
|
+
static DisableVPX: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* 是否启用相对鼠标移动虚拟摇杆
|
|
51
|
+
*/
|
|
52
|
+
static RelativeMouseMove: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* 虚拟摇杆精度
|
|
55
|
+
*/
|
|
56
|
+
static VirtualRackerScale: number;
|
|
57
|
+
static ErrChromeAndroidVersion: string[];
|
|
58
|
+
static DownloadChromium: string;
|
|
59
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
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";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
LarkSR: typeof LarkSR;
|
|
5
|
+
CreateLarkSRClientFromeAPI: typeof CreateLarkSRClientFromeAPI;
|
|
6
|
+
CreateLarkSRClientFromeUrl: typeof CreateLarkSRClientFromeUrl;
|
|
7
|
+
API: typeof API;
|
|
8
|
+
AppliParams: typeof AppliParams;
|
|
9
|
+
LoadAppliParamsFromUrl: typeof LoadAppliParamsFromUrl;
|
|
10
|
+
AppliParamsUtils: typeof AppliParamsUtils;
|
|
11
|
+
LoadAppliParamsStartAppInfo: typeof LoadAppliParamsStartAppInfo;
|
|
12
|
+
EventBase: typeof EventBase;
|
|
13
|
+
ScaleMode: typeof ScaleMode;
|
|
14
|
+
Capabilities: typeof Capabilities;
|
|
15
|
+
CloudLark: typeof CloudLark;
|
|
16
|
+
FullScreen: typeof FullScreen;
|
|
17
|
+
LockPointer: typeof LockPointer;
|
|
18
|
+
Operation: typeof Operation;
|
|
19
|
+
LarkSRClientEvent: typeof LarkSRClientEvent;
|
|
20
|
+
LarkEventType: typeof LarkEventType;
|
|
21
|
+
KEYMAP: import("./operation/keymap").VritualKeyMapOptions;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
24
|
+
export { ILarkSRConfig, PlayerModeType, UserType, LarkSREvent, };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|