@xylink/xy-rtc-sdk 4.0.3 → 4.0.5

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 (148) hide show
  1. package/action/ability.d.ts +0 -1
  2. package/action/api.d.ts +15 -1
  3. package/action/auth.d.ts +3 -4
  4. package/action/base.d.ts +2 -3
  5. package/action/config.d.ts +2 -3
  6. package/action/control.d.ts +3 -4
  7. package/action/enterprise.d.ts +4 -5
  8. package/action/http.d.ts +2 -3
  9. package/action/index.d.ts +9 -10
  10. package/action/index.type.d.ts +0 -1
  11. package/action/log.d.ts +1 -2
  12. package/action/meeting.d.ts +17 -4
  13. package/enum/client.d.ts +0 -1
  14. package/enum/constraints.d.ts +0 -1
  15. package/enum/errorCode/server.d.ts +0 -1
  16. package/enum/errorCode/signal.d.ts +0 -1
  17. package/enum/index.d.ts +8 -1
  18. package/enum/meeting.d.ts +0 -1
  19. package/enum/polling.d.ts +0 -1
  20. package/export/tools.d.ts +17 -0
  21. package/feature/artboard/index.d.ts +10 -4
  22. package/feature/audioPCM/index.d.ts +29 -0
  23. package/feature/contentPreserver/index.d.ts +38 -0
  24. package/feature/customMessage/index.d.ts +1 -2
  25. package/feature/edu/index.d.ts +1 -2
  26. package/feature/edu/index.type.d.ts +0 -1
  27. package/feature/im/index.d.ts +2 -3
  28. package/feature/query/index.d.ts +2 -3
  29. package/feature/speaker/index.d.ts +2 -3
  30. package/feature/speaker/index.type.d.ts +0 -1
  31. package/feature/translation/index.d.ts +34 -0
  32. package/feature/vep/index.d.ts +56 -0
  33. package/feature/vep/index.type.d.ts +139 -0
  34. package/index.d.ts +11 -9
  35. package/interface/clientInterface.type.d.ts +11 -12
  36. package/interface/contentTrackInterface.type.d.ts +0 -1
  37. package/interface/event.type.d.ts +10 -2
  38. package/interface/extension.type.d.ts +10 -0
  39. package/interface/processor.type.d.ts +9 -0
  40. package/interface/videoAudioTrackInterface.type.d.ts +2 -3
  41. package/main/ability/const.d.ts +0 -1
  42. package/main/ability/index.d.ts +1 -2
  43. package/main/auth/index.d.ts +9 -17
  44. package/main/auth/index.type.d.ts +0 -1
  45. package/main/auth/rule.d.ts +9 -0
  46. package/main/client/clientBase.d.ts +10 -3
  47. package/main/client/clientState.d.ts +1 -2
  48. package/main/client/index.d.ts +66 -47
  49. package/main/client/rule.d.ts +19 -0
  50. package/main/device/index.d.ts +12 -5
  51. package/main/device/index.type.d.ts +22 -0
  52. package/main/helper/i18n.d.ts +0 -1
  53. package/main/helper/index.d.ts +9 -2
  54. package/main/layout/index.d.ts +11 -5
  55. package/main/layout/index.type.d.ts +2 -3
  56. package/main/layout/polling.d.ts +2 -3
  57. package/main/layout/state.d.ts +3 -4
  58. package/main/layout/template/index.d.ts +0 -1
  59. package/main/layout/template/manager.d.ts +0 -1
  60. package/main/layout/template/mobile.d.ts +0 -1
  61. package/main/layout/template/polling.d.ts +0 -1
  62. package/main/media/index.d.ts +4 -5
  63. package/main/media/index.type.d.ts +0 -1
  64. package/main/meeting/control.d.ts +1 -2
  65. package/main/meeting/control.type.d.ts +0 -1
  66. package/main/meeting/index.d.ts +8 -3
  67. package/main/meeting/rule.d.ts +3 -0
  68. package/main/meeting/verify.d.ts +1 -2
  69. package/main/peer/index.d.ts +37 -9
  70. package/main/peer/index.type.d.ts +24 -1
  71. package/main/peer/state.d.ts +4 -0
  72. package/main/plugin/audioPCM/audio-processor.worklet.d.ts +1 -0
  73. package/main/plugin/audioPCM/index.d.ts +31 -0
  74. package/main/plugin/audioPCM/index.type.d.ts +29 -0
  75. package/main/plugin/audioPCM/processor.d.ts +68 -0
  76. package/main/plugin/contentPreserver/index.d.ts +30 -0
  77. package/main/plugin/contentPreserver/index.type.d.ts +69 -0
  78. package/main/plugin/contentPreserver/processor.d.ts +127 -0
  79. package/main/plugin/index.d.ts +1 -2
  80. package/main/plugin/index.type.d.ts +21 -0
  81. package/main/quality/index.d.ts +0 -1
  82. package/main/quality/report.d.ts +2 -2
  83. package/main/render/audioManager.d.ts +45 -0
  84. package/main/render/index.d.ts +27 -11
  85. package/main/render/index.type.d.ts +2 -6
  86. package/main/render/videoManager.d.ts +36 -3
  87. package/main/render/videoManager.type.d.ts +10 -0
  88. package/main/roster/index.d.ts +41 -2
  89. package/main/server/index.d.ts +3 -4
  90. package/main/server/index.type.d.ts +2 -0
  91. package/main/signal/index.d.ts +1 -2
  92. package/main/socket/index.d.ts +2 -3
  93. package/main/stream/index.d.ts +9 -9
  94. package/main/track/baseTrack.d.ts +4 -5
  95. package/main/track/contentTrack.d.ts +80 -6
  96. package/main/track/customContentTrack.d.ts +2 -3
  97. package/main/track/customVideoAudioTrack.d.ts +2 -3
  98. package/main/track/helper.d.ts +1 -13
  99. package/main/track/videoAudioCapture.d.ts +1 -2
  100. package/main/track/videoAudioTrack.d.ts +88 -13
  101. package/main/vom/config.d.ts +9 -0
  102. package/main/vom/index.d.ts +5 -2
  103. package/package.json +6 -3
  104. package/tools/analyser/index.d.ts +0 -1
  105. package/tools/analyser/manager.d.ts +1 -2
  106. package/tools/config.d.ts +0 -1
  107. package/tools/log/db.d.ts +0 -1
  108. package/tools/log/logger.d.ts +0 -1
  109. package/tools/log/logger.worker.d.ts +1 -1
  110. package/tools/log/loggerManager.d.ts +1 -2
  111. package/tools/socket/socket.d.ts +2 -3
  112. package/tools/socket/socketManager.d.ts +2 -3
  113. package/tools/utils.d.ts +4 -125
  114. package/type/ability.d.ts +3 -1
  115. package/type/analyser.d.ts +0 -1
  116. package/type/base.d.ts +5 -5
  117. package/type/capture.d.ts +0 -1
  118. package/type/client.d.ts +9 -48
  119. package/type/index.d.ts +1 -0
  120. package/type/layout.d.ts +1 -2
  121. package/type/meeting.d.ts +4 -5
  122. package/type/quality.d.ts +1 -2
  123. package/type/stream.d.ts +11 -4
  124. package/type/subtitle.d.ts +86 -0
  125. package/type/track.d.ts +12 -4
  126. package/xyrtc.js +15952 -14725
  127. package/tools/data/list.d.ts +0 -87
  128. package/tools/data/map.d.ts +0 -17
  129. package/tools/detector/browser.d.ts +0 -114
  130. package/tools/detector/index.d.ts +0 -187
  131. package/tools/detector/index.type.d.ts +0 -51
  132. package/tools/detector/stream.d.ts +0 -77
  133. package/tools/detector/stream.type.d.ts +0 -56
  134. package/tools/emitter.d.ts +0 -42
  135. package/tools/frame/index.d.ts +0 -36
  136. package/tools/frame/index.type.d.ts +0 -1
  137. package/tools/index.d.ts +0 -72
  138. package/tools/pressure/index.d.ts +0 -26
  139. package/tools/pressure/index.type.d.ts +0 -22
  140. package/tools/queue/async.d.ts +0 -45
  141. package/tools/queue/queue.type.d.ts +0 -10
  142. package/tools/queue/sync.d.ts +0 -36
  143. package/tools/resize.d.ts +0 -64
  144. package/tools/snapshot/index.d.ts +0 -23
  145. package/tools/snapshot/index.type.d.ts +0 -38
  146. package/tools/store.d.ts +0 -47
  147. package/tools/verify.d.ts +0 -14
  148. package/tools/window.d.ts +0 -31
