larksr_websdk 3.2.320 → 3.2.323
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/dist/larksr-web-sdk.min.js +1 -1
- package/package.json +2 -1
- package/types/api.d.ts +2 -0
- package/types/index.d.ts +2 -1
- package/types/lark/application.d.ts +2 -1
- package/types/lark/peer_connection.d.ts +3 -2
- package/types/larksr.d.ts +47 -3
- package/types/operation/gesture.d.ts +3 -1
- package/types/operation/gesture_handler.d.ts +37 -0
- package/types/operation/keyboard_handler.d.ts +3 -0
- package/types/operation/operation.d.ts +30 -5
- package/types/utils/capabilities.d.ts +2 -0
- package/types/utils/ios-inner-height.d.ts +4 -0
- package/types/utils/unit.d.ts +0 -5
- package/dist/doc/config.md +0 -145
- package/dist/doc/events.md +0 -139
- package/dist/doc/functions.md +0 -406
- package/dist/doc/index.md +0 -82
- package/dist/doc/member_variables.md +0 -162
- package/dist/doc/sdkid_encryption.md +0 -40
- package/dist/doc/update.md +0 -162
- package/dist/types/api.d.ts +0 -124
- package/dist/types/appli_params.d.ts +0 -289
- package/dist/types/common/cmd.d.ts +0 -28
- package/dist/types/common/constant.d.ts +0 -4
- package/dist/types/common/interface.d.ts +0 -30
- package/dist/types/config.d.ts +0 -59
- package/dist/types/event/event_base.d.ts +0 -11
- package/dist/types/event/iframe_poster.d.ts +0 -9
- package/dist/types/index.d.ts +0 -22
- package/dist/types/lark/Worker.d.ts +0 -0
- package/dist/types/lark/application.d.ts +0 -178
- package/dist/types/lark/custom.d.ts +0 -7
- package/dist/types/lark/ice_candiadate_parser.d.ts +0 -24
- package/dist/types/lark/lark_event_type.d.ts +0 -113
- package/dist/types/lark/message.d.ts +0 -20
- package/dist/types/lark/peer_connection.d.ts +0 -173
- package/dist/types/lark/recoder.d.ts +0 -55
- package/dist/types/lark/sdp_util.d.ts +0 -36
- package/dist/types/lark/test_pixel_streaming.d.ts +0 -54
- package/dist/types/lark/websocket_channel.d.ts +0 -56
- package/dist/types/lark/websocket_proxy.d.ts +0 -56
- package/dist/types/larksr.d.ts +0 -890
- package/dist/types/localization/base.d.ts +0 -8
- package/dist/types/localization/gesture_ins.d.ts +0 -4
- package/dist/types/localization/language.d.ts +0 -6
- package/dist/types/localization/loader.d.ts +0 -14
- package/dist/types/localization/message.d.ts +0 -81
- package/dist/types/localization/ui.d.ts +0 -58
- package/dist/types/operation/gamepad_handler.d.ts +0 -67
- package/dist/types/operation/gesture.d.ts +0 -70
- package/dist/types/operation/gesture_handler.d.ts +0 -16
- package/dist/types/operation/handler_base.d.ts +0 -8
- package/dist/types/operation/keyboard_handler.d.ts +0 -18
- package/dist/types/operation/keymap.d.ts +0 -24
- package/dist/types/operation/letter_keymap.d.ts +0 -8
- package/dist/types/operation/mouse_handler.d.ts +0 -42
- package/dist/types/operation/num_keymap.d.ts +0 -12
- package/dist/types/operation/operation.d.ts +0 -72
- package/dist/types/operation/pixel_streaming_input.d.ts +0 -82
- package/dist/types/operation/touch_handler.d.ts +0 -11
- package/dist/types/operation/utils.d.ts +0 -18
- package/dist/types/protobuf/cloudlark.d.ts +0 -7384
- package/dist/types/screen_state.d.ts +0 -116
- package/dist/types/utils/browser_type.d.ts +0 -37
- package/dist/types/utils/capabilities.d.ts +0 -52
- package/dist/types/utils/full_screen.d.ts +0 -25
- package/dist/types/utils/lock_pointer.d.ts +0 -23
- package/dist/types/utils/log.d.ts +0 -25
- package/dist/types/utils/scale_mode.d.ts +0 -26
- package/dist/types/utils/unit.d.ts +0 -147
package/dist/doc/update.md
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
# 更新
|
|
2
|
-
|
|
3
|
-
## V3.2.30
|
|
4
|
-
|
|
5
|
-
> V3.2.30 仅支持服务端 [V3.2.3.1](https://www.pingxingyun.com/devCenter.html) 以上版本。
|
|
6
|
-
> [老版本 SDK Demo 下载](https://github.com/pingxingyun/lark_sr_websdk_demos/releases/tag/V3.2.10)
|
|
7
|
-
|
|
8
|
-
1. [添加像素流送支持](https://docs.unrealengine.com/4.27/zh-CN/SharingAndReleasing/PixelStreaming/PixelStreamingIntro/)。
|
|
9
|
-
2. 完善安全性, 添加 SDK ID 加密配置。
|
|
10
|
-
3. 移除 CreateLarkSRClientFromePXYHost,CreateLarkSRClientFromeAPI, CreateLarkSRClientFromeUrl 函数。直接使用 `new LarkSR(config: ILarkSRConfig)` 方式创建对象。
|
|
11
|
-
|
|
12
|
-
## V3.2.33
|
|
13
|
-
|
|
14
|
-
1. 添加智能语音相关接口支持
|
|
15
|
-
|
|
16
|
-
LarkSR 对象添加:
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
/**
|
|
20
|
-
* 开始智能语音对话文本输入
|
|
21
|
-
* 应在只能语音为开始状态下开始输入
|
|
22
|
-
* @param text 输入的文本
|
|
23
|
-
* @returns 返回对话 ID
|
|
24
|
-
*/
|
|
25
|
-
public aiDmTextInput(text: string) {
|
|
26
|
-
/**
|
|
27
|
-
* 开始智能语音对话语音输入,自动请求录音权限
|
|
28
|
-
* 应在只能语音为开始状态下开始输入
|
|
29
|
-
* @returns 成功返回对话id,失败返回异常
|
|
30
|
-
*/
|
|
31
|
-
public startAiDmVoiceInput() {
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 停止智能语音输入,通知语音引擎当前用户输入对话结束
|
|
35
|
-
* @returns 返回当前对话的id
|
|
36
|
-
*/
|
|
37
|
-
public stopAiDmVoiceInput() {
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
LarkSR 添加如下事件:
|
|
41
|
-
|
|
42
|
-
```typescript
|
|
43
|
-
larksr.on('aivoicestatus', (e) => {
|
|
44
|
-
// 智能语音服务状态
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
larksr.on('aivoiceasrresult', (e) => {
|
|
48
|
-
// 智能语音转文字识别结果
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
larksr.on('aivoicedmresult', (e) => {
|
|
52
|
-
// 智能语音对话结果
|
|
53
|
-
});
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## V3.2.37
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
/**
|
|
60
|
-
* 设置是否强制横屏显示内容.
|
|
61
|
-
* handelRootElementSize 必须设置为 true 才有作用。
|
|
62
|
-
* 要注意强制横屏模式下网页的坐标系xy和视觉上相反,如果通过外部输入 input 事件。要注意调整
|
|
63
|
-
* @param force 是否强制横屏
|
|
64
|
-
*/
|
|
65
|
-
setMobileForceLandScape(force: boolean): void;
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## V3.2.311
|
|
69
|
-
|
|
70
|
-
新增麦克风输入接口。客户端打开后云端应用可直接通过读取声卡上的麦克风接收到音频。
|
|
71
|
-
|
|
72
|
-
> 该功能匹配的服务端版本最低为 V3.2.51
|
|
73
|
-
> 使用该功能要注意在后台应用管理中开启音频输入功能
|
|
74
|
-
> 注意要在连接成功之后打开媒体设备。即 `mediaPlayed` 之后调用才有效
|
|
75
|
-
|
|
76
|
-
```typescript
|
|
77
|
-
/**
|
|
78
|
-
* 打开一个音频设备,要注意浏览器限制在 https 或者 localhost 下才能打开音频
|
|
79
|
-
* @param deviceId 音频设备id,如果不传将打开默认设备。@see getConnectedAudioinputDevices
|
|
80
|
-
* @returns
|
|
81
|
-
*/
|
|
82
|
-
openAudio(deviceId?: string);
|
|
83
|
-
/**
|
|
84
|
-
* 关闭当前的音频设备
|
|
85
|
-
* @returns
|
|
86
|
-
*/
|
|
87
|
-
closeAudio(): boolean | undefined;
|
|
88
|
-
/**
|
|
89
|
-
* 返回已连接的音频设备列表,设备列表中的设备的 deviceId 可用来打开某个音频设备
|
|
90
|
-
* @returns
|
|
91
|
-
*/
|
|
92
|
-
getConnectedAudioinputDevices(): Promise<MediaDeviceInfo[] | undefined>;
|
|
93
|
-
/**
|
|
94
|
-
* 设置当前已开启的音频track是否启用状态
|
|
95
|
-
* @param enable 是否启用
|
|
96
|
-
* @returns
|
|
97
|
-
*/
|
|
98
|
-
setAudioEnable(enable: boolean): void | undefined;
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
larksr 配置项新增自动打开麦克风配置,在`new LarkSR({ ... 此处省略其他配置 ... audioInputAutoStart: true})` 时传入,
|
|
102
|
-
|
|
103
|
-
> 手动传入的 `audioInputAutoStart` 优先级高于后台配置
|
|
104
|
-
|
|
105
|
-
```javascript
|
|
106
|
-
/**
|
|
107
|
-
* 当启用音频输入功能,是否自动连入音频设备。
|
|
108
|
-
* 默认关闭。
|
|
109
|
-
* 需要注意默认打开的是系统中默认的音频设备。
|
|
110
|
-
*/
|
|
111
|
-
audioInputAutoStart?: boolean;
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## V3.2.319
|
|
115
|
-
|
|
116
|
-
新增视频输入接口。客户端打开后云端应用可直接通过读取服务端的摄像头读取视频数据。
|
|
117
|
-
|
|
118
|
-
> 该功能匹配的服务端版本最低为 V3.2.61
|
|
119
|
-
> 使用该功能要注意在后台应用管理中开启视频输入功能
|
|
120
|
-
> 注意要在连接成功之后打开媒体设备。即 `mediaPlayed` 之后调用才有效
|
|
121
|
-
|
|
122
|
-
```typescript
|
|
123
|
-
/**
|
|
124
|
-
* 打开一个视频设备,要注意浏览器限制在 https 或者 localhost 下才能打开视频
|
|
125
|
-
* @param audio boolean 是否同时开启音频
|
|
126
|
-
* @param cameraId 视频设备id,如果不传将打开默认设备。@see getConnectedVideoinputDevices
|
|
127
|
-
* @returns Promise
|
|
128
|
-
*/
|
|
129
|
-
openVideo(audio?: boolean, cameraId?: string);
|
|
130
|
-
/**
|
|
131
|
-
* 打开默认媒体设备,要注意浏览器限制在 https 或者 localhost 下
|
|
132
|
-
* 如果需要指定特殊的媒体设备请单独使用 @see openAudio @see openVideo
|
|
133
|
-
* @param video 是否包含视频
|
|
134
|
-
* @param audio 是否包含音频
|
|
135
|
-
* @returns Promise
|
|
136
|
-
*/
|
|
137
|
-
openDefaultMedia(video?: boolean, audio?: boolean)>;
|
|
138
|
-
/**
|
|
139
|
-
* 返回已连接的视频设备
|
|
140
|
-
* @returns Promise<MediaDeviceInfo[]>
|
|
141
|
-
*/
|
|
142
|
-
getConnectedVideoinputDevices();
|
|
143
|
-
/**
|
|
144
|
-
* 设置当前已开启的视频track是否启用状态
|
|
145
|
-
* @param enable 是否启用
|
|
146
|
-
* @returns void
|
|
147
|
-
*/
|
|
148
|
-
setVideoEnable(enable: boolean);
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
larksr 配置项新增自动打开视频输入配置,在`new LarkSR({ ... 此处省略其他配置 ... videoInputAutoStart: true})` 时传入
|
|
152
|
-
|
|
153
|
-
> 手动传入的 `videoInputAutoStart` 优先级高于后台配置
|
|
154
|
-
|
|
155
|
-
```javascript
|
|
156
|
-
/**
|
|
157
|
-
* 当启用视频输入功能,是否自动连入视频设备。
|
|
158
|
-
* 默认关闭。
|
|
159
|
-
* 需要注意默认打开的是系统中默认的视频设备。
|
|
160
|
-
*/
|
|
161
|
-
videoInputAutoStart?: boolean;
|
|
162
|
-
```
|
package/dist/types/api.d.ts
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
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
|
-
textInputEventPrompt: number;
|
|
37
|
-
audioInput: number;
|
|
38
|
-
audioInputAutoStart: number;
|
|
39
|
-
videoInput: number;
|
|
40
|
-
videoInputAutoStart: number;
|
|
41
|
-
}
|
|
42
|
-
export interface StartAppInfo {
|
|
43
|
-
appliId: string;
|
|
44
|
-
appliType: number;
|
|
45
|
-
appliName: string;
|
|
46
|
-
taskId: string;
|
|
47
|
-
renderServerIp: string;
|
|
48
|
-
wsProxy: string;
|
|
49
|
-
preferPublicIp: string;
|
|
50
|
-
renderServerPort: number;
|
|
51
|
-
initCursorMode: number;
|
|
52
|
-
rttLimit: string;
|
|
53
|
-
touchOperateMode: string;
|
|
54
|
-
fullScreenMode: number;
|
|
55
|
-
mobileForceLandscape: number;
|
|
56
|
-
mobileFullScreenMode: number;
|
|
57
|
-
language: string;
|
|
58
|
-
noOperationTimeout: string;
|
|
59
|
-
serverId: string;
|
|
60
|
-
network: string;
|
|
61
|
-
playerListToggle: number;
|
|
62
|
-
bgColor: string;
|
|
63
|
-
logLevel: string;
|
|
64
|
-
mobileVirtualJoystick: number;
|
|
65
|
-
initWinSize: number;
|
|
66
|
-
taskStatus: number;
|
|
67
|
-
mouseZoomDirection: number;
|
|
68
|
-
useGamepad: number;
|
|
69
|
-
rttLimitInterval: string;
|
|
70
|
-
playerMode?: number;
|
|
71
|
-
userType?: number;
|
|
72
|
-
roomCode?: string;
|
|
73
|
-
nickName?: string;
|
|
74
|
-
nickname?: string;
|
|
75
|
-
appKey?: string;
|
|
76
|
-
groupId?: string;
|
|
77
|
-
}
|
|
78
|
-
export default class API {
|
|
79
|
-
static CheckUTLockInfoPath: string;
|
|
80
|
-
static GetTaskPATH: string;
|
|
81
|
-
static ClientLogErrorPath: string;
|
|
82
|
-
static GetStartInfoPath: string;
|
|
83
|
-
private static PocHostApplGetUrl;
|
|
84
|
-
private static TaskInfoClientStartedPath;
|
|
85
|
-
private static PortMappingListPath;
|
|
86
|
-
static HostAppliGetUrl(params: {
|
|
87
|
-
appliId: string;
|
|
88
|
-
playerMode?: number;
|
|
89
|
-
userType?: number;
|
|
90
|
-
roomCode?: string;
|
|
91
|
-
taskId?: string;
|
|
92
|
-
}): Promise<{
|
|
93
|
-
host: string;
|
|
94
|
-
origin: string;
|
|
95
|
-
params: {
|
|
96
|
-
appliId: string;
|
|
97
|
-
appKey: string;
|
|
98
|
-
timestamp: string;
|
|
99
|
-
signature: string;
|
|
100
|
-
};
|
|
101
|
-
}>;
|
|
102
|
-
static GetStartInfo(serverAddress: string, params: {
|
|
103
|
-
sdkId: string;
|
|
104
|
-
appliId: string;
|
|
105
|
-
playerMode?: number;
|
|
106
|
-
userType?: number;
|
|
107
|
-
roomCode?: string;
|
|
108
|
-
taskId?: string;
|
|
109
|
-
clientMac?: string;
|
|
110
|
-
groupId?: string;
|
|
111
|
-
regionId?: string;
|
|
112
|
-
targetServerIp?: string;
|
|
113
|
-
appKey?: string;
|
|
114
|
-
timestamp?: string;
|
|
115
|
-
signature?: string;
|
|
116
|
-
} | any): Promise<StartAppInfo>;
|
|
117
|
-
static CheckUTLockInfo(config: ILarkSRConfig): Promise<UTLockInfo>;
|
|
118
|
-
static GetTask(config: ILarkSRConfig, taskid: string): Promise<GetTaskResult>;
|
|
119
|
-
static LogError(errorCode: number, errorMsg: string, params: string, config: ILarkSRConfig): void;
|
|
120
|
-
static ClientInfo(config: ILarkSRConfig, params: AppliParams): void;
|
|
121
|
-
static TaskInfoClientStarted(config: ILarkSRConfig, params: AppliParams): void;
|
|
122
|
-
static PortMappingList(config: ILarkSRConfig): Promise<unknown>;
|
|
123
|
-
static joinParam(params: any): string;
|
|
124
|
-
}
|
|
@@ -1,289 +0,0 @@
|
|
|
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: string;
|
|
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
|
-
preferDecoder: 'auto' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'hevc' | '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
|
-
appKey: string;
|
|
192
|
-
groupId: string;
|
|
193
|
-
textInputEventPrompt: boolean;
|
|
194
|
-
audioInput: boolean;
|
|
195
|
-
audioInputAutoStart: boolean;
|
|
196
|
-
videoInput: boolean;
|
|
197
|
-
videoInputAutoStart: boolean;
|
|
198
|
-
}
|
|
199
|
-
export declare enum AppliType {
|
|
200
|
-
DESKTOP = 1,
|
|
201
|
-
SHARED = 2,
|
|
202
|
-
PIXEL_STREAMING = 13,
|
|
203
|
-
VR = 3,
|
|
204
|
-
VR_STEAM = 5,
|
|
205
|
-
NV_VR = 6,
|
|
206
|
-
XR = 7,
|
|
207
|
-
PXY_AR = 9,
|
|
208
|
-
NV_AR = 11
|
|
209
|
-
}
|
|
210
|
-
export declare class AppliParams implements IAppliParams {
|
|
211
|
-
appServer: string;
|
|
212
|
-
appPort: string;
|
|
213
|
-
appliType: AppliType;
|
|
214
|
-
wsProxy: boolean;
|
|
215
|
-
preferPubOutIp: string;
|
|
216
|
-
taskid: string;
|
|
217
|
-
appliName: string;
|
|
218
|
-
width: number;
|
|
219
|
-
height: number;
|
|
220
|
-
scaleMode: ScaleMode;
|
|
221
|
-
logLevel: 'info' | 'warn' | 'error';
|
|
222
|
-
noOperationTimeout: number;
|
|
223
|
-
waterMark: boolean;
|
|
224
|
-
rttLimit: number;
|
|
225
|
-
packetLostLimit: number;
|
|
226
|
-
rttLimitInterval: number;
|
|
227
|
-
codeRate: number;
|
|
228
|
-
audioCodeRate: number;
|
|
229
|
-
frameRate: number;
|
|
230
|
-
network: 'local' | 'public';
|
|
231
|
-
language: string;
|
|
232
|
-
initCursorMode: boolean;
|
|
233
|
-
bgColor: string;
|
|
234
|
-
fullScreenMode: number;
|
|
235
|
-
mobileFullScreenMode: number;
|
|
236
|
-
playerMode: number;
|
|
237
|
-
userType: number;
|
|
238
|
-
nickname: string;
|
|
239
|
-
roomCode: string;
|
|
240
|
-
debugTask: boolean;
|
|
241
|
-
debugWebServer: string;
|
|
242
|
-
loadingTimeout: number;
|
|
243
|
-
shareUrl: boolean;
|
|
244
|
-
mobileForceLandscape: boolean;
|
|
245
|
-
mobileVirtualJoystick: boolean;
|
|
246
|
-
mouseZoomDirection: number;
|
|
247
|
-
showPlayerList: boolean;
|
|
248
|
-
preferDecoder: 'auto' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'hevc' | 'av1x';
|
|
249
|
-
touchOperateMode: 'touchScreen' | 'mouse';
|
|
250
|
-
appliId: string;
|
|
251
|
-
syncLocalToCloudClipboard: boolean;
|
|
252
|
-
enableRttIcon: boolean;
|
|
253
|
-
enableSoundRequire: boolean;
|
|
254
|
-
toastLevel: number;
|
|
255
|
-
appKey: string;
|
|
256
|
-
groupId: string;
|
|
257
|
-
textInputEventPrompt: boolean;
|
|
258
|
-
audioInput: boolean;
|
|
259
|
-
audioInputAutoStart: boolean;
|
|
260
|
-
videoInput: boolean;
|
|
261
|
-
videoInputAutoStart: boolean;
|
|
262
|
-
static copyAndCreate(params?: IAppliParams): AppliParams;
|
|
263
|
-
static setUpWithSDKConfig(params: IAppliParams, config: ILarkSRConfig): AppliParams;
|
|
264
|
-
}
|
|
265
|
-
export declare function CreateAppliParams(): IAppliParams;
|
|
266
|
-
export declare class AppliParamsUtils {
|
|
267
|
-
static getScaleMode(init: number | null | undefined): string;
|
|
268
|
-
static getNetwork(init: number | null | undefined): 'local' | 'public';
|
|
269
|
-
static getLogLevel(level: string | null | undefined): 'info' | 'warn';
|
|
270
|
-
static getBoolOption(option: string | null | undefined | boolean, emptyValue?: boolean): boolean;
|
|
271
|
-
static getNumberBoolOption(option: string | null | undefined | number, emptyValue?: boolean): boolean;
|
|
272
|
-
static getStringOption(option: string | null | undefined, emptyValue?: string): string;
|
|
273
|
-
static getIntOption(option: string | null | undefined, emptyValue?: number): number;
|
|
274
|
-
static getBgColor(option: string | null | undefined): string;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* WARNING 服务器端返回数据随机性较大,统一在该函数里做兼容处理
|
|
278
|
-
* 服务器端可能随意修改字段名称或值,需要注意测试
|
|
279
|
-
* @param startAppInfo
|
|
280
|
-
* @returns
|
|
281
|
-
*/
|
|
282
|
-
export declare function LoadAppliParamsFromUrl(): IAppliParams;
|
|
283
|
-
/**
|
|
284
|
-
* WARNING 服务器端返回数据随机性较大,统一在该函数里做兼容处理
|
|
285
|
-
* 服务器端可能随意修改字段名称或值,需要注意测试
|
|
286
|
-
* @param startAppInfo
|
|
287
|
-
* @returns
|
|
288
|
-
*/
|
|
289
|
-
export declare function LoadAppliParamsStartAppInfo(startAppInfo: StartAppInfo): IAppliParams;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
declare const enum CMD {
|
|
2
|
-
SESSIONKEY = 1,
|
|
3
|
-
APPSTART = 2,
|
|
4
|
-
VIDEO = 3,
|
|
5
|
-
MOUSE_DOWN = 4,
|
|
6
|
-
MOUSE_UP = 5,
|
|
7
|
-
MOUSE_MOVE = 6,
|
|
8
|
-
KEY_DOWN = 7,
|
|
9
|
-
KEY_UP = 8,
|
|
10
|
-
KEY_PRESS = 9,
|
|
11
|
-
CONNECT_APP_SERVER = 10,
|
|
12
|
-
APP_SERVER_CONNECTED = 11,
|
|
13
|
-
APP_SERVER_CONNECT_FAILED = 12,
|
|
14
|
-
CONNECT_ALREADY_EXIST = 13,
|
|
15
|
-
MOUSE_RIGHT = 14,
|
|
16
|
-
MOUSE_WHEELE = 15,
|
|
17
|
-
WEBRTC_GETICESERVER = 16,
|
|
18
|
-
WEBRTC_GET_REMOTE_ICECANDIDATE = 17,
|
|
19
|
-
WEBRTC_CALL = 18,
|
|
20
|
-
WEBRTC_ADD_ICECANDIDATE = 19,
|
|
21
|
-
WEBRTC_HANGUP = 20,
|
|
22
|
-
WEBRTC_GETDEVICELIST = 21,
|
|
23
|
-
REMOTE_APP_CLOSE = 22,
|
|
24
|
-
MOUSE_BUTTON = 23,
|
|
25
|
-
KEEP_ALIVE = 24,
|
|
26
|
-
REMOTE_APP_COUSOR_CHANGE = 25
|
|
27
|
-
}
|
|
28
|
-
export default CMD;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const VIDEO_ID = "video";
|
|
2
|
-
export declare const IMAGE_CURSOR_ID = "cursorid";
|
|
3
|
-
export declare const EMPTY_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjbQg61aAAAADUlEQVQYV2P4//8/IwAI/QL/+TZZdwAAAABJRU5ErkJggg==";
|
|
4
|
-
export declare const TOKEN_EXPIRED = "TOKEN_EXPIRED";
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export interface Point {
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
}
|
|
5
|
-
export interface Vector {
|
|
6
|
-
x: number;
|
|
7
|
-
y: number;
|
|
8
|
-
startPoint: Point;
|
|
9
|
-
endPoint: Point;
|
|
10
|
-
}
|
|
11
|
-
export interface Stage {
|
|
12
|
-
width: number;
|
|
13
|
-
height: number;
|
|
14
|
-
Position: Point;
|
|
15
|
-
}
|
|
16
|
-
export interface CSSPosition {
|
|
17
|
-
top: number;
|
|
18
|
-
left: number;
|
|
19
|
-
}
|
|
20
|
-
export interface ViewPort {
|
|
21
|
-
width: number;
|
|
22
|
-
height: number;
|
|
23
|
-
}
|
|
24
|
-
export interface Toggle {
|
|
25
|
-
show: boolean;
|
|
26
|
-
}
|
|
27
|
-
export interface OffsetView {
|
|
28
|
-
offsetX: number;
|
|
29
|
-
offsetY: number;
|
|
30
|
-
}
|
package/dist/types/config.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface LocalEvent<E> {
|
|
2
|
-
type: E;
|
|
3
|
-
target?: any;
|
|
4
|
-
}
|
|
5
|
-
export declare type Callback<E> = (e: E, ...params: any[]) => void;
|
|
6
|
-
export declare abstract class EventBase<T, E extends LocalEvent<T>> {
|
|
7
|
-
private listeners;
|
|
8
|
-
on(type: T, callback: Callback<E>, self?: any): void;
|
|
9
|
-
off(type: T, callback: Callback<E>, self?: any): void;
|
|
10
|
-
emit(event: E, ...params: any[]): void;
|
|
11
|
-
}
|