@xylink/xy-rtc-sdk 4.0.2 → 4.0.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.
Files changed (79) hide show
  1. package/action/index.d.ts +1 -1
  2. package/enum/index.d.ts +8 -0
  3. package/export/tools.d.ts +18 -0
  4. package/feature/artboard/index.d.ts +7 -0
  5. package/feature/audioPCM/index.d.ts +30 -0
  6. package/feature/contentPreserver/index.d.ts +39 -0
  7. package/feature/im/index.d.ts +1 -1
  8. package/index.d.ts +7 -4
  9. package/interface/clientInterface.type.d.ts +6 -6
  10. package/interface/event.type.d.ts +10 -2
  11. package/interface/extension.type.d.ts +11 -0
  12. package/interface/processor.type.d.ts +10 -0
  13. package/interface/videoAudioTrackInterface.type.d.ts +2 -2
  14. package/main/auth/index.d.ts +8 -15
  15. package/main/auth/rule.d.ts +10 -0
  16. package/main/client/clientBase.d.ts +9 -1
  17. package/main/client/index.d.ts +13 -18
  18. package/main/client/rule.d.ts +20 -0
  19. package/main/device/index.d.ts +12 -4
  20. package/main/device/index.type.d.ts +22 -0
  21. package/main/helper/index.d.ts +8 -0
  22. package/main/layout/index.d.ts +7 -0
  23. package/main/meeting/rule.d.ts +4 -0
  24. package/main/peer/index.d.ts +34 -5
  25. package/main/peer/index.type.d.ts +24 -0
  26. package/main/peer/state.d.ts +5 -0
  27. package/main/plugin/audioPCM/audio-processor.worklet.d.ts +1 -0
  28. package/main/plugin/audioPCM/index.d.ts +32 -0
  29. package/main/plugin/audioPCM/index.type.d.ts +29 -0
  30. package/main/plugin/audioPCM/processor.d.ts +69 -0
  31. package/main/plugin/contentPreserver/index.d.ts +31 -0
  32. package/main/plugin/contentPreserver/index.type.d.ts +69 -0
  33. package/main/plugin/contentPreserver/processor.d.ts +128 -0
  34. package/main/plugin/index.type.d.ts +21 -0
  35. package/main/quality/report.d.ts +1 -0
  36. package/main/render/audioManager.d.ts +46 -0
  37. package/main/render/index.d.ts +26 -9
  38. package/main/render/index.type.d.ts +2 -5
  39. package/main/render/videoManager.d.ts +36 -2
  40. package/main/render/videoManager.type.d.ts +10 -0
  41. package/main/server/index.type.d.ts +2 -0
  42. package/main/stream/index.d.ts +3 -2
  43. package/main/track/baseTrack.d.ts +1 -1
  44. package/main/track/contentTrack.d.ts +78 -3
  45. package/main/track/helper.d.ts +1 -13
  46. package/main/track/videoAudioTrack.d.ts +85 -9
  47. package/main/vom/config.d.ts +10 -0
  48. package/main/vom/index.d.ts +4 -0
  49. package/package.json +4 -1
  50. package/tools/log/logger.worker.d.ts +1 -1
  51. package/tools/socket/socket.d.ts +1 -1
  52. package/tools/utils.d.ts +4 -124
  53. package/type/base.d.ts +5 -5
  54. package/type/client.d.ts +3 -1
  55. package/type/stream.d.ts +8 -0
  56. package/type/track.d.ts +12 -3
  57. package/xyrtc.js +14572 -12426
  58. package/tools/data/list.d.ts +0 -87
  59. package/tools/data/map.d.ts +0 -17
  60. package/tools/detector/browser.d.ts +0 -114
  61. package/tools/detector/index.d.ts +0 -187
  62. package/tools/detector/index.type.d.ts +0 -51
  63. package/tools/detector/stream.d.ts +0 -77
  64. package/tools/detector/stream.type.d.ts +0 -56
  65. package/tools/emitter.d.ts +0 -42
  66. package/tools/frame/index.d.ts +0 -36
  67. package/tools/frame/index.type.d.ts +0 -1
  68. package/tools/index.d.ts +0 -72
  69. package/tools/pressure/index.d.ts +0 -26
  70. package/tools/pressure/index.type.d.ts +0 -22
  71. package/tools/queue/async.d.ts +0 -45
  72. package/tools/queue/queue.type.d.ts +0 -10
  73. package/tools/queue/sync.d.ts +0 -36
  74. package/tools/resize.d.ts +0 -64
  75. package/tools/snapshot/index.d.ts +0 -23
  76. package/tools/snapshot/index.type.d.ts +0 -38
  77. package/tools/store.d.ts +0 -47
  78. package/tools/verify.d.ts +0 -14
  79. package/tools/window.d.ts +0 -31
