larksr_websdk 3.2.339 → 3.2.340
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/package.json +1 -1
- package/dist/doc/config.md +0 -222
- package/dist/doc/event_codes.md +0 -286
- package/dist/doc/events.md +0 -229
- package/dist/doc/functions.md +0 -603
- package/dist/doc/index.md +0 -83
- package/dist/doc/member_variables.md +0 -407
- package/dist/doc/sdkid_encryption.md +0 -40
- package/dist/doc/update.md +0 -447
- package/dist/types/api.d.ts +0 -132
- package/dist/types/appli_params.d.ts +0 -298
- 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 -23
- package/dist/types/lark/Worker.d.ts +0 -0
- package/dist/types/lark/application.d.ts +0 -189
- 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 -114
- package/dist/types/lark/media_share_interface.d.ts +0 -46
- package/dist/types/lark/message.d.ts +0 -22
- package/dist/types/lark/peer_connection.d.ts +0 -188
- package/dist/types/lark/peer_connection_media_share.d.ts +0 -100
- 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 -57
- package/dist/types/lark/websocket_proxy.d.ts +0 -56
- package/dist/types/larksr.d.ts +0 -1226
- 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 -60
- package/dist/types/operation/gamepad_handler.d.ts +0 -67
- package/dist/types/operation/gesture.d.ts +0 -72
- package/dist/types/operation/gesture_handler.d.ts +0 -53
- package/dist/types/operation/handler_base.d.ts +0 -8
- package/dist/types/operation/keyboard_handler.d.ts +0 -21
- 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 -97
- 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 -8095
- package/dist/types/screen_state.d.ts +0 -118
- package/dist/types/utils/browser_type.d.ts +0 -37
- package/dist/types/utils/capabilities.d.ts +0 -54
- package/dist/types/utils/full_screen.d.ts +0 -25
- package/dist/types/utils/ios-inner-height.d.ts +0 -4
- 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 -148
- package/types/lark/custom.d.ts +0 -7
- package/types/protobuf/cloudlark.d.ts +0 -8095
- package/types/utils/ios-inner-height.d.ts +0 -4
|
@@ -1,298 +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
|
-
* 渲染服务器 ssl 端口号
|
|
15
|
-
*/
|
|
16
|
-
renderSSLServerPort: string;
|
|
17
|
-
/**
|
|
18
|
-
* appli type
|
|
19
|
-
*/
|
|
20
|
-
appliType: number;
|
|
21
|
-
/**
|
|
22
|
-
* 是否使用 websocket 代理
|
|
23
|
-
*/
|
|
24
|
-
wsProxy: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* 优先使用的外网ip. 用在webrtc ice处替换为高优先级的ip
|
|
27
|
-
*/
|
|
28
|
-
preferPubOutIp: string;
|
|
29
|
-
/**
|
|
30
|
-
* taskid
|
|
31
|
-
*/
|
|
32
|
-
taskid: string;
|
|
33
|
-
/**
|
|
34
|
-
* 当前应用名称
|
|
35
|
-
*/
|
|
36
|
-
appliName: string;
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated
|
|
39
|
-
* 应用的宽高。现在云端自动获取宽高
|
|
40
|
-
*/
|
|
41
|
-
width: number;
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated
|
|
44
|
-
* 应用的宽高。现在云端自动获取宽高
|
|
45
|
-
*/
|
|
46
|
-
height: number;
|
|
47
|
-
/**
|
|
48
|
-
* 缩放模式
|
|
49
|
-
*/
|
|
50
|
-
scaleMode: ScaleMode;
|
|
51
|
-
/**
|
|
52
|
-
* 日志级别
|
|
53
|
-
* @default 'warn'
|
|
54
|
-
*/
|
|
55
|
-
logLevel: 'info' | 'warn' | 'error';
|
|
56
|
-
/**
|
|
57
|
-
* 无操作时间。超时断开连接.
|
|
58
|
-
*/
|
|
59
|
-
noOperationTimeout: number;
|
|
60
|
-
/**
|
|
61
|
-
* 是否显示右下角的水印。
|
|
62
|
-
*/
|
|
63
|
-
waterMark: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* 检测的rtt值,rtt超过该值将提示用户网络环境差
|
|
66
|
-
*/
|
|
67
|
-
rttLimit: number;
|
|
68
|
-
/**
|
|
69
|
-
* 检测的丢包率。丢包率超过该值提示用户网络环境差
|
|
70
|
-
*/
|
|
71
|
-
packetLostLimit: number;
|
|
72
|
-
/**
|
|
73
|
-
* 丢包率和rtt提示的时间间隔。
|
|
74
|
-
*/
|
|
75
|
-
rttLimitInterval: number;
|
|
76
|
-
/**
|
|
77
|
-
* 码率. 用在在创建 webrtc sdp时替换为此码率。
|
|
78
|
-
*/
|
|
79
|
-
codeRate: number;
|
|
80
|
-
/**
|
|
81
|
-
* audio code rate
|
|
82
|
-
* https://stackoverflow.com/questions/33649283/how-to-set-up-sdp-for-high-quality-opus-audio
|
|
83
|
-
* a=fmtp:111 minptime=10;useinbandfec=1; stereo=1; maxaveragebitrate=510000
|
|
84
|
-
*/
|
|
85
|
-
audioCodeRate: number;
|
|
86
|
-
/**
|
|
87
|
-
* 帧率,在登录task时传给后端。
|
|
88
|
-
*/
|
|
89
|
-
frameRate: number;
|
|
90
|
-
/**
|
|
91
|
-
* 网络状态,影响 webrtc offer 创建时最低码率。
|
|
92
|
-
*/
|
|
93
|
-
network: 'local' | 'public';
|
|
94
|
-
/**
|
|
95
|
-
* 使用的语言,目前只支持英语和中文。
|
|
96
|
-
*/
|
|
97
|
-
language: string;
|
|
98
|
-
/**
|
|
99
|
-
* 初始的鼠标锁定模式
|
|
100
|
-
* false:非锁定模式
|
|
101
|
-
* true:锁定模式
|
|
102
|
-
*/
|
|
103
|
-
initCursorMode: boolean;
|
|
104
|
-
/**
|
|
105
|
-
* 背景颜色
|
|
106
|
-
*/
|
|
107
|
-
bgColor: string;
|
|
108
|
-
/**
|
|
109
|
-
* 全屏模式
|
|
110
|
-
* 0 -》 用户手动触发
|
|
111
|
-
* 1 -》 首次点击进入触发
|
|
112
|
-
* 2 -》 每次点击触发
|
|
113
|
-
*/
|
|
114
|
-
fullScreenMode: number;
|
|
115
|
-
/**
|
|
116
|
-
* 手机端全屏模式
|
|
117
|
-
* 0 -》 用户手动触发
|
|
118
|
-
* 1 -》 首次点击进入触发
|
|
119
|
-
* 2 -》 每次点击触发
|
|
120
|
-
*/
|
|
121
|
-
mobileFullScreenMode: number;
|
|
122
|
-
/**
|
|
123
|
-
* 一人操作多人看 0 普通模式 1 交互模式(可以一人操作多人看)
|
|
124
|
-
* 2 多人互动模式,鼠标键盘都放开
|
|
125
|
-
*/
|
|
126
|
-
playerMode: number;
|
|
127
|
-
/**
|
|
128
|
-
* 用户类型 number
|
|
129
|
-
* 所有者:1 观察者:0;
|
|
130
|
-
*/
|
|
131
|
-
userType: number;
|
|
132
|
-
/**
|
|
133
|
-
* 用户昵称
|
|
134
|
-
*/
|
|
135
|
-
nickname: string;
|
|
136
|
-
/**
|
|
137
|
-
* 口令:8位唯一码,写入TaskInfo. 房间code,备用。
|
|
138
|
-
*/
|
|
139
|
-
roomCode: string;
|
|
140
|
-
/**
|
|
141
|
-
* debug task. 跳过task检测
|
|
142
|
-
*/
|
|
143
|
-
debugTask: boolean;
|
|
144
|
-
/**
|
|
145
|
-
* debug webserver
|
|
146
|
-
*/
|
|
147
|
-
debugWebServer: string;
|
|
148
|
-
/**
|
|
149
|
-
* laoding timeout
|
|
150
|
-
* 5 * 60
|
|
151
|
-
*/
|
|
152
|
-
loadingTimeout: number;
|
|
153
|
-
/**
|
|
154
|
-
* share url
|
|
155
|
-
*/
|
|
156
|
-
shareUrl: boolean;
|
|
157
|
-
/**
|
|
158
|
-
* 是否强制横屏
|
|
159
|
-
*/
|
|
160
|
-
mobileForceLandscape: boolean;
|
|
161
|
-
/**
|
|
162
|
-
* 移动端初始化初始化是否显示手柄
|
|
163
|
-
*/
|
|
164
|
-
mobileVirtualJoystick: boolean;
|
|
165
|
-
/**
|
|
166
|
-
* mouseZoomDirection
|
|
167
|
-
* 用于移动端捏合缩放操作与应用鼠标缩放的对应关系
|
|
168
|
-
* 1:鼠标滚轮向上为放大,
|
|
169
|
-
* 0:鼠标滚轮向下为放大(default)
|
|
170
|
-
*/
|
|
171
|
-
mouseZoomDirection: number;
|
|
172
|
-
/**
|
|
173
|
-
* 初始是否显示玩家列表
|
|
174
|
-
*/
|
|
175
|
-
showPlayerList: boolean;
|
|
176
|
-
/**
|
|
177
|
-
* 优先使用的解码器
|
|
178
|
-
*/
|
|
179
|
-
preferDecoder: 'auto' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'hevc' | 'av1x';
|
|
180
|
-
/**
|
|
181
|
-
* 触摸操作对应的操作方式,触摸屏还是鼠标
|
|
182
|
-
*/
|
|
183
|
-
touchOperateMode: 'touchScreen' | 'mouse';
|
|
184
|
-
/**
|
|
185
|
-
* appid
|
|
186
|
-
*/
|
|
187
|
-
appliId: string;
|
|
188
|
-
/**
|
|
189
|
-
*
|
|
190
|
-
*/
|
|
191
|
-
syncLocalToCloudClipboard: boolean;
|
|
192
|
-
enableRttIcon: boolean;
|
|
193
|
-
enableSoundRequire: boolean;
|
|
194
|
-
toastLevel: number;
|
|
195
|
-
appKey: string;
|
|
196
|
-
groupId: string;
|
|
197
|
-
textInputEventPrompt: boolean;
|
|
198
|
-
audioInput: boolean;
|
|
199
|
-
audioInputAutoStart: boolean;
|
|
200
|
-
videoInput: boolean;
|
|
201
|
-
videoInputAutoStart: boolean;
|
|
202
|
-
liveStreaming: boolean;
|
|
203
|
-
useSeparateMediaSharePeer: boolean;
|
|
204
|
-
}
|
|
205
|
-
export declare enum AppliType {
|
|
206
|
-
DESKTOP = 1,
|
|
207
|
-
SHARED = 2,
|
|
208
|
-
PIXEL_STREAMING = 13,
|
|
209
|
-
VR = 3,
|
|
210
|
-
VR_STEAM = 5,
|
|
211
|
-
NV_VR = 6,
|
|
212
|
-
XR = 7,
|
|
213
|
-
PXY_AR = 9,
|
|
214
|
-
NV_AR = 11
|
|
215
|
-
}
|
|
216
|
-
export declare class AppliParams implements IAppliParams {
|
|
217
|
-
appServer: string;
|
|
218
|
-
appPort: string;
|
|
219
|
-
renderSSLServerPort: string;
|
|
220
|
-
appliType: AppliType;
|
|
221
|
-
wsProxy: boolean;
|
|
222
|
-
preferPubOutIp: string;
|
|
223
|
-
taskid: string;
|
|
224
|
-
appliName: string;
|
|
225
|
-
width: number;
|
|
226
|
-
height: number;
|
|
227
|
-
scaleMode: ScaleMode;
|
|
228
|
-
logLevel: 'info' | 'warn' | 'error';
|
|
229
|
-
noOperationTimeout: number;
|
|
230
|
-
waterMark: boolean;
|
|
231
|
-
rttLimit: number;
|
|
232
|
-
packetLostLimit: number;
|
|
233
|
-
rttLimitInterval: number;
|
|
234
|
-
codeRate: number;
|
|
235
|
-
audioCodeRate: number;
|
|
236
|
-
frameRate: number;
|
|
237
|
-
network: 'local' | 'public';
|
|
238
|
-
language: string;
|
|
239
|
-
initCursorMode: boolean;
|
|
240
|
-
bgColor: string;
|
|
241
|
-
fullScreenMode: number;
|
|
242
|
-
mobileFullScreenMode: number;
|
|
243
|
-
playerMode: number;
|
|
244
|
-
userType: number;
|
|
245
|
-
nickname: string;
|
|
246
|
-
roomCode: string;
|
|
247
|
-
debugTask: boolean;
|
|
248
|
-
debugWebServer: string;
|
|
249
|
-
loadingTimeout: number;
|
|
250
|
-
shareUrl: boolean;
|
|
251
|
-
mobileForceLandscape: boolean;
|
|
252
|
-
mobileVirtualJoystick: boolean;
|
|
253
|
-
mouseZoomDirection: number;
|
|
254
|
-
showPlayerList: boolean;
|
|
255
|
-
preferDecoder: 'auto' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'hevc' | 'av1x';
|
|
256
|
-
touchOperateMode: 'touchScreen' | 'mouse';
|
|
257
|
-
appliId: string;
|
|
258
|
-
syncLocalToCloudClipboard: boolean;
|
|
259
|
-
enableRttIcon: boolean;
|
|
260
|
-
enableSoundRequire: boolean;
|
|
261
|
-
toastLevel: number;
|
|
262
|
-
appKey: string;
|
|
263
|
-
groupId: string;
|
|
264
|
-
textInputEventPrompt: boolean;
|
|
265
|
-
audioInput: boolean;
|
|
266
|
-
audioInputAutoStart: boolean;
|
|
267
|
-
videoInput: boolean;
|
|
268
|
-
videoInputAutoStart: boolean;
|
|
269
|
-
liveStreaming: boolean;
|
|
270
|
-
useSeparateMediaSharePeer: boolean;
|
|
271
|
-
static copyAndCreate(params?: IAppliParams): AppliParams;
|
|
272
|
-
static setUpWithSDKConfig(params: IAppliParams, config: ILarkSRConfig): AppliParams;
|
|
273
|
-
}
|
|
274
|
-
export declare function CreateAppliParams(): IAppliParams;
|
|
275
|
-
export declare class AppliParamsUtils {
|
|
276
|
-
static getScaleMode(init: number | null | undefined): string;
|
|
277
|
-
static getNetwork(init: number | null | undefined): 'local' | 'public';
|
|
278
|
-
static getLogLevel(level: string | null | undefined): 'info' | 'warn';
|
|
279
|
-
static getBoolOption(option: string | null | undefined | boolean, emptyValue?: boolean): boolean;
|
|
280
|
-
static getNumberBoolOption(option: string | null | undefined | number, emptyValue?: boolean): boolean;
|
|
281
|
-
static getStringOption(option: string | null | undefined, emptyValue?: string): string;
|
|
282
|
-
static getIntOption(option: string | null | undefined, emptyValue?: number): number;
|
|
283
|
-
static getBgColor(option: string | null | undefined): string;
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* WARNING 服务器端返回数据随机性较大,统一在该函数里做兼容处理
|
|
287
|
-
* 服务器端可能随意修改字段名称或值,需要注意测试
|
|
288
|
-
* @param startAppInfo
|
|
289
|
-
* @returns
|
|
290
|
-
*/
|
|
291
|
-
export declare function LoadAppliParamsFromUrl(): IAppliParams;
|
|
292
|
-
/**
|
|
293
|
-
* WARNING 服务器端返回数据随机性较大,统一在该函数里做兼容处理
|
|
294
|
-
* 服务器端可能随意修改字段名称或值,需要注意测试
|
|
295
|
-
* @param startAppInfo
|
|
296
|
-
* @returns
|
|
297
|
-
*/
|
|
298
|
-
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
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LarkEventType } from '../lark/lark_event_type';
|
|
2
|
-
import { LarkSR } from '../larksr';
|
|
3
|
-
export declare const PREX = "pxymessage";
|
|
4
|
-
export declare const LOG_ERROR_EVENT_TYPE: LarkEventType[];
|
|
5
|
-
export default class IframeHandler {
|
|
6
|
-
larksr: LarkSR;
|
|
7
|
-
constructor(larksr: LarkSR);
|
|
8
|
-
listenParent(): void;
|
|
9
|
-
}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import 'core-js/stable/symbol';
|
|
2
|
-
import { LarkSR, LarkEventType, LarkSRClientEvent, AppliParams, LoadAppliParamsFromUrl, AppliParamsUtils, LoadAppliParamsStartAppInfo, EventBase, API, Operation, Capabilities, ScaleMode, CloudLark, FullScreen, LockPointer, ILarkSRConfig, PlayerModeType, UserType, LarkSREvent, GESTURE_TYPE } from "./larksr";
|
|
3
|
-
declare const _default: {
|
|
4
|
-
LarkSR: typeof LarkSR;
|
|
5
|
-
API: typeof API;
|
|
6
|
-
AppliParams: typeof AppliParams;
|
|
7
|
-
LoadAppliParamsFromUrl: typeof LoadAppliParamsFromUrl;
|
|
8
|
-
AppliParamsUtils: typeof AppliParamsUtils;
|
|
9
|
-
LoadAppliParamsStartAppInfo: typeof LoadAppliParamsStartAppInfo;
|
|
10
|
-
EventBase: typeof EventBase;
|
|
11
|
-
ScaleMode: typeof ScaleMode;
|
|
12
|
-
Capabilities: typeof Capabilities;
|
|
13
|
-
CloudLark: typeof CloudLark;
|
|
14
|
-
FullScreen: typeof FullScreen;
|
|
15
|
-
LockPointer: typeof LockPointer;
|
|
16
|
-
Operation: typeof Operation;
|
|
17
|
-
LarkSRClientEvent: typeof LarkSRClientEvent;
|
|
18
|
-
LarkEventType: typeof LarkEventType;
|
|
19
|
-
GESTURE_TYPE: typeof GESTURE_TYPE;
|
|
20
|
-
KEYMAP: import("./operation/keymap").VritualKeyMapOptions;
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
23
|
-
export { ILarkSRConfig, PlayerModeType, UserType, LarkSREvent, };
|
|
File without changes
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { EventBase, LocalEvent } from '../event/event_base';
|
|
2
|
-
import * as Msg from '../protobuf/cloudlark';
|
|
3
|
-
import WebSocektChannel from './websocket_channel';
|
|
4
|
-
import WebsocketProxy from './websocket_proxy';
|
|
5
|
-
import { LarkSR } from '../larksr';
|
|
6
|
-
import PixelStreamingWebsocketChannel from './test_pixel_streaming';
|
|
7
|
-
import { RECORDER_STATE } from './recoder';
|
|
8
|
-
export declare enum APP_STATE {
|
|
9
|
-
BEFORE_CREATE = 0,
|
|
10
|
-
INITED = 1,
|
|
11
|
-
WEBSOCKET_CHANNEL_OPEN = 2,
|
|
12
|
-
LOGIN_SUCCESS = 3,
|
|
13
|
-
RTC_CONNECTED = 4,
|
|
14
|
-
MEDIA_LOADED = 5,
|
|
15
|
-
MEDIA_PLAYED = 6,
|
|
16
|
-
RTC_RETRY = 7,
|
|
17
|
-
APP_RETRY = 8,
|
|
18
|
-
BEFORE_DESTORY = 9,
|
|
19
|
-
WEBSOCKET_CLOSED = 10,
|
|
20
|
-
RTC_CLOSED = 11,
|
|
21
|
-
DESTROYED = 12
|
|
22
|
-
}
|
|
23
|
-
export declare enum APP_EVENT_TYPE {
|
|
24
|
-
CONNECT = 0,
|
|
25
|
-
LOGIN = 1,
|
|
26
|
-
ERROR = 2,
|
|
27
|
-
INFO = 3,
|
|
28
|
-
APP_CLOSE = 4,
|
|
29
|
-
REMOTE_STREAM = 5,
|
|
30
|
-
REMOTE_AUDIO_STREAM = 6,
|
|
31
|
-
SYNC_CURSORSTYLE = 7,
|
|
32
|
-
APP_STATE_CHANGE = 8,
|
|
33
|
-
NET_STATE = 9,
|
|
34
|
-
LK_APP_RESIZE = 10,
|
|
35
|
-
LK_APP_MOUSE_MODE = 11,
|
|
36
|
-
LK_APP_PLAER_LIST = 12,
|
|
37
|
-
LK_APP_REQUEST_TEXT = 13,
|
|
38
|
-
LK_DATA_CHANNEL_RENDERSERVER_TEXT_MESSAGE = 14,
|
|
39
|
-
LK_DATA_CHANNEL_RENDERSERVER_BINARY_MESSAGE = 15,
|
|
40
|
-
LK_DATA_CHANNEL_RENDERSERVER_OPEN = 16,
|
|
41
|
-
LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 17,
|
|
42
|
-
AI_VOICE_STATUS = 18,
|
|
43
|
-
AI_VOICE_ASR_RESULT = 19,
|
|
44
|
-
AI_VOICE_DM_RESULT = 20,
|
|
45
|
-
AI_VOICE_ERROR = 21,
|
|
46
|
-
RTMP_STREAM_STATE = 22,
|
|
47
|
-
RTMP_STREAM_ERROR = 23
|
|
48
|
-
}
|
|
49
|
-
export interface AppEvent extends LocalEvent<APP_EVENT_TYPE> {
|
|
50
|
-
data?: any;
|
|
51
|
-
state: APP_STATE;
|
|
52
|
-
}
|
|
53
|
-
export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
|
|
54
|
-
private websocketChannel;
|
|
55
|
-
private websocketProxy;
|
|
56
|
-
private testPixelStreaming;
|
|
57
|
-
private peerConnection;
|
|
58
|
-
private mediaSharePeerConnectionImp;
|
|
59
|
-
get peerConnectionCreated(): boolean;
|
|
60
|
-
get state(): APP_STATE;
|
|
61
|
-
set state(state: APP_STATE);
|
|
62
|
-
private _state;
|
|
63
|
-
get audioDeviceId(): string | null | undefined;
|
|
64
|
-
get audioTrack(): MediaStreamTrack | null | undefined;
|
|
65
|
-
get videoDeviceId(): string | null | undefined;
|
|
66
|
-
get videoTrack(): MediaStreamTrack | null | undefined;
|
|
67
|
-
get audioPaused(): boolean | undefined;
|
|
68
|
-
get videoPaused(): boolean | undefined;
|
|
69
|
-
private get sharePeerConnection();
|
|
70
|
-
private retryTime;
|
|
71
|
-
private larksr;
|
|
72
|
-
get voiceId(): number;
|
|
73
|
-
get recodeState(): RECORDER_STATE;
|
|
74
|
-
private recoder;
|
|
75
|
-
private rtcConfig;
|
|
76
|
-
constructor(larksr: LarkSR);
|
|
77
|
-
init(): void;
|
|
78
|
-
initSharePc(): void;
|
|
79
|
-
initPc(): void;
|
|
80
|
-
releasePc(): void;
|
|
81
|
-
releaseSharePc(): void;
|
|
82
|
-
closeSharePc(): void;
|
|
83
|
-
clear(): void;
|
|
84
|
-
changeOperater(uid: number): void;
|
|
85
|
-
inputText(text: string): void;
|
|
86
|
-
sendTextToDataChannel(text: string): void;
|
|
87
|
-
sendBinaryToDataChannel(binary: Uint8Array): void;
|
|
88
|
-
aiDmTextInput(text: string): number;
|
|
89
|
-
startAiDmVoiceInput(): Promise<number>;
|
|
90
|
-
stopAiDmVoiceInput(): number;
|
|
91
|
-
private onRecoderData;
|
|
92
|
-
start(): Promise<void>;
|
|
93
|
-
connect(): Promise<PixelStreamingWebsocketChannel> | Promise<WebsocketProxy> | Promise<WebSocektChannel> | undefined;
|
|
94
|
-
disConnect(): void;
|
|
95
|
-
closeRtc(): void;
|
|
96
|
-
versionCheck(): void;
|
|
97
|
-
task(): void;
|
|
98
|
-
startSteam(): void;
|
|
99
|
-
startMonitorSteam(): void;
|
|
100
|
-
restart(): void;
|
|
101
|
-
restartApp(): void;
|
|
102
|
-
rtcOffer(): Promise<void>;
|
|
103
|
-
setAnswer(sdp: string): void;
|
|
104
|
-
setIce(sdpMlineindex: number, sdpmid: string, candidate: string): void;
|
|
105
|
-
sendInput(input: Msg.CloudLark.ClientInput): void;
|
|
106
|
-
sendInputBuffer(buffer: ArrayBuffer): void;
|
|
107
|
-
private sendToWebsocektChannelBuffer;
|
|
108
|
-
private sendToWebsocektChannelMsg;
|
|
109
|
-
private onChannelOpen;
|
|
110
|
-
private onClose;
|
|
111
|
-
private onChannelMsg;
|
|
112
|
-
private onVersionCheckResponse;
|
|
113
|
-
private onTaskResponse;
|
|
114
|
-
private onStartStreamResponse;
|
|
115
|
-
private onStartMonitorResponse;
|
|
116
|
-
private onWebRtcOfferAnswer;
|
|
117
|
-
private onWebRtcIcecandidate;
|
|
118
|
-
private onWebRtcError;
|
|
119
|
-
private onAppProcess;
|
|
120
|
-
private onLogout;
|
|
121
|
-
private onLocalSdp;
|
|
122
|
-
private onLoacalIce;
|
|
123
|
-
private onRemoteStream;
|
|
124
|
-
private onAudioRemoteStream;
|
|
125
|
-
private onRtcError;
|
|
126
|
-
private onRtcInfo;
|
|
127
|
-
private onRtmpStreamingState;
|
|
128
|
-
private onRtmpStreamingError;
|
|
129
|
-
private onIceStateChange;
|
|
130
|
-
retryPeerconnection(): void;
|
|
131
|
-
private onShareMediaError;
|
|
132
|
-
private onShareMediaInfo;
|
|
133
|
-
private onShareMediaOffer;
|
|
134
|
-
private onShareMediaIce;
|
|
135
|
-
setAudioEnable(enable: boolean): any;
|
|
136
|
-
setVideoEnable(enable: boolean): any;
|
|
137
|
-
setShareEnable(enable: boolean): any;
|
|
138
|
-
stopLocalAudio(): any;
|
|
139
|
-
stopLocalVideo(): any;
|
|
140
|
-
stopLocalShare(): any;
|
|
141
|
-
pauseAudioSending(): any;
|
|
142
|
-
resumeAudioSending(): any;
|
|
143
|
-
pauseVideoSending(): any;
|
|
144
|
-
resumeVideoSending(): any;
|
|
145
|
-
closeAudio(): any;
|
|
146
|
-
closeVideo(): any;
|
|
147
|
-
closeShare(): any;
|
|
148
|
-
openAudio(deviceId?: string): Promise<any>;
|
|
149
|
-
openVideo(audio?: boolean, cameraId?: string, width?: number, height?: number): Promise<any>;
|
|
150
|
-
openDefaultMedia(video?: boolean, audio?: boolean): Promise<any>;
|
|
151
|
-
openShareMediaDevice(): Promise<any>;
|
|
152
|
-
getConnectedAudioinputDevices(): Promise<any>;
|
|
153
|
-
getConnectedAudioOutputDevices(): Promise<any>;
|
|
154
|
-
getConnectedVideoinputDevices(): Promise<any>;
|
|
155
|
-
getConnectedDevices(type: MediaDeviceKind): Promise<any>;
|
|
156
|
-
openAudioDevice(deviceId: string, kind?: "audioinput" | "audiooutput"): Promise<any>;
|
|
157
|
-
openCamera(cameraId: string, minWidth?: number, minHeight?: number): Promise<any>;
|
|
158
|
-
openUserMeida(constraints?: MediaStreamConstraints, reset?: boolean): Promise<any>;
|
|
159
|
-
addMediaTrack(track: MediaStreamTrack, ...streams: MediaStream[]): boolean | undefined;
|
|
160
|
-
removeMediaTrack(track: RTCRtpSender): any;
|
|
161
|
-
requestUserMediaPermission(constraints?: MediaStreamConstraints): any;
|
|
162
|
-
StartCloudLiveStreaming(params: Msg.CloudLark.IRtmp_Start): Promise<void> | undefined;
|
|
163
|
-
StopLiveStreaming(): void | undefined;
|
|
164
|
-
private onPeerConnectionDisconnect;
|
|
165
|
-
private onBadNetwork;
|
|
166
|
-
private onPixelStreamingPlayerList;
|
|
167
|
-
private onPixelStreamingDataChannelState;
|
|
168
|
-
private onPixelStreamingDataChannelData;
|
|
169
|
-
private onCursorStyle;
|
|
170
|
-
private onAppResize;
|
|
171
|
-
private onAppMouseMode;
|
|
172
|
-
private onAppPlayerList;
|
|
173
|
-
private onAppRequestText;
|
|
174
|
-
private onDataChannelText;
|
|
175
|
-
private onDataChannelBinary;
|
|
176
|
-
private onDataChannelOpen;
|
|
177
|
-
private onDataChannelClose;
|
|
178
|
-
private onPeerConnectionState;
|
|
179
|
-
private onAiVoiceStatus;
|
|
180
|
-
private onAiVoiceAsrResult;
|
|
181
|
-
private onAiVoiceDMResult;
|
|
182
|
-
private onAiVoiceError;
|
|
183
|
-
appStateChange(state: APP_STATE): void;
|
|
184
|
-
private infoMsg;
|
|
185
|
-
private errorMsg;
|
|
186
|
-
private toastMsg;
|
|
187
|
-
private $emit;
|
|
188
|
-
private createAppEvent;
|
|
189
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export default class IceCandidateParser {
|
|
2
|
-
sdpMLineIndex: number | null;
|
|
3
|
-
sdpMid: string | null;
|
|
4
|
-
usernameFragment: string | null;
|
|
5
|
-
header: string;
|
|
6
|
-
private props;
|
|
7
|
-
constructor(ice: RTCIceCandidateInit);
|
|
8
|
-
get foundation(): string;
|
|
9
|
-
set foundation(f: string);
|
|
10
|
-
get component(): string;
|
|
11
|
-
set component(f: string);
|
|
12
|
-
get protocol(): string;
|
|
13
|
-
set protocol(p: string);
|
|
14
|
-
get priority(): string;
|
|
15
|
-
set priority(p: string);
|
|
16
|
-
get ip(): string;
|
|
17
|
-
set ip(ip: string);
|
|
18
|
-
get port(): string;
|
|
19
|
-
set port(port: string);
|
|
20
|
-
get type(): string;
|
|
21
|
-
get candidate(): string;
|
|
22
|
-
genNewIceCandidateInit(): RTCIceCandidateInit;
|
|
23
|
-
genNewIceCandidate(): RTCIceCandidate;
|
|
24
|
-
}
|