@xylink/xy-rtc-sdk 4.0.6 → 4.0.8

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 (63) hide show
  1. package/README.md +16 -8
  2. package/action/ability.d.ts +82 -0
  3. package/action/api.d.ts +40 -3
  4. package/action/auth.d.ts +32 -1
  5. package/action/index.d.ts +4 -0
  6. package/action/index.type.d.ts +3 -1
  7. package/action/meeting.d.ts +20 -0
  8. package/enum/client.d.ts +3 -1
  9. package/enum/constraints.d.ts +88 -1
  10. package/enum/customizedkey.d.ts +10 -0
  11. package/enum/doc.d.ts +13 -0
  12. package/enum/errorCode/index.d.ts +3 -0
  13. package/enum/index.d.ts +63 -3
  14. package/enum/polling.d.ts +9 -0
  15. package/feature/artboard/index.d.ts +1 -0
  16. package/feature/customMessage/index.d.ts +7 -0
  17. package/feature/electron/index.d.ts +25 -0
  18. package/feature/index.d.ts +4 -0
  19. package/interface/contentTrackInterface.type.d.ts +0 -1
  20. package/interface/event.type.d.ts +13 -0
  21. package/main/auth/index.d.ts +12 -1
  22. package/main/auth/index.type.d.ts +24 -0
  23. package/main/client/index.d.ts +44 -5
  24. package/main/layout/index.d.ts +12 -4
  25. package/main/layout/polling.d.ts +199 -19
  26. package/main/layout/state.d.ts +46 -5
  27. package/main/media/index.d.ts +4 -0
  28. package/main/media/index.type.d.ts +11 -1
  29. package/main/meeting/control.d.ts +19 -2
  30. package/main/meeting/index.d.ts +26 -4
  31. package/main/meeting/index.type.d.ts +25 -4
  32. package/main/peer/index.d.ts +2 -1
  33. package/main/peer/index.type.d.ts +36 -0
  34. package/main/quality/index.d.ts +36 -0
  35. package/main/quality/index.type.d.ts +27 -0
  36. package/main/render/videoManager.d.ts +6 -2
  37. package/main/roster/index.d.ts +7 -0
  38. package/main/server/index.d.ts +1 -0
  39. package/main/signal/index.type.d.ts +5 -0
  40. package/main/signal/reconnection.d.ts +46 -0
  41. package/main/socket/index.d.ts +2 -2
  42. package/main/track/baseTrack.d.ts +7 -4
  43. package/main/track/contentCapture.d.ts +59 -0
  44. package/main/track/contentTrack.d.ts +50 -38
  45. package/main/track/helper.d.ts +2 -11
  46. package/package.json +4 -5
  47. package/tools/aes.d.ts +33 -0
  48. package/tools/log/db.d.ts +1 -1
  49. package/tools/socket/socketManager.d.ts +1 -0
  50. package/tools/utils.d.ts +8 -0
  51. package/type/ability.d.ts +3 -1
  52. package/type/action.d.ts +2 -0
  53. package/type/base.d.ts +13 -0
  54. package/type/client.d.ts +54 -19
  55. package/type/index.d.ts +3 -0
  56. package/type/logger.d.ts +13 -1
  57. package/type/meeting.d.ts +7 -13
  58. package/type/polling.d.ts +57 -13
  59. package/type/quality.d.ts +2 -0
  60. package/type/socket.d.ts +2 -0
  61. package/type/stream.d.ts +39 -9
  62. package/type/track.d.ts +95 -6
  63. package/xyrtc.js +19135 -15732
@@ -1,4 +1,4 @@
1
- import { ILayoutRoster } from '../../type/index';
1
+ import { ILayoutRoster, IRoster } from '../../type/index';
2
2
  /**
3
3
  * 请流结果数据结构
4
4
  */
@@ -27,3 +27,13 @@ export interface XYMultiGroupInfo {
27
27
  endpointId: string;
28
28
  mediagrps: XYMediaGrps[];
29
29
  }