@@ -1,22 +1,23 @@
1
- import { default as DeviceManager } from '../device/index';
2
- import { default as Peer } from '../peer/index';
3
- import { default as BaseTrack } from './baseTrack';
1
+ import { CaptureStatus, DEVICE_KIND, FacingMode, IFacingMode, IStreamChangeType, IStreamConfig, OperateType, StreamKind, SwitchDeviceConfig, TrackLibType, AnalyserNode, PeopleTrackConfig, IReturnResult, XYVideoAudioTrackIF } from '../../type/index';
4
2
  import { default as Stream } from '../stream';
5
- import { CaptureStatus, DEVICE_KIND, FacingMode, IFacingMode, IProcessTrack, IStreamChangeType, IStreamConfig, OperateType, StreamKind, SwitchDeviceConfig, TrackLibType, AnalyserNode, PeopleTrackConfig, IReturnResult, XYVideoAudioTrackIF } from '../../type/index';
6
-
3
+ import { default as BaseTrack } from './baseTrack';
4
+ import { default as Peer } from '../peer/index';
5
+ import { default as DeviceManager } from '../device/index';
6
+ import { XYProcessorIF } from '../../interface/processor.type';
7
7
  declare class VideoAudioTrack extends BaseTrack implements XYVideoAudioTrackIF {
8
8
  deviceManager: DeviceManager;
9
9
  private audioMediaStream;
10
10
  private analyserNode;
11
11
  private facingMode;
12
12
  private trackType;
13
- private processorList;
14
- private mediaStream;
15
- private processorCount;
13
+ private processorMap;
14
+ private processorCountMap;
16
15
  private retryPublishStream;
17
16
  private captureStream;
18
17
  private meetingState;
19
18
  private baseTrackConfig;
19
+ private currentVideoTracks;
20
+ private currentAudioTracks;
20
21
  constructor(streamInstance: Stream);
21
22
  getLocalStream(): IStreamConfig[];
22
23
  getTrackType(): TrackLibType;
@@ -62,10 +63,34 @@ declare class VideoAudioTrack extends BaseTrack implements XYVideoAudioTrackIF {
62
63
  * 调用时机:createVideoAudioTrack()完成之后
63
64
  * 关联内容:N/A
64
65
  *
65
- * @param { any } processor - plugin processor
66
+ * @param { XYProcessorIF } processor - plugin processor
66
67
  * @returns { VideoAudioTrack } - current instance, support chain invoke
67
68
  */
68
- connect(processor: any): this;
69
+ connect(processor: XYProcessorIF): this;
70
+ /**
71
+ * AI插件-连接最终视频插件处理器
72
+ * 将插件处理器注入到视频流轨道中,执行视频流的定制处理,并返回处理过后的视频流;
73
+ * 使用场景:多人音视频通话时,需要针对视频流做定制处理,例如接入虚拟背景、美颜、水印等功能,可通过注入插件机制处理视频流
74
+ * 调用时机:createVideoAudioTrack()完成之后
75
+ * 关联内容:N/A
76
+ *
77
+ * @since 4.0.4
78
+ * @param { Function } processor - 视频处理器
79
+ * @returns { VideoAudioTrack } - current instance, support chain invoke
80
+ */
81
+ connectToVideo(processor: Function): this;
82
+ /**
83
+ * AI插件-连接最终音频插件处理器
84
+ * 将音频处理器注入到音频流轨道中,执行音频流的定制处理,并返回处理过后的音频流;
85
+ * 使用场景:多人音视频通话时,需要针对音频流做定制处理,例如接入语音识别、语音合成等功能,可通过注入插件机制处理音频流
86
+ * 调用时机:createVideoAudioTrack()完成之后
87
+ * 关联内容:N/A
88
+ *
89
+ * @since 4.0.4
90
+ * @param { Function } processor - 音频处理器
91
+ * @returns { VideoAudioTrack } - current instance, support chain invoke
92
+ */
93
+ connectToAudio(processor: Function): this;
69
94
  /**
70
95
  * 获取处理器队列头部任务
71
96
  *
@@ -78,25 +103,63 @@ declare class VideoAudioTrack extends BaseTrack implements XYVideoAudioTrackIF {
78
103
  * @returns { boolean } - true or false
79
104
  */
80
105
  private isProcessorEnd;
106
+ /**
107
+ * 设置处理器列表
108
+ *
109
+ * @param { PluginType } processorType - 插件类型
110
+ * @param { Function } processor - 处理器
111
+ */
112
+ private setProcessorList;
113
+ /**
114
+ * 设置处理器数量
115
+ *
116
+ * @param { PluginType } pluginType - 插件类型
117
+ */
118
+ private setProcessorCount;
81
119
  /**
82
120
  * 执行处理器队列任务
83
121
  *
84
122
  * @param { PluginProcessor } processTrack - 插件处理器
85
123
  */
86
124
  private executeProcessor;
125
+ /**
126
+ * 获取Local音频PCM处理器
127
+ *
128
+ * @returns { XYAudioPCMProcessor } - audio pcm processor
129
+ */
130
+ private getAudioPCMProcessor;
131
+ /**
132
+ * 初始化音频处理器
133
+ */
134
+ initAudioTrackProcessor(): void;
87
135
  /**
88
136
  * AI插件-摄像头和麦克风轨道处理器链路的最终节点
89
137
  *
90
- * @param { IProcessTrack } processTrack - transform track
91
- * @returns { MediaStream } - return mediaStream
138
+ * @param { T } processTrack - transform track
139
+ * @returns { Promise<MediaStreamTrack> } - return track
92
140
  */
93
- processorDestination(processTrack: IProcessTrack): Promise<MediaStream>;
141
+ processorDestination<T>(processTrack: T): Promise<T>;
94
142
  /**
95
143
  * 采集最大分辨率视频流或音频流
96
144
  *
97
145
  * @returns { Promise<MediaStream | null> }
98
146
  */
99
147
  createUserMediaStream(): Promise<MediaStream | null>;
148
+ /**
149
+ * 处理视频流或音频流
150
+ * @param { MediaStreamTrack[] | null } tracks - 视频流或音频流
151
+ * @param { PluginType } type - 视频流或音频流类型
152
+ * @returns { Promise<MediaStreamTrack | null> } - 处理后的视频流或音频流
153
+ */
154
+ private processTracks;
155
+ /**
156
+ * 合并视频流或音频流
157
+ *
158
+ * @param { MediaStreamTrack[] | null } videoTracks - 视频流
159
+ * @param { MediaStreamTrack[] | null } audioTracks - 音频流
160
+ * @returns { MediaStream } - 合并后的视频流或音频流
161
+ */
162
+ private mergeAndPublishTracks;
100
163
  /**
101
164
  * 获取本地音频StreamConfig配置
102
165
  *
@@ -226,6 +289,18 @@ declare class VideoAudioTrack extends BaseTrack implements XYVideoAudioTrackIF {
226
289
  * Clear audio level
227
290
  */
228
291
  private clearAudioLevel;
292
+ /**
293
+ * 恢复音频PCM处理器
294
+ */
295
+ enableAudioPCMProcessor(enable?: boolean): void;
296
+ /**
297
+ * 清除音频PCM处理器
298
+ */
299
+ disableAudioPCMProcessor(): void;
300
+ /**
301
+ * 销毁音频PCM处理器
302
+ */
303
+ clearAudioPCMProcessor(): void;
229
304
  /**
230
305
  * 切换低性能模式,重新采集&发送People和Content的能力
231
306
  */
@@ -0,0 +1,9 @@
1
+ import { IStreamChange } from '../../type/index';
2
+ /**
3
+ * 默认content 720p的vom配置
4
+ */
5
+ export declare const DEFAULT_CONTENT_720P_STREAM_CHANGE: IStreamChange;
6
+ /**
7
+ * 默认content 1080p的vom配置
8
+ */
9
+ export declare const DEFAULT_CONTENT_1080P_STREAM_CHANGE: IStreamChange;
@@ -1,6 +1,5 @@
1
- import { IStreamChangeListType, IStreamChangeType } from '../../type/index';
2
1
  import { default as XYRTCClient } from '../client';
3
-
2
+ import { IStreamChangeListType, IStreamChangeType } from '../../type/index';
4
3
  export declare class VOM {
5
4
  protected clientInstance: XYRTCClient;
6
5
  private streamChange;
@@ -26,6 +25,10 @@ export declare class VOM {
26
25
  * 临时禁用content的发送通道
27
26
  */
28
27
  disableContentStreamChange(): Promise<void>;
28
+ /**
29
+ * 设置初始分享Content时的默认带宽
30
+ */
31
+ setDefaultContentBandwidth(): void;
29
32
  /**
30
33
  * 结束分享,清空content的vom配置
31
34
  */
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@xylink/xy-rtc-sdk",
3
- "version": "4.0.3",
3
+ "version": "4.0.5",
4
+ "scripts": {},
4
5
  "author": "jinghui-Luo",
5
6
  "email": "luojinghui424@gmail.com",
6
7
  "bugs": {
@@ -36,5 +37,7 @@
36
37
  "terser": "^5.37.0",
37
38
  "uuid": "^10.0.0"
38
39
  },
39
- "scripts": {}
40
- }
40
+ "dependencies": {
41
+ "@xylink/xy-toolkit": "^0.1.0"
42
+ }
43
+ }
@@ -1,5 +1,4 @@
1
1
  import { AnalyserConfig } from '../../type/index';
2
-
3
2
  export declare class AudioAnalyser {
4
3
  level: number;
5
4
  private audioContext;
@@ -1,6 +1,5 @@
1
- import { default as Client } from '../../main/client';
2
1
  import { AnalyserConfig, AnalyserNode } from '../../type/index';
3
-
2
+ import { default as Client } from '../../main/client';
4
3
  export declare class AnalyserManager {
5
4
  private analyserMap;
6
5
  private logger;
package/tools/config.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { XYVersion } from '../type/base';
2
-
3
2
  export declare const SDKVersion: XYVersion;
4
3
  export declare const version: string;
5
4
  export declare const serverProtocolMap: Record<string, string>;
package/tools/log/db.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { ILoggerConfig } from '../../type/index';
2
-
3
2
  export declare class DBManager {
4
3
  dbInstance: any;
5
4
  config: ILoggerConfig;
@@ -1,5 +1,4 @@
1
1
  import { LogLevel, ILoggerConfig, TLogLevel, UploadLogParams } from '../../type/index';
2
-
3
2
  declare class Logger {
4
3
  private action;
5
4
  private worker;
@@ -4,7 +4,7 @@
4
4
  * @authors Luo-jinghui (luojinghui424@gmail.com)
5
5
  *
6
6
  * Created at : 2023-04-24 14:16:27
7
- * Last modified : 2024-11-12 18:30:35
7
+ * Last modified : 2025-03-20 18:42:32
8
8
  */
9
9
  declare const _default: typeof Worker & (new () => Worker);
10
10
  export default _default;
@@ -1,6 +1,5 @@
1
- import { ILoggerConfig, UploadLogParams } from '../../type/index';
2
1
  import { default as Logger } from './logger';
3
-
2
+ import { ILoggerConfig, UploadLogParams } from '../../type/index';
4
3
  declare class LogManager {
5
4
  private logMap;
6
5
  private static instance;
@@ -1,7 +1,6 @@
1
- import { XYEmitter } from '../emitter';
2
- import { SocketOptions, XYSocketEventKey } from '../../type/index';
3
1
  import { default as Logger } from '../log/logger';
4
-
2
+ import { XYEmitter } from '@xylink/xy-toolkit';
3
+ import { SocketOptions, XYSocketEventKey } from '../../type/index';
5
4
  export declare class Socket extends XYEmitter<XYSocketEventKey> {
6
5
  socket: WebSocket;
7
6
  private options;
@@ -1,7 +1,6 @@
1
- import { default as Logger } from '../log/logger';
2
- import { Socket } from './socket';
3
1
  import { SocketOptions } from '../../type/socket';
4
-
2
+ import { Socket } from './socket';
3
+ import { default as Logger } from '../log/logger';
5
4
  export declare class SocketManager {
6
5
  private sockets;
7
6
  constructor();
package/tools/utils.d.ts CHANGED
@@ -1,67 +1,4 @@
1
1
  import { IReturnResult, XYError } from '../type/index';
2
-
3
- /**
4
- * 防抖函数
5
- *
6
- * 在事件被触发N秒后再执行回调,如果在这N秒内又被触发,则重新计时
7
- * 适用于输入框实时搜索、窗口Resize等场景
8
- *
9
- * @param { Function } fn - 需要防抖的函数
10
- * @param { number } delay - 延迟执行的时间(ms)
11
- * @returns { Function } 返回新的防抖函数
12
- */
13
- export declare const XYDebounce: (fn: Function, delay: number) => () => void;
14
- /**
15
- * 节流函数
16
- *
17
- * 规定一个单位时间,在这个单位时间内,只能有一次触发事件的回调函数执行
18
- * 如果在同一个单位时间内某事件被触发多次,只有一次能生效
19
- * 适用于拖拽场景、计算鼠标移动距离等场景
20
- *
21
- * @param { Function } fn - 需要节流的函数
22
- * @param { number } delay - 最后一次延迟触发时间(ms)
23
- * @param { number } atleast - 触发最短间隔时间(ms)
24
- * @returns { Function } 返回新的节流函数
25
- */
26
- export declare const XYThrottle: (fn: Function, delay: number, atleast: number) => () => void;
27
- /**
28
- * 获取当前时间
29
- *
30
- * 格式:xxxx-xx-xx xx:xx
31
- */
32
- export declare const XYCurrentTime: () => string;
33
- /**
34
- * 获取当前时间
35
- *
36
- * Format:xxxx-xx-xx xx:xx:xx xx
37
- */
38
- export declare const getTime: () => string;
39
- /**
40
- * 获取当前时间
41
- *
42
- * Format:xx:xx:xx xx
43
- */
44
- export declare const getMillTime: () => string;
45
- /**
46
- * 计算两个时间戳相差的天数, 四舍五入保留一位小数
47
- *
48
- * @param { number } time1 - 时间戳1
49
- * @param { number } time2 - 时间戳2
50
- * @returns { number } day - 天数
51
- */
52
- export declare const diffTime: (time1: number, time2: number) => number;
53
- export declare function mapToObj<T>(data: Map<string, T>): {
54
- [key: string]: T;
55
- };
56
- /**
57
- * 将对象转换为Map
58
- *
59
- * @param { object } obj - 需要转换的对象
60
- * @returns { Map<string, any> } - 转换后的Map对象
61
- */
62
- export declare function objToMap(obj: {
63
- [key: string]: any;
64
- }): Map<string, any>;
65
2
  /**
66
3
  * 获取上报数据状态
67
4
  *
@@ -88,37 +25,6 @@ export declare const getError: (error?: any) => XYError;
88
25
  * @returns { any } - 隐藏后的信息
89
26
  */
90
27
  export declare const hideKeyInfo: (data: any, key: string | string[], maxDepth?: number) => any;
91
- /**
92
- * 判断值类型
93
- */
94
- export declare const TYPEOF: {
95
- isNumber(num: any): num is number;
96
- isObject(obj: any): boolean;
97
- isArray(arr: any): arr is any[];
98
- isString(str: any): str is string;
99
- isBoolean(str: any): str is boolean;
100
- isUndefined(str: any): str is undefined;
101
- isFunction(val: any): val is Function;
102
- isLetter(val: any): boolean;
103
- isChinese(val: any): boolean;
104
- isNumberText(val: any): boolean;
105
- isSpecialChar(val: any): boolean;
106
- isWhiteSpace(val: any): boolean;
107
- };
108
- /**
109
- * JSON字符串转对象
110
- *
111
- * @param { any } jsonString
112
- * @returns { object}
113
- */
114
- export declare const jsonParse: (jsonString: any) => any;
115
- /**
116
- * 字符串转 JSON 字符串
117
- *
118
- * @param {string|object} value
119
- * @returns {string}
120
- */
121
- export declare const jsonStringify: (value: string | object) => string;
122
28
  /**
123
29
  * 清空中文/英文括号和括号内部的内容,返回一个新的字符串
124
30
  *
@@ -127,36 +33,9 @@ export declare const jsonStringify: (value: string | object) => string;
127
33
  */
128
34
  export declare const clearBrackets: (str: string) => string;
129
35
  /**
130
- * 构造查询字符串
36
+ * 获取调用者函数名称
131
37
  *
132
- * @param { Object } params - 需要转换的参数
133
- * @returns { string }
134
- */
135
- export declare const buildQueryString: (params: Record<string, any>) => string;
136
- /**
137
- * 替换字符串中的占位符
138
- *
139
- * @param { string } str - 原始字符串
140
- * @param { object } replacements - 替换的键值对
141
- * @returns { string } 替换后的字符串
142
- */
143
- export declare const replacePlaceholders: (str: string, replacements: {
144
- [key: string]: string;
145
- }) => string;
146
- /**
147
- * 拆分url
148
- *
149
- * @param { string } url - 需要拆分的url
150
- * @returns
151
- */
152
- export declare const splitUrl: (url: string) => {
153
- baseUrl: string;
154
- pathname: string;
155
- } | {
156
- baseUrl?: undefined;
157
- pathname?: undefined;
158
- };
159
- /**
160
- * 取值小数三位
38
+ * @returns { string } 调用者函数名称
161
39
  */
162
- export declare const getDecimal: (num: number, digits?: number) => number;
40
+ declare function getCallerFunctionName(): string;
41
+ export { getCallerFunctionName };
package/type/ability.d.ts CHANGED
@@ -4,11 +4,13 @@
4
4
  * @param { string } USE_SEC_API - 终端是否要使用uss新接口
5
5
  * @param { string } MEETING_SHARE_NEW_PAGE_API - 会议邀请漏洞修复使用新page API
6
6
  * @param { string } CHANGE_SEC_API - 终端录制接口整改为安全接口
7
+ * @param { string } TRANSCRIPTION_API - 录制与转写分离,开启、关闭字幕使用新的接口
7
8
  */
8
9
  export declare enum AbilityKey {
9
10
  USE_SEC_API = "use_sec_api",
10
11
  MEETING_SHARE_NEW_PAGE_API = "meeting_share_new_page_api",
11
- CHANGE_SEC_API = "hvv_240329"
12
+ CHANGE_SEC_API = "hvv_240329",
13
+ TRANSCRIPTION_API = "transcription_250627"
12
14
  }
13
15
  /**
14
16
  * 能力集
@@ -1,5 +1,4 @@
1
1
  import { AudioAnalyser } from '../tools/analyser';
2
-
3
2
  /**
4
3
  * 分析器配置
5
4
  *
package/type/base.d.ts CHANGED
@@ -71,11 +71,11 @@ export type Key = string | number;
71
71
  * @param { TIMESTAMP } - 时间戳
72
72
  */
73
73
  export declare enum XY_STORAGE_KEY {
74
- ABILITY = "XY-ABILITY",
75
- LOG_SERVER = "xy-log-server",
76
- ERROR_CODE = "xy-error-code",
77
- I18N_CODE = "xy-i18n-code",
78
- TIMESTAMP = "xy-timestamp"
74
+ ABILITY = "XY_ABILITY",
75
+ LOG_SERVER = "XY_LOG_SERVER",
76
+ ERROR_CODE = "XY_ERROR_CODE",
77
+ I18N_CODE = "XY_I18N_CODE",
78
+ TIMESTAMP = "XY_TIMESTAMP"
79
79
  }
80
80
  /**
81
81
  * 可支持的编解码
package/type/capture.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { IStreamConfig } from './stream';
2
-
3
2
  export interface IEnableStreamConfig {
4
3
  videoConfig: IStreamConfig | undefined;
5
4
  audioConfig: IStreamConfig | undefined;
package/type/client.d.ts CHANGED
@@ -1,10 +1,9 @@
1
- import { ILayout, IRoster } from './index';
2
- import { ContentTemplateMode, TemplateMode, ChairManReason } from './layout';
3
- import { ConferenceProperties, ICloudRoomConfig, WatermarkRange, WatermarkStatus } from './meeting';
4
- import { SupportLocalLanguages } from '../enum/index';
5
- import { IInternals, StreamFrameRate, StreamResolution, StreamResolutionLevel, VideoQuality } from './stream';
6
1
  import { IToken } from './base';
7
-
2
+ import { IInternals, StreamFrameRate, StreamResolution, StreamResolutionLevel, VideoQuality } from './stream';
3
+ import { SupportLocalLanguages } from '../enum/index';
4
+ import { ConferenceProperties, ICloudRoomConfig, WatermarkRange, WatermarkStatus } from './meeting';
5
+ import { ContentTemplateMode, TemplateMode, ChairManReason } from './layout';
6
+ import { ILayout, IRoster } from './index';
8
7
  /**
9
8
  * 向Client推送流类型
10
9
  *
@@ -501,7 +500,7 @@ export interface XYMeetingControl {
501
500
  * @property { string } meetingId - 当前会议ID
502
501
  * @property { string } config - 会议室配置
503
502
  * @property { string } displayConfig - 可见性配置
504
- * @property { string } mpvc - 点对点呼叫会议号
503
+ * @property { string } mpvc - 点对点和多点的临时会议室号(多点是几个终端呼起来的,没有真正的会议室号),有些场景会控需要。
505
504
  * @property { XYMeetingControl } meetingControl - 会控信息
506
505
  */
507
506
  export interface IConferenceInfo extends Partial<ConferenceProperties> {
@@ -700,7 +699,7 @@ export interface IMeetingControl {
700
699
  * @property { string } chairManUrl - 当前主画面设备的callUrl,没有为''
701
700
  * @property { string } contentUri - 当前会议共享内容设别的callUrl,没有为''
702
701
  * @property { string } actSpkUri - 当前会议语音激励者的callUrl,没有为''
703
- * @property { IMediaGroupInfo[] } mediaGroupnfo - 多分组通人数信息,默认上报0和1分组,分别代表People通道和Content通道
702
+ * @property { IMediaGroupInfo[] } mediaGroupInfo - 多分组通人数信息,默认上报0和1分组,分别代表People通道和Content通道
704
703
  * @property { ChairManReason } ChairManReason - 主画面对应的模式,默认是主会场模式
705
704
  * @property { number } onHoldCount - 等候室人数
706
705
  * @property { number } audioTxUnMuteEpCount - 未静音人数
@@ -830,46 +829,6 @@ export interface ICustomStreamTrack {
830
829
  track: MediaStreamTrack;
831
830
  };
832
831
  }
833
- /**
834
- * 字幕消息
835
- *
836
- * @property { number } callIndex - 消息序列号
837
- * @property { string } content - 字幕规则
838
- * @property { string } type - 字幕类型
839
- */
840
- export interface ISubTitle {
841
- callIndex: number;
842
- content: string;
843
- type: string;
844
- }
845
- /**
846
- * 字幕消息内容,包含内容、字体、背景等
847
- *
848
- * @property { string } content - 字幕内容
849
- * @property { string? } i18nKey - 字幕内容国际化语言key
850
- * @property { string? } fontFamily - 字体
851
- * @property { string? } fontRGB - 字体色
852
- * @property { "1" | "0" } scroll - 是否滚动,"1"代表滚动字幕,"0"代表固定字幕
853
- * @property { "push" | "cancel" | string } action - 动作,"push"代表显示字幕;"cancel"代表取消字幕
854
- * @property { string? } location - 位置'top' | 'middle' | 'bottom',分别代表上、中、下位置
855
- * @property { string? } fontSize - 位置'small' | 'middle' | 'big',分别代表小、中、大号字体
856
- * @property { string? } backgroundAlpha - 背景色
857
- * @property { string? } scrollSpeed - 滚动速度
858
- * @property { string? } backgroundRGB - 背景色
859
- */
860
- export interface ISubTitleContent {
861
- content: string;
862
- i18nKey?: string;
863
- fontFamily?: string;
864
- fontRGB?: string;
865
- scroll?: '1' | '0';
866
- action?: 'push' | 'cancel' | string;
867
- location?: 'top' | 'middle' | 'bottom';
868
- fontSize?: 'small' | 'middle' | 'big';
869
- backgroundAlpha?: string;
870
- scrollSpeed?: string;
871
- backgroundRGB?: string;
872
- }
873
832
  /**
874
833
  * 通话字幕-本地支持的语言
875
834
  */
@@ -1077,6 +1036,7 @@ export interface IReceiveCustomMessage {
1077
1036
  * @property { boolean } enableMobileNotAuth 移动端是否支持无授权入会, 默认设置为false
1078
1037
  * @property { boolean } enableWatermarkContent 是否启用获取content水印内容, 默认启用, 设置为true
1079
1038
  * @property { boolean } enableHideLocalView 是否启用隐藏本地画面模式,默认不启用,设置为false
1039
+ * @property { boolean } enableAudioPCM 是否启用音频PCM,默认不启用,设置为false
1080
1040
  */
1081
1041
  export interface IFeatureConfig {
1082
1042
  enableMeetingShout?: boolean;
@@ -1092,6 +1052,7 @@ export interface IFeatureConfig {
1092
1052
  enableMobileNotAuth?: boolean;
1093
1053
  enableWatermarkContent?: boolean;
1094
1054
  enableHideLocalView?: boolean;
1055
+ enableAudioPCM?: boolean;
1095
1056
  }
1096
1057
  /**
1097
1058
  * SDK功能控制开关的key
package/type/index.d.ts CHANGED
@@ -21,6 +21,7 @@ export * from './capture';
21
21
  export * from './auth';
22
22
  export * from './polling';
23
23
  export * from './socket';
24
+ export * from './subtitle';
24
25
  export * from '../main/meeting/control.type';
25
26
  export * from '../main/meeting/verify.type';
26
27
  export * from '../main/server/index.type';
package/type/layout.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { StreamResolutionLevel, VideoQuality } from './stream';
2
1
  import { ExternalTemplateConfig, ILayout, IRoster } from './index';
3
-
2
+ import { StreamResolutionLevel, VideoQuality } from './stream';
4
3
  /**
5
4
  * Layout List数据,支持画面重复渲染
6
5
  *
package/type/meeting.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { StreamFrameRate, StreamResolution } from './stream';
2
- import { ILoginInfo } from './client';
3
1
  import { LayoutAvatarType } from './index';
4
-
2
+ import { ILoginInfo } from './client';
3
+ import { StreamFrameRate, StreamResolution } from './stream';
5
4
  /**
6
5
  * 水印范围
7
6
  *
@@ -343,8 +342,8 @@ export interface ConferenceProperties {
343
342
  /**
344
343
  * 会议室通用配置
345
344
  *
346
- * @property { string } displayNum - 显示号码
347
- * @property { string } mpvc - 点对点和多点的临时会议室号
345
+ * @property { string } displayNum - 显示云会议室号码, 点对点显示不使用此值,直接显示呼叫的号码
346
+ * @property { string } mpvc - 点对点和多点的临时会议室号(多点是几个终端呼起来的,没有真正的会议室号),有些场景如会控需要。
348
347
  * @property { string } confAuxProperties - 云会议室属性配置
349
348
  * @property { IWaitingRoomProps } waitingRoomProps - 等候室属性配置
350
349
  */
package/type/quality.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { IStreamConfig } from './stream';
2
1
  import { ILayout } from './index';
3
-
2
+ import { IStreamConfig } from './stream';
4
3
  /**
5
4
  * 网络质量信号等级
6
5
  *
package/type/stream.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { XYDisplaySurface } from './track';
2
- import { ContentMode } from './client';
3
- import { IReturnResult } from './base';
4
1
  import { FACING_MODE_LIST } from '../enum/index';
5
-
2
+ import { IReturnResult } from './base';
3
+ import { ContentMode } from './client';
4
+ import { XYDisplaySurface } from './track';
6
5
  /**
7
6
  * 设备类型枚举列表
8
7
  *
@@ -427,9 +426,13 @@ export type IInternels = IInternals;
427
426
  * @property { number } framesDecodedSecond - 每秒frame编码量
428
427
  * @property { number } framesReceived - frame接收量
429
428
  * @property { number } framesReceivedSecond - 每秒frame接收量
429
+ * @property { number } freezeCount - 冻结帧数(2025/03/25新增)
430
430
  * @property { boolean } isContent - 是否是分享content
431
431
  * @property { boolean } isSupport - 忽略
432
432
  * @property { number } jitterBufferDelay - 音频样本或视频帧从接收到退出抖动缓冲区所花费的时间总和,以秒为单位
433
+ * @property { number } jitterBufferEmittedCount - 每次抖动缓冲区发出样本时,此值都会增加目标抖动缓冲区延迟。添加的目标是从抖动缓冲区发出样本时的目标延迟(以秒为单位)。要获得平均目标延迟,请除以 jitterBufferEmittedCount(2025/03/25新增)
434
+ * @property { number } jitterBufferMinimumDelay - 在没有外部因素影响的情况下,基于网络特性(如抖动和丢包)所能达到的最小抖动缓冲延迟
435
+ * @property { number } jitterBufferTargetDelay - 目标抖动缓冲延迟,即 每次从抖动缓冲区输出音视频数据时的目标延迟累积值(单位:秒),平均目标延迟计算是:jitterBufferTargetDelay / jitterBufferEmittedCount
433
436
  * @property { number } keyFramesDecoded - 代表关键帧的总数
434
437
  * @property { number } nackCount - 计算此接收器发送的否定确认(NACK)数据包的总数
435
438
  * @property { string } name - 与会者昵称
@@ -470,9 +473,13 @@ export interface IReceiver {
470
473
  framesDecodedSecond?: number;
471
474
  framesReceived?: number;
472
475
  framesReceivedSecond?: number;
476
+ freezeCount?: number;
473
477
  isContent?: boolean;
474
478
  isSupport?: boolean;
475
479
  jitterBufferDelay?: number;
480
+ jitterBufferEmittedCount?: number;
481
+ jitterBufferMinimumDelay?: number;
482
+ jitterBufferTargetDelay?: number;
476
483
  keyFramesDecoded?: number;
477
484
  nackCount?: number;
478
485
  name?: string;