package/tools/index.d.ts DELETED
@@ -1,72 +0,0 @@
1
- import { default as Logger } from './log/logger';
2
-
3
- /**
4
- * 音频分析相关模块
5
- */
6
- export { AudioAnalyser } from './analyser';
7
- export { AnalyserManager } from './analyser/manager';
8
- /**
9
- * 数据结构
10
- */
11
- export { XYList } from './data/list';
12
- export { XYMap } from './data/map';
13
- /**
14
- * 设备和采集能力检测相关模块
15
- */
16
- export { XYBrowserDetector } from './detector/browser';
17
- export { XYStreamDetector } from './detector/stream';
18
- export { XYDetector } from './detector/index';
19
- export * from './detector/index.type';
20
- export * from './detector/stream.type';
21
- /**
22
- * 日志模块
23
- */
24
- export { DBManager } from './log/db';
25
- export { Logger };
26
- export { LogManager, logManager } from './log/loggerManager';
27
- /**
28
- * 设备压力
29
- */
30
- export { XYDevicePressure } from './pressure';
31
- export * from './pressure/index.type';
32
- /**
33
- * 任务队列(同步/异步)
34
- */
35
- export { XYAsyncQueue } from './queue/async';
36
- export { XYSyncQueue } from './queue/sync';
37
- export * from './queue/queue.type';
38
- /**
39
- * 截图模块
40
- */
41
- export { XYSnapshot } from './snapshot';
42
- export * from './snapshot/index.type';
43
- /**
44
- * WebSocket管理模块
45
- */
46
- export { Socket } from './socket/socket';
47
- export { SocketManager } from './socket/socketManager';
48
- /**
49
- * 事件订阅/发布
50
- */
51
- export { XYEmitter } from './emitter';
52
- /**
53
- * IFrame交互库
54
- */
55
- export { XYFrameBridge } from './frame/index';
56
- export * from './frame/index.type';
57
- /**
58
- * 屏幕大小变化监听
59
- */
60
- export { XYResize, resize } from './resize';
61
- /**
62
- * 缓存存储管理
63
- */
64
- export { XYStore } from './store';
65
- /**
66
- * 工具函数
67
- */
68
- export { XYDebounce, XYThrottle, XYCurrentTime, TYPEOF } from './utils';
69
- /**
70
- * 系统基础信息
71
- */
72
- export { XYWindow } from './window';
@@ -1,26 +0,0 @@
1
- import { default as Logger } from '../log/logger';
2
- import { XYBaseModule } from '../../interface/baseModule.type';
3
-
4
- /**
5
- * @class
6
- * @description: Device pressure
7
- */
8
- export declare class XYDevicePressure implements XYBaseModule {
9
- private observer;
10
- private interval;
11
- private logger;
12
- private pressureState;
13
- constructor(logger: Logger);
14
- /**
15
- * 初始化设备压力监听
16
- */
17
- init(): void;
18
- /**
19
- * 监听回调事件
20
- */
21
- private pressureChange;
22
- /**
23
- * 资源销毁
24
- */
25
- destroy(): void;
26
- }
@@ -1,22 +0,0 @@
1
- /**
2
- * 设备压力等级
3
- *
4
- * @param nominal - 正常,目标设备的状况处于可接受的水平,对用户没有明显的不利影响
5
- * @param fair - 一般,设备压力略有升高,风扇活跃,除此之外,设备可以运行正常
6
- * @param serious - 严重-设备压力持续大幅度升高,系统可能进行节流减少压力和热量
7
- * @param critical - 恶略-设备温度显著升高,需要冷却以避免任何潜在问题
8
- */
9
- export declare enum PressureState {
10
- 'nominal' = 0,
11
- 'fair' = 1,
12
- 'serious' = 2,
13
- 'critical' = 3
14
- }
15
- /**
16
- * 压力数据
17
- */
18
- export interface XYDevicePressureState {
19
- source: string;
20
- state: PressureState;
21
- time: number;
22
- }
@@ -1,45 +0,0 @@
1
- import { AsyncFn } from './queue.type';
2
-
3
- export declare class XYAsyncQueue<T> {
4
- private isRunning;
5
- private taskCompletedCB;
6
- private waitingQueue;
7
- constructor();
8
- /**
9
- * 监听任务执行完成状态
10
- *
11
- * @param { (() => void) | null } callback - 任务结束回调
12
- */
13
- onTaskCompleted(callback: () => void): void;
14
- /**
15
- * 添加同步任务
16
- *
17
- * @param { AsyncFn<T> } task - 同步任务函数
18
- * @returns { Promise<T> }
19
- */
20
- addTask(task: AsyncFn<T>): Promise<T>;
21
- /**
22
- * 执行同步任务队列
23
- *
24
- * @param { AsyncFn<T> } task - 同步任务函数
25
- * @param { Fn } resolve - Resolve函数
26
- * @param { Fn } reject - Reject函数
27
- */
28
- private execute;
29
- /**
30
- * 队列任务是否执行完成
31
- *
32
- * @returns { boolean } - 结果,真假值
33
- */
34
- isTaskEnded(): boolean;
35
- /**
36
- * 获取执行中的任务数量
37
- *
38
- * @returns { number }
39
- */
40
- taskLength(): number;
41
- /**
42
- * 清空任务队列
43
- */
44
- clear(): void;
45
- }
@@ -1,10 +0,0 @@
1
- export type SyncItem = {
2
- task: Fn;
3
- };
4
- export type AsyncItem<T> = {
5
- task: AsyncFn<T>;
6
- resolve: Fn;
7
- reject: Fn;
8
- };
9
- export type Fn = (...args: any) => void;
10
- export type AsyncFn<T> = (...args: any[]) => Promise<T>;
@@ -1,36 +0,0 @@
1
- import { Fn } from './queue.type';
2
-
3
- export declare class XYSyncQueue {
4
- private isLock;
5
- private taskCompletedCB;
6
- private waitingQueue;
7
- constructor();
8
- /**
9
- * 监听任务执行完成状态
10
- *
11
- * @param { Fn } callback - 任务结束回调
12
- */
13
- onTaskCompleted(callback: Fn): void;
14
- /**
15
- * 添加任务
16
- *
17
- * @param { Fn } task - 任务函数
18
- */
19
- addTask(task: Fn): void;
20
- /**
21
- * 执行任务队列
22
- *
23
- * @param { Fn} task - 无值时,执行所有任务
24
- */
25
- execute(task?: Fn): void;
26
- /**
27
- * 获取执行中的任务数量
28
- *
29
- * @returns { number } - 任务队列长度
30
- */
31
- taskLength(): number;
32
- /**
33
- * 清空任务队列
34
- */
35
- clear(): void;
36
- }
package/tools/resize.d.ts DELETED
@@ -1,64 +0,0 @@
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 : 2024-12-23 11:16:43
8
- */
9
- /**
10
- * 元素尺寸数据
11
- */
12
- export interface ResizeData {
13
- width: number;
14
- height: number;
15
- element: HTMLElement | null;
16
- }
17
- export declare class XYResize {
18
- private eleId;
19
- private element;
20
- private resizeObserver;
21
- private detectCount;
22
- private maxDetectCount;
23
- private detectTimer;
24
- private onResize;
25
- constructor();
26
- /**
27
- * 上报Element元素的尺寸信息
28
- */
29
- private handleResize;
30
- /**
31
- * 初始化监听Dom尺寸变化
32
- *
33
- * @param { string } eleId - 监听的容器ID,如果配置为空,则直接监听window resize事件
34
- * @param { function } onResize - 变化回调函数
35
- */
36
- init(eleId: string, onResize: () => void): void;
37
- /**
38
- * 启动定时器,监听是否存在指定的Element元素
39
- * 存在则转换为Observer监听Dom方式
40
- */
41
- startDetectTimer(): void;
42
- /**
43
- * 清理检测Element的定时器
44
- */
45
- clearDetectTimer(): void;
46
- /**
47
- * 启动Window Resize监听事件
48
- */
49
- startListenerResize(): void;
50
- /**
51
- * 启动Element Dom监听大小变化事件
52
- */
53
- startObserverResize(): void;
54
- /**
55
- * 监听事件销毁事件
56
- */
57
- destroy(): void;
58
- /**
59
- * 移除Window绑定事件
60
- */
61
- removeResizeListener(): void;
62
- }
63
- declare const resize: XYResize;
64
- export { resize };
@@ -1,23 +0,0 @@
1
- import { SnapshotOptions, SnapshotResult } from './index.type';
2
-
3
- export declare class XYSnapshot {
4
- private canvas;
5
- private ctx;
6
- constructor(canvas?: HTMLCanvasElement);
7
- getCanvas(): HTMLCanvasElement;
8
- /**
9
- * 根据传入的video元素,获取对应的截图
10
- *
11
- * @param { HTMLVideoElement } videoEle - video标签元素
12
- * @param { IOptions } options - 绘制参数
13
- * @returns
14
- */
15
- getVideoImage(videoEle: HTMLVideoElement, options?: SnapshotOptions): SnapshotResult;
16
- /**
17
- * 根据相关参数,将video绘制到canvas上
18
- *
19
- * @param { IOptions } options - 绘制参数
20
- * @returns
21
- */
22
- private drawFrame;
23
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * 截图参数
3
- *
4
- * @property { string } id - 参会者Layout Id,通过layout事件列表获取
5
- * @property { string } imageType - 图片格式, 默认'image/png'
6
- * @property { number } compressLevel - 图片质量,0-1
7
- */
8
- export interface SnapshotParams {
9
- id: string;
10
- imageType?: string;
11
- compressLevel?: number;
12
- }
13
- /**
14
- * canvas绘制video参数
15
- *
16
- * @property { boolean } isMirror - 是否镜像显示
17
- * @property { number } rotate - 是否旋转
18
- * @property { string } imageType - 图片格式, 默认'image/png'
19
- * @property { number } compressLevel - 图片质量,0-1
20
- */
21
- export interface SnapshotOptions {
22
- isMirror?: boolean;
23
- rotate?: number;
24
- imageType?: string;
25
- compressLevel?: number;
26
- }
27
- /**
28
- * 截图结果
29
- *
30
- * @property { string } dataURL - 图片数据,Base64字符串
31
- * @property { number } width - 图片的宽度
32
- * @property { number } height - 图片的高度
33
- */
34
- export interface SnapshotResult {
35
- dataURL: string;
36
- width: number;
37
- height: number;
38
- }
package/tools/store.d.ts DELETED
@@ -1,47 +0,0 @@
1
- /**
2
- * Store LocalStorage
3
- * 该类提供与浏览器 localStorage 交互的方法
4
- *
5
- * @authors Luo-jinghui (luojinghui424@gmail.com)
6
- * @date 2019-11-01 14:36:12
7
- */
8
- export declare class XYStore {
9
- static storage: Storage;
10
- /**
11
- * 设置 localStorage 中的项目
12
- *
13
- * @param { string } key - 存储值的键
14
- * @param { unknown } value - 要存储的值,可以是任意类型
15
- */
16
- static set(key: string, value: unknown): void;
17
- /**
18
- * 从 localStorage 中获取项目
19
- *
20
- * @param { string } key - 要检索的项目的键
21
- * @returns { * } - 与键关联的值,如果未找到则返回空字符串
22
- */
23
- static get(key: string): any;
24
- /**
25
- * 从 localStorage 中删除项目
26
- *
27
- * @param { string } key - 要删除的项目的键
28
- */
29
- static remove(key: string): void;
30
- /**
31
- * 清除 localStorage 中的所有项目
32
- */
33
- static clear(): void;
34
- /**
35
- * 从 localStorage 中批量删除项目
36
- *
37
- * @param { string[] } array - 要删除的键的数组
38
- */
39
- static removeList(array: string[]): void;
40
- /**
41
- * 序列化要存储的值
42
- *
43
- * @param { unknown } value - 要序列化的值,可以是任意类型
44
- * @returns { string } - 序列化后的值
45
- */
46
- static serialize(value: unknown): string;
47
- }
package/tools/verify.d.ts DELETED
@@ -1,14 +0,0 @@
1
- /**
2
- * 校验 request 参数
3
- *
4
- * @param reqList
5
- * @returns isValid true:有效, false: 无效
6
- */
7
- export declare const verifyReqListParams: (reqList: any) => boolean;
8
- /**
9
- * 校验必填参数
10
- *
11
- * @param { Record<string, any> | any } requiredField 校验参数
12
- * @returns
13
- */
14
- export declare const verifyRequiredField: (requiredField: Record<string, any> | any) => import('..').IReturnResult | null;
package/tools/window.d.ts DELETED
@@ -1,31 +0,0 @@
1
- /**
2
- * 获取浏览器和系统信息
3
- */
4
- export declare class XYWindow {
5
- /**
6
- * 浏览器window对象
7
- */
8
- static window: Window;
9
- /**
10
- * 获取系统信息
11
- * 包含浏览器UA、location、屏幕信息等
12
- */
13
- static getSystemInfo(): {
14
- userAgent?: undefined;
15
- location?: undefined;
16
- devicePixelRatio?: undefined;
17
- screen?: undefined;
18
- } | {
19
- userAgent: string;
20
- location: Location;
21
- devicePixelRatio: number;
22
- screen: {
23
- width: number;
24
- height: number;
25
- availWidth: number;
26
- availHeight: number;
27
- colorDepth: number;
28
- pixelDepth: number;
29
- };
30
- };
31
- }