@xylink/xy-rtc-sdk 3.9.1-beta.6 → 3.10.0-beta.4
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/lib/action/index.d.ts +103 -20
- package/lib/enum/client.d.ts +1 -1
- package/lib/enum/{contraints.d.ts → constraints.d.ts} +6 -0
- package/lib/enum/device.d.ts +34 -0
- package/lib/enum/errorCode.d.ts +7 -1
- package/lib/enum/i18n.d.ts +6 -0
- package/lib/enum/index.d.ts +70 -12
- package/lib/enum/meeting.d.ts +4 -0
- package/lib/feature/index.d.ts +1 -0
- package/lib/feature/speaker.d.ts +61 -0
- package/lib/index.d.ts +13 -10
- package/lib/main/ability/const.d.ts +2 -0
- package/lib/main/ability/index.d.ts +31 -0
- package/lib/main/{iauth.d.ts → auth.d.ts} +8 -8
- package/lib/main/client.d.ts +203 -97
- package/lib/main/clientImplements.d.ts +99 -0
- package/lib/main/deviceManager.d.ts +150 -93
- package/lib/main/helper.d.ts +62 -9
- package/lib/main/layout/index.d.ts +377 -0
- package/lib/main/layout/template.d.ts +64 -0
- package/lib/main/meeting.d.ts +32 -26
- package/lib/main/peer.d.ts +3 -1
- package/lib/main/stream.d.ts +47 -21
- package/lib/main/videoManager.d.ts +95 -12
- package/lib/tools/{audioLevel.d.ts → analyser.d.ts} +11 -4
- package/lib/tools/browser.d.ts +60 -49
- package/lib/tools/httpClient.d.ts +27 -6
- package/lib/tools/index.d.ts +12 -5
- package/lib/tools/{logger.d.ts → log/logger.d.ts} +18 -7
- package/lib/tools/log/loggerManager.d.ts +69 -0
- package/lib/tools/promiseQueue.d.ts +45 -0
- package/lib/tools/queue.d.ts +12 -15
- package/lib/tools/resize.d.ts +62 -0
- package/lib/tools/snapshot.d.ts +31 -0
- package/lib/tools/socket.d.ts +99 -32
- package/lib/tools/template/index.d.ts +324 -0
- package/lib/tools/template/mobile.d.ts +9 -0
- package/lib/tools/utils.d.ts +13 -5
- package/lib/type/ability.d.ts +25 -0
- package/lib/type/analyser.d.ts +18 -0
- package/lib/type/{iauth.d.ts → auth.d.ts} +0 -7
- package/lib/type/base.d.ts +16 -0
- package/lib/type/client.d.ts +164 -150
- package/lib/type/device.d.ts +103 -31
- package/lib/type/index.d.ts +3 -1
- package/lib/type/layout.d.ts +198 -13
- package/lib/type/logger.d.ts +19 -1
- package/lib/type/meeting.d.ts +294 -10
- package/lib/type/socket.d.ts +60 -0
- package/lib/type/stream.d.ts +21 -13
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +7 -5
- package/lib/main/layoutManager.d.ts +0 -244
- package/lib/tools/template.d.ts +0 -21
- /package/lib/tools/{logger.worker.d.ts → log/logger.worker.d.ts} +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XYLink WebRTC SDK Queue Task Lib
|
|
3
|
+
*
|
|
4
|
+
* Created at : 2023-04-19 09:46:28
|
|
5
|
+
* Last modified : 2023-04-25 16:54:44
|
|
6
|
+
*/
|
|
7
|
+
type AsyncFn<T> = (...args: any[]) => Promise<T>;
|
|
8
|
+
declare class PromiseQueue<T> {
|
|
9
|
+
private isRunning;
|
|
10
|
+
private taskCompletedCB;
|
|
11
|
+
private waitingQueue;
|
|
12
|
+
constructor();
|
|
13
|
+
/**
|
|
14
|
+
* 监听任务执行完成状态
|
|
15
|
+
*
|
|
16
|
+
* @param { (() => void) | null } callback - 任务结束回调
|
|
17
|
+
*/
|
|
18
|
+
onTaskCompleted(callback: () => void): void;
|
|
19
|
+
/**
|
|
20
|
+
* 添加同步任务
|
|
21
|
+
*
|
|
22
|
+
* @param { AsyncFn<T> } task - 同步任务函数
|
|
23
|
+
* @returns { Promise<T> }
|
|
24
|
+
*/
|
|
25
|
+
addTask(task: AsyncFn<T>): Promise<T>;
|
|
26
|
+
/**
|
|
27
|
+
* 执行同步任务队列
|
|
28
|
+
*
|
|
29
|
+
* @param { AsyncFn<T> } task - 同步任务函数
|
|
30
|
+
* @param { Fn } resolve - Resolve函数
|
|
31
|
+
* @param { Fn } reject - Reject函数
|
|
32
|
+
*/
|
|
33
|
+
private execute;
|
|
34
|
+
/**
|
|
35
|
+
* 获取执行中的任务数量
|
|
36
|
+
*
|
|
37
|
+
* @returns { number }
|
|
38
|
+
*/
|
|
39
|
+
taskLength(): number;
|
|
40
|
+
/**
|
|
41
|
+
* 清空任务队列
|
|
42
|
+
*/
|
|
43
|
+
clear(): void;
|
|
44
|
+
}
|
|
45
|
+
export default PromiseQueue;
|
package/lib/tools/queue.d.ts
CHANGED
|
@@ -4,37 +4,34 @@
|
|
|
4
4
|
* Created at : 2023-04-19 09:46:28
|
|
5
5
|
* Last modified : 2023-04-25 16:54:44
|
|
6
6
|
*/
|
|
7
|
-
type
|
|
8
|
-
declare class Queue
|
|
9
|
-
private
|
|
7
|
+
type Fn = (...args: any[]) => any;
|
|
8
|
+
declare class Queue {
|
|
9
|
+
private isLock;
|
|
10
10
|
private taskCompletedCB;
|
|
11
11
|
private waitingQueue;
|
|
12
12
|
constructor();
|
|
13
13
|
/**
|
|
14
14
|
* 监听任务执行完成状态
|
|
15
15
|
*
|
|
16
|
-
* @param {
|
|
16
|
+
* @param { Fn } callback - 任务结束回调
|
|
17
17
|
*/
|
|
18
|
-
onTaskCompleted(callback:
|
|
18
|
+
onTaskCompleted(callback: Fn): void;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* 添加任务
|
|
21
21
|
*
|
|
22
|
-
* @param {
|
|
23
|
-
* @returns { Promise<T> }
|
|
22
|
+
* @param { Fn } task - 任务函数
|
|
24
23
|
*/
|
|
25
|
-
addTask(task:
|
|
24
|
+
addTask(task: Fn): void;
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
26
|
+
* 执行任务队列
|
|
28
27
|
*
|
|
29
|
-
* @param {
|
|
30
|
-
* @param { Fn } resolve - Resolve函数
|
|
31
|
-
* @param { Fn } reject - Reject函数
|
|
28
|
+
* @param { Fn} task - 无值时,执行所有任务
|
|
32
29
|
*/
|
|
33
|
-
|
|
30
|
+
execute(task?: Fn): void;
|
|
34
31
|
/**
|
|
35
32
|
* 获取执行中的任务数量
|
|
36
33
|
*
|
|
37
|
-
* @returns { number }
|
|
34
|
+
* @returns { number } - 任务队列长度
|
|
38
35
|
*/
|
|
39
36
|
taskLength(): number;
|
|
40
37
|
/**
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dom and Window resize event
|
|
3
|
+
*
|
|
4
|
+
* @author jinghuiLuo - luojinghui424@gmail
|
|
5
|
+
*
|
|
6
|
+
* Created at : 2022-10-31 17:18:32
|
|
7
|
+
* Last modified : 2022-10-31 17:56:04
|
|
8
|
+
*/
|
|
9
|
+
export interface ResizeData {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
element: HTMLElement | null;
|
|
13
|
+
}
|
|
14
|
+
export default class Resize {
|
|
15
|
+
private eleId;
|
|
16
|
+
private element;
|
|
17
|
+
private resizeObserver;
|
|
18
|
+
private resizeMode;
|
|
19
|
+
private detectCount;
|
|
20
|
+
private maxDetectCount;
|
|
21
|
+
private detectTimer;
|
|
22
|
+
private onResize;
|
|
23
|
+
constructor();
|
|
24
|
+
/**
|
|
25
|
+
* 上报Element元素的尺寸信息
|
|
26
|
+
*/
|
|
27
|
+
private handleResize;
|
|
28
|
+
/**
|
|
29
|
+
* 初始化监听Dom尺寸变化
|
|
30
|
+
*
|
|
31
|
+
* @param { string } eleId - 监听的容器ID,如果配置为空,则直接监听window resize事件
|
|
32
|
+
* @param { function } onResize - 变化回调函数
|
|
33
|
+
*/
|
|
34
|
+
init(eleId: string, onResize: () => void): void;
|
|
35
|
+
/**
|
|
36
|
+
* 启动定时器,监听是否存在指定的Element元素
|
|
37
|
+
* 存在则转换为Observer监听Dom方式
|
|
38
|
+
*/
|
|
39
|
+
startDetectTimer(): void;
|
|
40
|
+
/**
|
|
41
|
+
* 清理检测Element的定时器
|
|
42
|
+
*/
|
|
43
|
+
clearDetectTimer(): void;
|
|
44
|
+
/**
|
|
45
|
+
* 启动Window Resize监听事件
|
|
46
|
+
*/
|
|
47
|
+
startListenerResize(): void;
|
|
48
|
+
/**
|
|
49
|
+
* 启动Element Dom监听大小变化事件
|
|
50
|
+
*/
|
|
51
|
+
startObserverResize(): void;
|
|
52
|
+
/**
|
|
53
|
+
* 监听事件销毁事件
|
|
54
|
+
*/
|
|
55
|
+
destroy(): void;
|
|
56
|
+
/**
|
|
57
|
+
* 移除Window绑定事件
|
|
58
|
+
*/
|
|
59
|
+
removeResizeListener(): void;
|
|
60
|
+
}
|
|
61
|
+
declare const resize: Resize;
|
|
62
|
+
export { resize };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* snapshot implements lib
|
|
3
|
+
*
|
|
4
|
+
* @summary Implement drawing of video onto canvas and obtain screenshots
|
|
5
|
+
*
|
|
6
|
+
* Created at : 2023-08-30 15:24:24
|
|
7
|
+
* Last modified : 2023-09-12 18:03:44
|
|
8
|
+
*/
|
|
9
|
+
import { SnapshotOptions, SnapshotResult } from '../type';
|
|
10
|
+
declare class Snapshot {
|
|
11
|
+
private canvas;
|
|
12
|
+
private ctx;
|
|
13
|
+
constructor(canvas?: HTMLCanvasElement);
|
|
14
|
+
getCanvas(): HTMLCanvasElement;
|
|
15
|
+
/**
|
|
16
|
+
* 根据传入的video元素,获取对应的截图
|
|
17
|
+
*
|
|
18
|
+
* @param { HTMLVideoElement } videoEle - video标签元素
|
|
19
|
+
* @param { IOptions } options - 绘制参数
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
getVideoImage(videoEle: HTMLVideoElement, options?: SnapshotOptions): SnapshotResult;
|
|
23
|
+
/**
|
|
24
|
+
* 根据相关参数,将video绘制到canvas上
|
|
25
|
+
*
|
|
26
|
+
* @param { IOptions } options - 绘制参数
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
private drawFrame;
|
|
30
|
+
}
|
|
31
|
+
export default Snapshot;
|
package/lib/tools/socket.d.ts
CHANGED
|
@@ -3,21 +3,12 @@
|
|
|
3
3
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
4
4
|
* @date 2019-10-24 12:01:27
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
pangData?: string;
|
|
11
|
-
openHeatBeat?: boolean;
|
|
12
|
-
autoReConnect?: boolean;
|
|
13
|
-
params?: any;
|
|
14
|
-
}
|
|
15
|
-
declare class Socket {
|
|
6
|
+
import Logger from './log/logger';
|
|
7
|
+
import { SocketOptions } from '../type/socket';
|
|
8
|
+
import Emitter from './emitter';
|
|
9
|
+
declare class Socket extends Emitter {
|
|
16
10
|
socket: WebSocket;
|
|
17
|
-
private messageList;
|
|
18
11
|
private options;
|
|
19
|
-
private headBeatTimer;
|
|
20
|
-
private pangTimer;
|
|
21
12
|
private heatBeatFrequency;
|
|
22
13
|
private timeOffset;
|
|
23
14
|
private reconnectCount;
|
|
@@ -26,28 +17,104 @@ declare class Socket {
|
|
|
26
17
|
private isConnected;
|
|
27
18
|
private isClose;
|
|
28
19
|
private logger;
|
|
29
|
-
private client;
|
|
30
20
|
private reconnectOffset;
|
|
21
|
+
private headBeatTimer;
|
|
22
|
+
private pangTimer;
|
|
31
23
|
private reconnectTimer;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
24
|
+
private taskQueue;
|
|
25
|
+
constructor(options: SocketOptions, logger: Logger);
|
|
26
|
+
/**
|
|
27
|
+
* 连接socket
|
|
28
|
+
*
|
|
29
|
+
* @param { boolean } isReconnect - 是否是重连
|
|
30
|
+
*/
|
|
31
|
+
private connect;
|
|
32
|
+
/**
|
|
33
|
+
* 监听socket事件
|
|
34
|
+
*/
|
|
35
|
+
private addEvent;
|
|
36
|
+
/**
|
|
37
|
+
* 移除监听socket事件
|
|
38
|
+
*/
|
|
39
|
+
private removeEvent;
|
|
40
|
+
/**
|
|
41
|
+
* WS 连接成功
|
|
42
|
+
*
|
|
43
|
+
* @param { Event } e - 连接事件
|
|
44
|
+
*/
|
|
45
|
+
private onOpenSocket;
|
|
46
|
+
/**
|
|
47
|
+
* 处理WS消息
|
|
48
|
+
*
|
|
49
|
+
* @param e
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
private onHandleMessage;
|
|
53
|
+
/**
|
|
54
|
+
* 处理WS关闭消息
|
|
55
|
+
*
|
|
56
|
+
* @param { CloseEvent } e - 关闭事件
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
private onCloseSocket;
|
|
60
|
+
/**
|
|
61
|
+
* 监听Error事件
|
|
62
|
+
*
|
|
63
|
+
* @param { Event } e - 错误事件
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
66
|
+
private onErrorSocket;
|
|
67
|
+
/**
|
|
68
|
+
* 处理Error/Close后的重连
|
|
69
|
+
*/
|
|
70
|
+
private handleReconnectCount;
|
|
71
|
+
/**
|
|
72
|
+
* 发送心跳事件
|
|
73
|
+
*/
|
|
74
|
+
private sendHeartBeat;
|
|
75
|
+
/**
|
|
76
|
+
* 创建倒计时,响应是否接收到pang消息
|
|
77
|
+
*/
|
|
78
|
+
private startTimerAndHandlePang;
|
|
79
|
+
/**
|
|
80
|
+
* 关闭socket
|
|
81
|
+
*
|
|
82
|
+
* @param { boolean } isReconnect - 是否是重连
|
|
83
|
+
*/
|
|
48
84
|
close(isReconnect?: boolean): void;
|
|
85
|
+
/**
|
|
86
|
+
* 发送数据
|
|
87
|
+
*
|
|
88
|
+
* @param { any } data - 发送的数据
|
|
89
|
+
* @param { boolean } parse - 是否需要JSON.stringify
|
|
90
|
+
* @param { boolean } isLog - 是否需要打印日志
|
|
91
|
+
*/
|
|
49
92
|
send(data: any, parse?: boolean, isLog?: boolean): void;
|
|
50
|
-
|
|
51
|
-
|
|
93
|
+
/**
|
|
94
|
+
* wss 重连
|
|
95
|
+
*/
|
|
96
|
+
private reConnect;
|
|
97
|
+
/**
|
|
98
|
+
* 发送消息到消息队列
|
|
99
|
+
*
|
|
100
|
+
* @param { any } data - 消息数据
|
|
101
|
+
*/
|
|
102
|
+
private sendMessageToQueue;
|
|
103
|
+
/**
|
|
104
|
+
* 清除pang定时器
|
|
105
|
+
*/
|
|
106
|
+
private clearPangTimer;
|
|
107
|
+
/**
|
|
108
|
+
* 清除心跳定时器
|
|
109
|
+
*/
|
|
110
|
+
private clearBeatTimer;
|
|
111
|
+
/**
|
|
112
|
+
* 清除ws重连定时器
|
|
113
|
+
*/
|
|
114
|
+
private clearReconnectTimer;
|
|
115
|
+
/**
|
|
116
|
+
* 重置参数
|
|
117
|
+
*/
|
|
118
|
+
private reset;
|
|
52
119
|
}
|
|
53
120
|
export default Socket;
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Meeting layout init template data
|
|
3
|
+
*
|
|
4
|
+
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
|
+
* @date 2019-10-24 20:41:38
|
|
6
|
+
*/
|
|
7
|
+
import { ITemplate, TemplateType, VideoQuality, StreamResolutionLevel, TemplateInfos } from '../../type';
|
|
8
|
+
export * from './mobile';
|
|
9
|
+
export declare const RATE = 0.5625;
|
|
10
|
+
export declare const HIDE_POSITION: number[];
|
|
11
|
+
export declare const FULL_POSITION: number[];
|
|
12
|
+
export declare const SPEAKER_TEMPLATE: {
|
|
13
|
+
'1-1': {
|
|
14
|
+
position: number[];
|
|
15
|
+
resolution: {
|
|
16
|
+
normal: StreamResolutionLevel;
|
|
17
|
+
low: StreamResolutionLevel;
|
|
18
|
+
high: StreamResolutionLevel;
|
|
19
|
+
};
|
|
20
|
+
type: TemplateType;
|
|
21
|
+
quality: VideoQuality;
|
|
22
|
+
}[];
|
|
23
|
+
'2-1': ({
|
|
24
|
+
position: number[];
|
|
25
|
+
resolution: {
|
|
26
|
+
normal: StreamResolutionLevel;
|
|
27
|
+
low: StreamResolutionLevel;
|
|
28
|
+
high: StreamResolutionLevel;
|
|
29
|
+
};
|
|
30
|
+
type: TemplateType;
|
|
31
|
+
quality: VideoQuality;
|
|
32
|
+
} | {
|
|
33
|
+
position: number[];
|
|
34
|
+
resolution: {
|
|
35
|
+
normal: StreamResolutionLevel;
|
|
36
|
+
low: StreamResolutionLevel;
|
|
37
|
+
high?: undefined;
|
|
38
|
+
};
|
|
39
|
+
type: TemplateType;
|
|
40
|
+
quality: VideoQuality;
|
|
41
|
+
})[];
|
|
42
|
+
'3-1': ({
|
|
43
|
+
position: number[];
|
|
44
|
+
resolution: {
|
|
45
|
+
normal: StreamResolutionLevel;
|
|
46
|
+
low: StreamResolutionLevel;
|
|
47
|
+
high: StreamResolutionLevel;
|
|
48
|
+
};
|
|
49
|
+
type: TemplateType;
|
|
50
|
+
quality: VideoQuality;
|
|
51
|
+
} | {
|
|
52
|
+
position: number[];
|
|
53
|
+
resolution: {
|
|
54
|
+
normal: StreamResolutionLevel;
|
|
55
|
+
low: StreamResolutionLevel;
|
|
56
|
+
high?: undefined;
|
|
57
|
+
};
|
|
58
|
+
type: TemplateType;
|
|
59
|
+
quality: VideoQuality;
|
|
60
|
+
})[];
|
|
61
|
+
'4-1': ({
|
|
62
|
+
position: number[];
|
|
63
|
+
resolution: {
|
|
64
|
+
normal: StreamResolutionLevel;
|
|
65
|
+
low: StreamResolutionLevel;
|
|
66
|
+
high: StreamResolutionLevel;
|
|
67
|
+
};
|
|
68
|
+
type: TemplateType;
|
|
69
|
+
quality: VideoQuality;
|
|
70
|
+
} | {
|
|
71
|
+
position: number[];
|
|
72
|
+
resolution: {
|
|
73
|
+
normal: StreamResolutionLevel;
|
|
74
|
+
low: StreamResolutionLevel;
|
|
75
|
+
high?: undefined;
|
|
76
|
+
};
|
|
77
|
+
type: TemplateType;
|
|
78
|
+
quality?: undefined;
|
|
79
|
+
} | {
|
|
80
|
+
position: number[];
|
|
81
|
+
resolution: {
|
|
82
|
+
normal: StreamResolutionLevel;
|
|
83
|
+
low: StreamResolutionLevel;
|
|
84
|
+
high?: undefined;
|
|
85
|
+
};
|
|
86
|
+
type: TemplateType;
|
|
87
|
+
quality: VideoQuality;
|
|
88
|
+
})[];
|
|
89
|
+
'5-1': ({
|
|
90
|
+
position: number[];
|
|
91
|
+
resolution: {
|
|
92
|
+
normal: StreamResolutionLevel;
|
|
93
|
+
low: StreamResolutionLevel;
|
|
94
|
+
high: StreamResolutionLevel;
|
|
95
|
+
};
|
|
96
|
+
type: TemplateType;
|
|
97
|
+
quality: VideoQuality;
|
|
98
|
+
} | {
|
|
99
|
+
position: number[];
|
|
100
|
+
resolution: {
|
|
101
|
+
normal: StreamResolutionLevel;
|
|
102
|
+
low: StreamResolutionLevel;
|
|
103
|
+
high?: undefined;
|
|
104
|
+
};
|
|
105
|
+
type: TemplateType;
|
|
106
|
+
quality?: undefined;
|
|
107
|
+
} | {
|
|
108
|
+
position: number[];
|
|
109
|
+
resolution: {
|
|
110
|
+
normal: StreamResolutionLevel;
|
|
111
|
+
low: StreamResolutionLevel;
|
|
112
|
+
high?: undefined;
|
|
113
|
+
};
|
|
114
|
+
type: TemplateType;
|
|
115
|
+
quality: VideoQuality;
|
|
116
|
+
})[];
|
|
117
|
+
'6-1': ({
|
|
118
|
+
position: number[];
|
|
119
|
+
resolution: {
|
|
120
|
+
normal: StreamResolutionLevel;
|
|
121
|
+
low: StreamResolutionLevel;
|
|
122
|
+
high: StreamResolutionLevel;
|
|
123
|
+
};
|
|
124
|
+
type: TemplateType;
|
|
125
|
+
quality: VideoQuality;
|
|
126
|
+
} | {
|
|
127
|
+
position: number[];
|
|
128
|
+
resolution: {
|
|
129
|
+
normal: StreamResolutionLevel;
|
|
130
|
+
low: StreamResolutionLevel;
|
|
131
|
+
high?: undefined;
|
|
132
|
+
};
|
|
133
|
+
type: TemplateType;
|
|
134
|
+
quality?: undefined;
|
|
135
|
+
} | {
|
|
136
|
+
position: number[];
|
|
137
|
+
resolution: {
|
|
138
|
+
normal: StreamResolutionLevel;
|
|
139
|
+
low: StreamResolutionLevel;
|
|
140
|
+
high?: undefined;
|
|
141
|
+
};
|
|
142
|
+
type: TemplateType;
|
|
143
|
+
quality: VideoQuality;
|
|
144
|
+
})[];
|
|
145
|
+
'7-1': ({
|
|
146
|
+
position: number[];
|
|
147
|
+
resolution: {
|
|
148
|
+
normal: StreamResolutionLevel;
|
|
149
|
+
low: StreamResolutionLevel;
|
|
150
|
+
high: StreamResolutionLevel;
|
|
151
|
+
};
|
|
152
|
+
type: TemplateType;
|
|
153
|
+
quality: VideoQuality;
|
|
154
|
+
} | {
|
|
155
|
+
position: number[];
|
|
156
|
+
resolution: {
|
|
157
|
+
normal: StreamResolutionLevel;
|
|
158
|
+
low: StreamResolutionLevel;
|
|
159
|
+
high?: undefined;
|
|
160
|
+
};
|
|
161
|
+
type: TemplateType;
|
|
162
|
+
quality?: undefined;
|
|
163
|
+
} | {
|
|
164
|
+
position: number[];
|
|
165
|
+
resolution: {
|
|
166
|
+
normal: StreamResolutionLevel;
|
|
167
|
+
low: StreamResolutionLevel;
|
|
168
|
+
high?: undefined;
|
|
169
|
+
};
|
|
170
|
+
type: TemplateType;
|
|
171
|
+
quality: VideoQuality;
|
|
172
|
+
})[];
|
|
173
|
+
'8-1': ({
|
|
174
|
+
position: number[];
|
|
175
|
+
resolution: {
|
|
176
|
+
normal: StreamResolutionLevel;
|
|
177
|
+
low: StreamResolutionLevel;
|
|
178
|
+
high: StreamResolutionLevel;
|
|
179
|
+
};
|
|
180
|
+
type: TemplateType;
|
|
181
|
+
quality: VideoQuality;
|
|
182
|
+
} | {
|
|
183
|
+
position: number[];
|
|
184
|
+
resolution: {
|
|
185
|
+
normal: StreamResolutionLevel;
|
|
186
|
+
low: StreamResolutionLevel;
|
|
187
|
+
high?: undefined;
|
|
188
|
+
};
|
|
189
|
+
type: TemplateType;
|
|
190
|
+
quality?: undefined;
|
|
191
|
+
} | {
|
|
192
|
+
position: number[];
|
|
193
|
+
resolution: {
|
|
194
|
+
normal: StreamResolutionLevel;
|
|
195
|
+
low: StreamResolutionLevel;
|
|
196
|
+
high?: undefined;
|
|
197
|
+
};
|
|
198
|
+
type: TemplateType;
|
|
199
|
+
quality: VideoQuality;
|
|
200
|
+
})[];
|
|
201
|
+
};
|
|
202
|
+
export declare const GALLERY_TEMPLATE: {
|
|
203
|
+
'1-1': {
|
|
204
|
+
position: number[];
|
|
205
|
+
resolution: {
|
|
206
|
+
normal: StreamResolutionLevel;
|
|
207
|
+
low: StreamResolutionLevel;
|
|
208
|
+
high: StreamResolutionLevel;
|
|
209
|
+
};
|
|
210
|
+
type: TemplateType;
|
|
211
|
+
}[];
|
|
212
|
+
'2-1': ({
|
|
213
|
+
position: number[];
|
|
214
|
+
resolution: {
|
|
215
|
+
normal: StreamResolutionLevel;
|
|
216
|
+
low: StreamResolutionLevel;
|
|
217
|
+
high: StreamResolutionLevel;
|
|
218
|
+
};
|
|
219
|
+
type: TemplateType;
|
|
220
|
+
quality: VideoQuality;
|
|
221
|
+
} | {
|
|
222
|
+
position: number[];
|
|
223
|
+
resolution: {
|
|
224
|
+
normal: StreamResolutionLevel;
|
|
225
|
+
low: StreamResolutionLevel;
|
|
226
|
+
high: StreamResolutionLevel;
|
|
227
|
+
};
|
|
228
|
+
type: TemplateType;
|
|
229
|
+
quality?: undefined;
|
|
230
|
+
})[];
|
|
231
|
+
'3-1': ({
|
|
232
|
+
position: number[];
|
|
233
|
+
resolution: {
|
|
234
|
+
normal: number;
|
|
235
|
+
low: StreamResolutionLevel;
|
|
236
|
+
};
|
|
237
|
+
type: TemplateType;
|
|
238
|
+
quality: VideoQuality;
|
|
239
|
+
} | {
|
|
240
|
+
position: number[];
|
|
241
|
+
resolution: {
|
|
242
|
+
normal: number;
|
|
243
|
+
low: StreamResolutionLevel;
|
|
244
|
+
};
|
|
245
|
+
type: TemplateType;
|
|
246
|
+
quality?: undefined;
|
|
247
|
+
})[];
|
|
248
|
+
'4-1': ({
|
|
249
|
+
position: number[];
|
|
250
|
+
resolution: {
|
|
251
|
+
normal: number;
|
|
252
|
+
low: StreamResolutionLevel;
|
|
253
|
+
};
|
|
254
|
+
type: TemplateType;
|
|
255
|
+
quality: VideoQuality;
|
|
256
|
+
} | {
|
|
257
|
+
position: number[];
|
|
258
|
+
resolution: {
|
|
259
|
+
normal: number;
|
|
260
|
+
low: StreamResolutionLevel;
|
|
261
|
+
};
|
|
262
|
+
type: TemplateType;
|
|
263
|
+
quality?: undefined;
|
|
264
|
+
})[];
|
|
265
|
+
'5-1': ({
|
|
266
|
+
position: number[];
|
|
267
|
+
resolution: {
|
|
268
|
+
normal: StreamResolutionLevel;
|
|
269
|
+
low: StreamResolutionLevel;
|
|
270
|
+
};
|
|
271
|
+
type: TemplateType;
|
|
272
|
+
quality: VideoQuality;
|
|
273
|
+
} | {
|
|
274
|
+
position: number[];
|
|
275
|
+
resolution: {
|
|
276
|
+
normal: StreamResolutionLevel;
|
|
277
|
+
low: StreamResolutionLevel;
|
|
278
|
+
};
|
|
279
|
+
type: TemplateType;
|
|
280
|
+
quality?: undefined;
|
|
281
|
+
})[];
|
|
282
|
+
'6-1': {
|
|
283
|
+
position: number[];
|
|
284
|
+
resolution: {
|
|
285
|
+
normal: StreamResolutionLevel;
|
|
286
|
+
low: StreamResolutionLevel;
|
|
287
|
+
};
|
|
288
|
+
type: TemplateType;
|
|
289
|
+
quality: VideoQuality;
|
|
290
|
+
}[];
|
|
291
|
+
'7-1': {
|
|
292
|
+
position: number[];
|
|
293
|
+
resolution: {
|
|
294
|
+
normal: StreamResolutionLevel;
|
|
295
|
+
low: StreamResolutionLevel;
|
|
296
|
+
};
|
|
297
|
+
type: TemplateType;
|
|
298
|
+
quality: VideoQuality;
|
|
299
|
+
}[];
|
|
300
|
+
'8-1': {
|
|
301
|
+
position: number[];
|
|
302
|
+
resolution: {
|
|
303
|
+
normal: StreamResolutionLevel;
|
|
304
|
+
low: StreamResolutionLevel;
|
|
305
|
+
};
|
|
306
|
+
type: TemplateType;
|
|
307
|
+
quality: VideoQuality;
|
|
308
|
+
}[];
|
|
309
|
+
'9-1': {
|
|
310
|
+
position: number[];
|
|
311
|
+
resolution: {
|
|
312
|
+
normal: StreamResolutionLevel;
|
|
313
|
+
low: StreamResolutionLevel;
|
|
314
|
+
};
|
|
315
|
+
type: TemplateType;
|
|
316
|
+
quality: VideoQuality;
|
|
317
|
+
}[];
|
|
318
|
+
};
|
|
319
|
+
export declare const COMMON_TEMPLATE: ITemplate;
|
|
320
|
+
export declare const CONTENT_TEMPLATE: ITemplate;
|
|
321
|
+
/**
|
|
322
|
+
* 全屏布局
|
|
323
|
+
*/
|
|
324
|
+
export declare const FULL_TEMPLATE: TemplateInfos;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Meeting layout init template data
|
|
3
|
+
*
|
|
4
|
+
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
|
+
* @date 2019-10-24 20:41:38
|
|
6
|
+
*/
|
|
7
|
+
import { ITemplate } from '../../type';
|
|
8
|
+
export declare const COMMON_MOBILE_VERTICAL_TEMPLATE: ITemplate;
|
|
9
|
+
export declare const COMMON_MOBILE_HORIZONTAL_TEMPLATE: ITemplate;
|
package/lib/tools/utils.d.ts
CHANGED
|
@@ -38,12 +38,13 @@ export declare const getTime: () => string;
|
|
|
38
38
|
*/
|
|
39
39
|
export declare const getMillTime: () => string;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* @param
|
|
44
|
-
* @param
|
|
41
|
+
* 计算两个时间戳相差的天数
|
|
42
|
+
*
|
|
43
|
+
* @param { number } time1 - 时间戳1
|
|
44
|
+
* @param { number } time2 - 时间戳2
|
|
45
|
+
* @returns { number } day - 天数
|
|
45
46
|
*/
|
|
46
|
-
export declare const diffTime: (time1: number, time2: number
|
|
47
|
+
export declare const diffTime: (time1: number, time2: number) => number;
|
|
47
48
|
export declare function mapToObj<T>(data: Map<string, T>): {
|
|
48
49
|
[key: string]: T;
|
|
49
50
|
};
|
|
@@ -78,3 +79,10 @@ export declare const TYPEOF: {
|
|
|
78
79
|
isSpecialChar(val: any): boolean;
|
|
79
80
|
isWhiteSpace(val: any): boolean;
|
|
80
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* JSON字符串转对象
|
|
84
|
+
*
|
|
85
|
+
* @param { any } jsonString
|
|
86
|
+
* @returns { object}
|
|
87
|
+
*/
|
|
88
|
+
export declare const jsonStringToObject: (jsonString: any) => any;
|