30
+ /**
31
+ * 参会者列表数据结构
32
+ *
33
+ * @property { IRoster[] } rosters - 参会者列表
34
+ * @property { IRoster[] } hiddenRosterInfo - 隐藏的参会者列表
35
+ */
36
+ export interface XYRosters {
37
+ rosters: IRoster[];
38
+ hiddenRosterInfo: IRoster[];
39
+ }
@@ -10,9 +10,12 @@ export declare class XYMeetingControl implements XYBaseModule {
10
10
  private recordStatusNotification;
11
11
  private recordState;
12
12
  private signInServerAPI;
13
+ private signInServerPromise;
14
+ private interactiveToolInfo;
13
15
  constructor(client: XYRTCClient);
14
16
  destroy(): void;
15
17
  getOnHold(): boolean;
18
+ getHandStatus(): boolean;
16
19
  /**
17
20
  * 设置本地是否在等候室
18
21
  *
@@ -40,11 +43,17 @@ export declare class XYMeetingControl implements XYBaseModule {
40
43
  */
41
44
  handleRealTimeNotificationMessage(data: OriginalRealTimeNotification): Promise<void>;
42
45
  /**
43
- * 通过serverconfig获取签到url
46
+ * 通过serverConfig获取签到url
44
47
  *
45
- * @param { string } urlPropv3 - 签到url key
48
+ * @param { string } urlPropKey - 签到url key
46
49
  */
47
50
  private getSignInServer;
51
+ /**
52
+ * 实际执行获取签到服务器的请求
53
+ *
54
+ * @param { string } urlPropKey - 签到url key
55
+ */
56
+ private fetchSignInServer;
48
57
  /**
49
58
  * 获取签到文案
50
59
  *
@@ -120,6 +129,14 @@ export declare class XYMeetingControl implements XYBaseModule {
120
129
  emitRecordStatusNotification(): void;
121
130
  /**
122
131
  * 停止云端录制
132
+ *
133
+ * 调用时机: 用户手动调用
123
134
  */
124
135
  stopCloudRecord(): IReturnResult | Promise<never>;
136
+ /**
137
+ * 停止云端录制
138
+ *
139
+ * 调用时机: 重呼时,上报给用户停止云端录制
140
+ */
141
+ stopCloudRecordAndReport(): void;
125
142
  }
@@ -1,6 +1,6 @@
1
1
  import { IConferenceInfo, IRecordPermission, IExportUserInfo, ILayout, IMediaConfig, IReqInfo, IEnterpriseConfig, LayoutAvatarType, TLayoutMap, InviteInfo, MEETING_DIRECTION, IVideoProfile, IMeetingControl, FocusViewAction } from '../../type/index';
2
2
  import { default as Client } from '../client';
3
- import { XYConferencePropertiesMessage, XYEnterpriseInfo, XYUicustomization } from './index.type';
3
+ import { XYEnterpriseInfo, XYUicustomization } from './index.type';
4
4
  declare class Meeting {
5
5
  private client;
6
6
  private logger;
@@ -13,8 +13,13 @@ declare class Meeting {
13
13
  private enterpriseConfig;
14
14
  private userInfo;
15
15
  private meetingControlInfo;
16
+ private mmsSubtitle;
16
17
  constructor(client: Client);
17
18
  destroy(): void;
19
+ /**
20
+ * 通话字幕状态-是否可用
21
+ */
22
+ get isSubtitleEnabled(): boolean;
18
23
  getRecordPermission(): IRecordPermission;
19
24
  getLayoutImageAvatarMap(): Map<string, {
20
25
  url: string;
@@ -25,6 +30,11 @@ declare class Meeting {
25
30
  getConferenceInfo(): IConferenceInfo;
26
31
  getEnterpriseConfig(): IEnterpriseConfig;
27
32
  getLayoutAvatarType(): LayoutAvatarType;
33
+ /**
34
+ * 获取会控消息
35
+ *
36
+ * @returns { IMeetingControl } 会控消息
37
+ */
28
38
  getMeetingControlInfo(): IMeetingControl | null;
29
39
  /**
30
40
  * 清空已退会的终端头像
@@ -77,6 +87,12 @@ declare class Meeting {
77
87
  * 获取个人云会议室信息,包含入会密码和个人云会议室号
78
88
  */
79
89
  getCloudMeetingRooms(): Promise<any>;
90
+ /**
91
+ * 获取个人云会议配置
92
+ * 说明:2024/5/23农商行需求分区云调用,ones id: #364882
93
+ * 此接口获取两个个人云会议室配置开关,通过charge接口获取
94
+ */
95
+ getCloudMeetingRoomsConfig(): Promise<void>;
80
96
  /**
81
97
  * 获取会议控制信息, 包含是否是主持人、是否需要会控密码
82
98
  *
@@ -189,9 +205,9 @@ declare class Meeting {
189
205
  /**
190
206
  * 处理云会议室属性消息
191
207
  *
192
- * @param { XYConferencePropertiesMessage } data - 云会议室属性消息
208
+ * @param { Record<string, any> } data - 云会议室属性消息
193
209
  */
194
- handleConferencePropertiesMessage(data: XYConferencePropertiesMessage): void;
210
+ handleConferencePropertiesMessage(data: Record<string, any>): void;
195
211
  /**
196
212
  * 获取管理平台角色相关权限,包含录制权限
197
213
  *
@@ -210,6 +226,12 @@ declare class Meeting {
210
226
  * @param { string } displayName - 入会名称
211
227
  * @returns
212
228
  */
213
- checkSensitiveWord(displayName: string): Promise<import('./index.type').XYSensitiveWords | null>;
229
+ checkSensitiveWord(displayName: string): Promise<import('../../type/index').XYSensitiveWords | null>;
230
+ /**
231
+ * 处理通话字幕、转写状态变更事件
232
+ *
233
+ * @param { Record<string, any> } data - 通话字幕、转写状态变更事件
234
+ */
235
+ handleTranscriptionStatus(data: Record<string, any>): void;
214
236
  }
215
237
  export default Meeting;
@@ -1,3 +1,4 @@
1
+ import { XYCommonState } from '../../type/base';
1
2
  /**
2
3
  * 企业配置相关信息
3
4
  *
@@ -29,15 +30,35 @@ export interface XYSensitiveWords {
29
30
  /**
30
31
  * 会议属性
31
32
  *
32
- * @property { string } enableContentLive - 是否开启了多路内容共享
33
- * @property { string } enableContentLiveOnHold - 是否开启了指定内容广播
33
+ * @property { boolean } enableContentLive - 是否开启了多路内容共享
34
+ * @property { boolean } enableContentLiveOnHold - 是否开启了指定内容广播
34
35
  * @property { string } shareChatContentPermission - 共享聊天内容权限
35
36
  * @since 4.0.2
36
37
  * @property { string } confRoomOwnerList - 会议室owner列表
38
+ * @since 4.0.6
39
+ * @property { boolean } professionalMC - 是否显示会控专业模式
40
+ * @property { boolean } manageSubtitle - 是否开启字幕管理
37
41
  */
38
42
  export interface XYConferencePropertiesMessage {
39
- enableContentLive?: 'true' | 'false';
40
- enableContentLiveOnHold?: 'true' | 'false';
43
+ enableContentLive?: boolean;
44
+ enableContentLiveOnHold?: boolean;
41
45
  shareChatContentPermission?: '0' | '1';
42
46
  confRoomOwnerList?: string;
47
+ professionalMC?: boolean;
48
+ manageSubtitle?: boolean;
49
+ }
50
+ export declare enum XYTranscriptionType {
51
+ SUBTITLE = 2
52
+ }
53
+ /**
54
+ * 通话字幕、转写状态变更事件
55
+ *
56
+ * @property { XYTranscriptionType } type - 事件类型
57
+ * @property { { mmsSubtitle: XYCommonState } } body - 事件内容
58
+ */
59
+ export interface XYTranscriptionStatus {
60
+ type: XYTranscriptionType;
61
+ body: {
62
+ mmsSubtitle: XYCommonState;
63
+ };
43
64
  }
@@ -20,7 +20,8 @@ export default class Peer extends State {
20
20
  private videoCodecs;
21
21
  private audioCodecs;
22
22
  private qualityWorker;
23
- private localIPAddress;
23
+ private localCandidateInfo;
24
+ private remoteCandidateInfo;
24
25
  private peerLibStatus;
25
26
  private firstCallState;
26
27
  private peerCallState;
@@ -31,3 +31,39 @@ export interface XYStreamParameterConfig {
31
31
  export interface XYRTCSessionDescriptionInit extends RTCSessionDescriptionInit {
32
32
  offerKey?: string;
33
33
  }
34
+ /**
35
+ * 协商网络信息
36
+ *
37
+ * @property { string } address - 地址
38
+ * @property { string } candidateType - 候选类型
39
+ * @property { string } foundation - 基础
40
+ * @property { string } id - ID
41
+ * @property { string } ip - 本地/远端IP
42
+ * @property { boolean } isRemote - 是否远程
43
+ * @property { string } networkType - 网络类型
44
+ * @property { number } port - 端口
45
+ * @property { number } priority - 优先级
46
+ * @property { string } protocol - 协议
47
+ * @property { string } relatedAddress - 协商真实的IP
48
+ * @property { number } relatedPort - 协商真实的端口
49
+ * @property { number } timestamp - 时间戳
50
+ * @property { string } type - 类型
51
+ * @property { string } usernameFragment - 用户名片段
52
+ */
53
+ export interface XYCandidateInfo {
54
+ address?: string;
55
+ candidateType?: string;
56
+ foundation?: string;
57
+ id?: string;
58
+ ip?: string;
59
+ isRemote?: boolean;
60
+ networkType?: string;
61
+ port?: number;
62
+ priority?: number;
63
+ protocol?: string;
64
+ relatedAddress?: string;
65
+ relatedPort?: number;
66
+ timestamp?: number;
67
+ type?: string;
68
+ usernameFragment?: string;
69
+ }
@@ -3,7 +3,9 @@ declare class Quality {
3
3
  currentInternals: IInternals;
4
4
  nextInternals: IInternals;
5
5
  private bytesReceivedSecond;
6
+ private bytesReceivedTotalSecond;
6
7
  private bytesSentSecond;
8
+ private bytesSentTotalSecond;
7
9
  private packetsSentSecondSum;
8
10
  private packetsSentLostSecondSum;
9
11
  private packetsReceivedSecondSum;
@@ -17,6 +19,15 @@ declare class Quality {
17
19
  private config;
18
20
  private currentLogInterval;
19
21
  private currentReportInterval;
22
+ private networkType;
23
+ private localOuterIP;
24
+ private localInternalIP;
25
+ private localPort;
26
+ private remoteIP;
27
+ private remotePort;
28
+ private currentRoundTripTime;
29
+ private senderRoundTripTime;
30
+ private cacheCandidatePair;
20
31
  private onMessage;
21
32
  constructor(onMessage: (eventData: any) => void);
22
33
  /**
@@ -47,6 +58,19 @@ declare class Quality {
47
58
  * @param { IWorkerVideoReceiver[] } senderStatsList - 原始质量数据
48
59
  */
49
60
  statsSender(senderStatsList: IWorkerVideoReceiver[]): void;
61
+ /**
62
+ * 第四步:处理协商网络信息
63
+ *
64
+ * @param { IWorkerVideoReceiver[] } senderStatsList - 原始质量数据
65
+ */
66
+ statsCandidate(data: any): void;
67
+ /**
68
+ * 更新候选对信息
69
+ * 包含:availableOutgoingBitrate、bytesSent、bytesReceived、currentRoundTripTime等信息
70
+ *
71
+ * @param { any } report - 候选对信息
72
+ */
73
+ private updateCandidatePair;
50
74
  /**
51
75
  * 通过Worker发送最终的质量统计数据
52
76
  */
@@ -91,6 +115,18 @@ declare class Quality {
91
115
  * @returns { number }
92
116
  */
93
117
  private calcAudioLevel;
118
+ /**
119
+ * 更新本地候选信息
120
+ *
121
+ * @param { any } report - 本地候选信息
122
+ */
123
+ private updateLocalCandidate;
124
+ /**
125
+ * 更新远端候选信息
126
+ *
127
+ * @param { any } report - 远端候选信息
128
+ */
129
+ private updateRemoteCandidate;
94
130
  /**
95
131
  * 计算速率
96
132
  *
@@ -0,0 +1,27 @@
1
+ export interface XYCandidatePairInfo {
2
+ id: string;
3
+ timestamp: number;
4
+ type: string;
5
+ availableOutgoingBitrate: number;
6
+ bytesDiscardedOnSend: number;
7
+ bytesReceived: number;
8
+ bytesSent: number;
9
+ consentRequestsSent: number;
10
+ currentRoundTripTime: number;
11
+ lastPacketSentTimestamp: number;
12
+ localCandidateId: string;
13
+ nominated: boolean;
14
+ packetsDiscardedOnSend: number;
15
+ packetsReceived: number;
16
+ packetsSent: number;
17
+ priority: number;
18
+ remoteCandidateId: string;
19
+ requestsReceived: number;
20
+ requestsSent: number;
21
+ responsesReceived: number;
22
+ responsesSent: number;
23
+ state: 'succeeded' | 'in-progress' | 'failed' | string;
24
+ totalRoundTripTime: number;
25
+ transportId: string;
26
+ writable: boolean;
27
+ }
@@ -98,12 +98,14 @@ declare class VideoManager {
98
98
  * 绑定视频渲染容器,增加事件监听,并通过Video元素播放最新的MediaStream数据
99
99
  *
100
100
  * @param { string } viewId 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
101
+ * @param { boolean } isVideoMute - 是否需要播放视频声音
101
102
  */
102
103
  private initVideoSource;
103
104
  /**
104
105
  * 创建Video元素
105
106
  *
106
107
  * @param { HTMLElement } container - 容器节点信息
108
+ * @param { boolean } isVideoMute - 是否需要播放视频声音
107
109
  * @returns { HTMLVideoElement }
108
110
  */
109
111
  private createVideoElement;
@@ -147,15 +149,17 @@ declare class VideoManager {
147
149
  *
148
150
  * @param { string } id - 用户唯一ID,通过layout事件获取
149
151
  * @param { string } wrapEleId - 渲染画面的视图容器ID
152
+ * @param { boolean } isVideoMute - 是否需要播放视频声音,默认是true,代表mute video元素
150
153
  */
151
- setSource(id: string, wrapEleId: string): void;
154
+ setSource(id: string, wrapEleId: string, isVideoMute?: boolean): void;
152
155
  /**
153
156
  * 【副流渲染】设置用户信息和渲染画面的视图信息,创建Video元素用于渲染画面
154
157
  *
155
158
  * @param { string } id - 用户唯一ID,通过layout事件获取
156
159
  * @param { string } viewId - 渲染画面的视图容器ID
160
+ * @param { boolean } isVideoMute - 是否需要播放视频声音
157
161
  */
158
- setSlaveSource(id: string, viewId: string): void;
162
+ setSlaveSource(id: string, viewId: string, isVideoMute?: boolean): void;
159
163
  /**
160
164
  * 销毁当前实例数据
161
165
  */
@@ -31,6 +31,13 @@ declare class RosterManager implements XYBaseModule {
31
31
  * @returns { IRoster | null } - Roster数据
32
32
  */
33
33
  getRosterById(id: string): IRoster | null;
34
+ /**
35
+ * 判断是否是本地Roster
36
+ *
37
+ * @param { string } id - Roster/Layout Id
38
+ * @returns { boolean } - 是否是本地Roster
39
+ */
40
+ isLocal(id: string): boolean;
34
41
  /**
35
42
  * 获取匹配的rosterId
36
43
  *
@@ -143,5 +143,6 @@ declare class ServerManager {
143
143
  * @param { Action } action - Action实例
144
144
  */
145
145
  getCodeByJson(configName: string, data: ServerLinkData | string, oldData: ServerLinkData, action: Action): Promise<void>;
146
+ destroy(): void;
146
147
  }
147
148
  export default ServerManager;
@@ -0,0 +1,5 @@
1
+ import { OperateType } from '../../type/client';
2
+ export interface XYVideoAudioStatus {
3
+ audioStatus?: OperateType;
4
+ videoStatus?: OperateType;
5
+ }
@@ -0,0 +1,46 @@
1
+ import { default as XYRTCClient } from '../client';
2
+ declare class XYReconnectionManager {
3
+ private client;
4
+ private logger;
5
+ private reconnectMaxCount;
6
+ private reconnectInterval;
7
+ private reconnectCount;
8
+ private reconnectTimer;
9
+ private isReinviting;
10
+ constructor(client: XYRTCClient);
11
+ get isInReCall(): boolean | undefined;
12
+ /**
13
+ * 开始重呼
14
+ */
15
+ start(): Promise<void>;
16
+ /**
17
+ * 获取重连间隔时间
18
+ * 2s-最大倒计时数据(默认是5s)之间的随机数
19
+ *
20
+ * @returns 重连间隔
21
+ */
22
+ private getReconnectInterval;
23
+ /**
24
+ * 重新发起呼叫连接
25
+ */
26
+ private reCall;
27
+ /**
28
+ * 呼叫
29
+ */
30
+ private makeCall;
31
+ /**
32
+ * 恢复音频、视频状态
33
+ */
34
+ private restoreVideoAudioStatus;
35
+ /**
36
+ * 重呼成功,重置状态
37
+ */
38
+ private handleReconnectSuccess;
39
+ /**
40
+ * 多次重呼失败,通知用户退出会议
41
+ */
42
+ private handleReconnectFailure;
43
+ resetState(): void;
44
+ private clearTimer;
45
+ }
46
+ export { XYReconnectionManager };
@@ -1,6 +1,6 @@
1
1
  import { default as XYRTCClient } from '../client';
2
2
  import { Socket } from '../../tools/socket/socket';
3
- import { XYBaseModule } from '../../type/index';
3
+ import { TErrorReason, XYBaseModule } from '../../type/index';
4
4
  export declare class XYClientSocket implements XYBaseModule {
5
5
  private client;
6
6
  private logger;
@@ -60,7 +60,7 @@ export declare class XYClientSocket implements XYBaseModule {
60
60
  * @param { string } errorCode - 错误码
61
61
  * @param { TErrorReason } detail - 详情
62
62
  */
63
- private disconnectInWssError;
63
+ disconnectInWssError(errorCode: string, detail?: TErrorReason): void;
64
64
  /**
65
65
  * 结束会议,发送StopCall消息
66
66
  */
@@ -1,6 +1,6 @@
1
1
  import { default as Stream } from '../stream';
2
2
  import { default as Logger } from '../../tools/log/logger';
3
- import { CaptureStatus, IEnableStreamConfig, IReturnResult, IStreamChangeType, IStreamConfig, StreamKind, XYDeviceEventKey, XYTrackEventKey } from '../../type/index';
3
+ import { CaptureStatus, ContentTrackConfig, IEnableStreamConfig, IReturnResult, IStreamChangeType, IStreamConfig, StreamKind, XYDeviceEventKey, XYStreamParameterConfig, XYTrackEventKey } from '../../type/index';
4
4
  import { default as Peer } from '../peer/index';
5
5
  import { XYEmitter } from '@xylink/xy-toolkit';
6
6
  declare class BaseTrack extends XYEmitter<XYDeviceEventKey | XYTrackEventKey | string> {
@@ -67,12 +67,14 @@ declare class BaseTrack extends XYEmitter<XYDeviceEventKey | XYTrackEventKey | s
67
67
  /**
68
68
  * 获取Video可用的流配置
69
69
  *
70
+ * @param { IStreamConfig[] } streams - 流配置列表
70
71
  * @returns { IStreamConfig } - 可用的流配置
71
72
  */
72
73
  private getEnableVideoStreamConfig;
73
74
  /**
74
75
  * 获取Audio可用的流配置
75
76
  *
77
+ * @param { IStreamConfig[] } streams - 流配置列表
76
78
  * @returns { IStreamConfig } - 可用的流配置
77
79
  */
78
80
  private getEnableAudioStreamConfig;
@@ -81,7 +83,7 @@ declare class BaseTrack extends XYEmitter<XYDeviceEventKey | XYTrackEventKey | s
81
83
  *
82
84
  * @returns { IStreamConfig } - 可用的流配置
83
85
  */
84
- getEnableContentStreamConfig(): IStreamConfig | undefined;
86
+ getEnableContentStreamConfig(enableVideo: CaptureStatus, enableAudio: CaptureStatus): IEnableStreamConfig;
85
87
  /**
86
88
  * 初始化流配置
87
89
  */
@@ -101,7 +103,7 @@ declare class BaseTrack extends XYEmitter<XYDeviceEventKey | XYTrackEventKey | s
101
103
  /**
102
104
  * Create content senders config
103
105
  */
104
- initContentStreamsConfig(): void;
106
+ initContentStreamsConfig(config: ContentTrackConfig): void;
105
107
  private getIndexFromStreamChange;
106
108
  /**
107
109
  * 重置StreamConfig状态为默认状态
@@ -116,8 +118,9 @@ declare class BaseTrack extends XYEmitter<XYDeviceEventKey | XYTrackEventKey | s
116
118
  * @param { IStreamChangeType } body - StreamChange消息内容
117
119
  * @param { Peer } peer - Peer模块
118
120
  * @param { IStreamConfig[] } streams - Streams列表
121
+ * @param { XYStreamParameterConfig } config - 编码器配置参数
119
122
  */
120
- setStreamParameters(body: IStreamChangeType, peer: Peer, streams: IStreamConfig[]): Promise<void>;
123
+ setStreamParameters(body: IStreamChangeType, peer: Peer, streams: IStreamConfig[], config?: XYStreamParameterConfig): Promise<void>;
121
124
  /**
122
125
  * Close all media streams
123
126
  *
@@ -0,0 +1,59 @@
1
+ import { IEnabledCapture } from '../../type/index';
2
+ import { default as ContentTrack } from './contentTrack';
3
+ declare class ContentCapture {
4
+ private enabledCapture;
5
+ private track;
6
+ private logger;
7
+ constructor(track: ContentTrack);
8
+ getEnableCapture(): IEnabledCapture;
9
+ setEnableCapture(config: IEnabledCapture): void;
10
+ /**
11
+ * 初始化采集配置
12
+ *
13
+ * @param { boolean } muteAudio - 是否静音麦克风,true为静音麦克风,false是开启麦克风
14
+ * @param { boolean } muteVideo - 是否静音摄像头,true为关闭摄像头,false是开启摄像头
15
+ */
16
+ initCaptureConfig(muteAudio: boolean, muteVideo: boolean): void;
17
+ /**
18
+ * 根据可用的流配置,采集共享视频流
19
+ *
20
+ * @returns { Promise<MediaStream | IReturnResult> }
21
+ */
22
+ createContentMediaStream(): Promise<MediaStream>;
23
+ /**
24
+ * 采集桌面/应用流
25
+ *
26
+ * @param { MediaStreamConstraints | XYMediaStreamConstraints } constraints - 流约束配置
27
+ * @returns { MediaStream } - Content Stream
28
+ */
29
+ private getDisplayMediaStream;
30
+ /**
31
+ * 重新创建Content流
32
+ *
33
+ * @param { IReturnResult } error - 错误信息
34
+ * @returns { Promise<MediaStream> }
35
+ */
36
+ private reCreateContentMediaStream;
37
+ /**
38
+ * 获取约束设置
39
+ *
40
+ * @param { IStreamConfig } enableStreamConfig - 流配置
41
+ * @returns
42
+ */
43
+ private getContentConstraints;
44
+ /**
45
+ * 获取Content视频约束配置
46
+ *
47
+ * @param { IStreamConfig } videoConfig - 视频流配置
48
+ * @returns { any }
49
+ */
50
+ private getVideoConstraints;
51
+ /**
52
+ * 获取Content音频约束配置
53
+ *
54
+ * @param { IStreamConfig } audioConfig - 音频流配置
55
+ * @returns { any }
56
+ */
57
+ private getAudioConstraints;
58
+ }
59
+ export default ContentCapture;