@rongcloud/plugin-rtc 5.6.18-alpha.1 → 5.6.18
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/dist/index.d.ts +92 -31
- package/dist/index.esm.js +9540 -17232
- package/dist/index.umd.js +142 -21701
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -122,8 +122,7 @@ declare enum RCFrameRate {
|
|
|
122
122
|
FPS_10 = "FPS_10",
|
|
123
123
|
FPS_15 = "FPS_15",
|
|
124
124
|
FPS_24 = "FPS_24",
|
|
125
|
-
FPS_30 = "FPS_30"
|
|
126
|
-
FPS_60 = "FPS_60"
|
|
125
|
+
FPS_30 = "FPS_30"
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
declare enum RCResolution {
|
|
@@ -145,8 +144,6 @@ declare enum RCResolution {
|
|
|
145
144
|
W960_H720 = "W960_H720",
|
|
146
145
|
W1280_H720 = "W1280_H720",
|
|
147
146
|
W1920_H1080 = "W1920_H1080",
|
|
148
|
-
W2560_H1440 = "W2560_H1440",
|
|
149
|
-
W3840_H2160 = "W3840_H2160",
|
|
150
147
|
W144_H176 = "W144_H176",
|
|
151
148
|
W144_H256 = "W144_H256",
|
|
152
149
|
W180_H240 = "W180_H240",
|
|
@@ -159,9 +156,7 @@ declare enum RCResolution {
|
|
|
159
156
|
W480_H848 = "W480_H848",
|
|
160
157
|
W720_H1280 = "W720_H1280",
|
|
161
158
|
W720_H960 = "W720_H960",
|
|
162
|
-
W1080_H1920 = "W1080_H1920"
|
|
163
|
-
W1440_H2560 = "W1440_H2560",
|
|
164
|
-
W2160_H3840 = "W2160_H3840"
|
|
159
|
+
W1080_H1920 = "W1080_H1920"
|
|
165
160
|
}
|
|
166
161
|
|
|
167
162
|
/**
|
|
@@ -245,6 +240,15 @@ declare abstract class RCTrack extends EventEmitter {
|
|
|
245
240
|
*/
|
|
246
241
|
isOwnerMuted(): boolean;
|
|
247
242
|
protected _element?: HTMLMediaElement;
|
|
243
|
+
private _validateVolume;
|
|
244
|
+
/**
|
|
245
|
+
* 播放前检测
|
|
246
|
+
*/
|
|
247
|
+
private _validatePlayOptions;
|
|
248
|
+
/**
|
|
249
|
+
* 设置播放属性
|
|
250
|
+
*/
|
|
251
|
+
private _setPlayAttrs;
|
|
248
252
|
/**
|
|
249
253
|
* 播放
|
|
250
254
|
* @param element 用于承载媒体流的元素标签,音频流可传空
|
|
@@ -686,6 +690,12 @@ interface IRTCResponse {
|
|
|
686
690
|
*/
|
|
687
691
|
'Request-Id': string;
|
|
688
692
|
}
|
|
693
|
+
interface IExchangeResSubscribeItem {
|
|
694
|
+
mediaType: RCMediaType.AUDIO_ONLY | RCMediaType.VIDEO_ONLY;
|
|
695
|
+
msid: string;
|
|
696
|
+
userId: string;
|
|
697
|
+
simulcast?: RCStreamType;
|
|
698
|
+
}
|
|
689
699
|
/**
|
|
690
700
|
* /exchange 响应结果
|
|
691
701
|
*/
|
|
@@ -727,12 +737,7 @@ interface IExchangeResponse extends IRTCResponse {
|
|
|
727
737
|
/**
|
|
728
738
|
* 订阅成功的资源
|
|
729
739
|
*/
|
|
730
|
-
subscribedList?:
|
|
731
|
-
mediaType: RCMediaType.AUDIO_ONLY | RCMediaType.VIDEO_ONLY;
|
|
732
|
-
msid: string;
|
|
733
|
-
userId: string;
|
|
734
|
-
simulcast?: RCStreamType;
|
|
735
|
-
}[];
|
|
740
|
+
subscribedList?: IExchangeResSubscribeItem[];
|
|
736
741
|
}
|
|
737
742
|
interface IBroadcastSubReqBody {
|
|
738
743
|
/**
|
|
@@ -2504,6 +2509,9 @@ declare class RTCContext {
|
|
|
2504
2509
|
joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData, supportNtf?: boolean): IPromiseResult<IJoinRTCRoomData>;
|
|
2505
2510
|
quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
2506
2511
|
getRTCRoomInfo(roomId: string): IPromiseResult<IRTCRoomInfo>;
|
|
2512
|
+
/**
|
|
2513
|
+
* 移动端用来获取副房间资源
|
|
2514
|
+
*/
|
|
2507
2515
|
getRTCUserInfoList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
2508
2516
|
getRTCUserInfo(roomId: string): IPromiseResult<unknown>;
|
|
2509
2517
|
removeRTCUserInfo(roomId: string, keys: string[]): Promise<ErrorCode>;
|
|
@@ -2687,6 +2695,14 @@ declare class RCMediaService {
|
|
|
2687
2695
|
* ping1 :ping 结果返回最快值
|
|
2688
2696
|
*/
|
|
2689
2697
|
private setMediaServiceList;
|
|
2698
|
+
/**
|
|
2699
|
+
* 配置 gzip 请求头和请求体
|
|
2700
|
+
*/
|
|
2701
|
+
private _openGzip;
|
|
2702
|
+
/**
|
|
2703
|
+
* 处理 request 成功的结果
|
|
2704
|
+
*/
|
|
2705
|
+
private _dealRequestSuccessResult;
|
|
2690
2706
|
/**
|
|
2691
2707
|
* 发送请求,请求发送若失败,会继续尝试使用后续可用地址直到无地址可用,此时认为请求失败
|
|
2692
2708
|
* @param path
|
|
@@ -2991,6 +3007,18 @@ declare class RCAudienceLivingRoom {
|
|
|
2991
3007
|
* 计算新发布和取消发布的合流资源
|
|
2992
3008
|
*/
|
|
2993
3009
|
private _diffRoomResource;
|
|
3010
|
+
/**
|
|
3011
|
+
* 处理主播资源的新增发布
|
|
3012
|
+
*/
|
|
3013
|
+
private _dealPublished;
|
|
3014
|
+
/**
|
|
3015
|
+
* 处理主播资源的取消发布
|
|
3016
|
+
*/
|
|
3017
|
+
private _dealUnpublished;
|
|
3018
|
+
/**
|
|
3019
|
+
* 处理主播资源的变更
|
|
3020
|
+
*/
|
|
3021
|
+
private _dealModified;
|
|
2994
3022
|
/**
|
|
2995
3023
|
* 计算主播发布和取消发布的资源,以及资源的状态变更
|
|
2996
3024
|
*/
|
|
@@ -3024,6 +3052,12 @@ declare class RCAudienceLivingRoom {
|
|
|
3024
3052
|
private _addPeerCEvent;
|
|
3025
3053
|
private _getReqHeaders;
|
|
3026
3054
|
private _exchangeHandle;
|
|
3055
|
+
private _dealSubscribeResult;
|
|
3056
|
+
/**
|
|
3057
|
+
* 去重、转化参数格式为 ISubscribeAttr
|
|
3058
|
+
*/
|
|
3059
|
+
private _getParams;
|
|
3060
|
+
private _reportPubOrSubQualityData;
|
|
3027
3061
|
private _updateSubListHandle;
|
|
3028
3062
|
/**
|
|
3029
3063
|
* 对比 cdn_uris 资源
|
|
@@ -3178,7 +3212,30 @@ declare class PolarisReporter {
|
|
|
3178
3212
|
* @param resourceId userId_11_1_tiny 改为 userId_11_tiny_video
|
|
3179
3213
|
*/
|
|
3180
3214
|
private _getPolarisTrackId;
|
|
3181
|
-
|
|
3215
|
+
/**
|
|
3216
|
+
* 上下行 track 包含的公共字段
|
|
3217
|
+
*/
|
|
3218
|
+
private _getBaseData;
|
|
3219
|
+
private _getAudioLevel;
|
|
3220
|
+
private _getBitrate;
|
|
3221
|
+
private _getPacketsLostRate;
|
|
3222
|
+
private _getFrameRate;
|
|
3223
|
+
private _getResolution;
|
|
3224
|
+
private _getJitter;
|
|
3225
|
+
private _getNackCount;
|
|
3226
|
+
private _getPliCount;
|
|
3227
|
+
private _getRTT;
|
|
3228
|
+
private _getTrackState;
|
|
3229
|
+
/**
|
|
3230
|
+
* 发送上行音视频资源数据
|
|
3231
|
+
* @param data peerConnection stats 解析出来业务所需的所有字段
|
|
3232
|
+
*/
|
|
3233
|
+
sendR3Data(data: IInnerRCRTCStateReport): Promise<RCSendCode>;
|
|
3234
|
+
/**
|
|
3235
|
+
* 发送下行音视频资源数据
|
|
3236
|
+
* @param data peerConnection stats 解析出来业务所需的所有字段
|
|
3237
|
+
*/
|
|
3238
|
+
sendR4Data(data: IInnerRCRTCStateReport): Promise<RCSendCode>;
|
|
3182
3239
|
/**
|
|
3183
3240
|
* 加入房间
|
|
3184
3241
|
*/
|
|
@@ -3308,6 +3365,14 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
3308
3365
|
* @param listener
|
|
3309
3366
|
*/
|
|
3310
3367
|
registerReportListener(listener: IRCRTCReportListener | null): void;
|
|
3368
|
+
/**
|
|
3369
|
+
* 组装上行质量报告数据
|
|
3370
|
+
*/
|
|
3371
|
+
private _createSenderReport;
|
|
3372
|
+
/**
|
|
3373
|
+
* 组装下行质量报告数据
|
|
3374
|
+
*/
|
|
3375
|
+
private _createReceiverReport;
|
|
3311
3376
|
private _createRCRTCStateReport;
|
|
3312
3377
|
/**
|
|
3313
3378
|
* 获取 peerConnection stats 数据并格式化
|
|
@@ -3316,7 +3381,6 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
3316
3381
|
private _getStatsData;
|
|
3317
3382
|
/**
|
|
3318
3383
|
* 通知用户质量数据、peerConnection 北极星数据上报
|
|
3319
|
-
* @todo
|
|
3320
3384
|
*/
|
|
3321
3385
|
private _reportHandle;
|
|
3322
3386
|
/**
|
|
@@ -3700,7 +3764,7 @@ declare class RCLivingPKHandler {
|
|
|
3700
3764
|
/**
|
|
3701
3765
|
* 加入 PK 房间回调
|
|
3702
3766
|
*/
|
|
3703
|
-
_onJoinedPKRoom: (roomId: string, traceId: string) => void
|
|
3767
|
+
_onJoinedPKRoom: (roomId: string, traceId: string) => Promise<void>, _clientSessionId?: string | undefined);
|
|
3704
3768
|
private _callAppListener;
|
|
3705
3769
|
/**
|
|
3706
3770
|
* 收到连麦邀请
|
|
@@ -3887,7 +3951,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
3887
3951
|
private _onTrackReady;
|
|
3888
3952
|
protected _callAppListener(eventType: keyof IRoomEventListener, ...attrs: any[]): void;
|
|
3889
3953
|
private _onTrackUnpublish;
|
|
3890
|
-
__parseInnerMessage(message: IReceivedMessage, traceId: string):
|
|
3954
|
+
__parseInnerMessage(message: IReceivedMessage, traceId: string): void;
|
|
3891
3955
|
/**
|
|
3892
3956
|
* 被踢出房间通知
|
|
3893
3957
|
* @param byServer
|
|
@@ -4129,7 +4193,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
4129
4193
|
/**
|
|
4130
4194
|
* 退出 PK 房间
|
|
4131
4195
|
*/
|
|
4132
|
-
protected _quitAllPKRoom(): void
|
|
4196
|
+
protected _quitAllPKRoom(): Promise<void>;
|
|
4133
4197
|
getClientSessionId(): string;
|
|
4134
4198
|
}
|
|
4135
4199
|
|
|
@@ -4329,19 +4393,6 @@ declare class RCMCUConfigBuilder {
|
|
|
4329
4393
|
* @param uri
|
|
4330
4394
|
*/
|
|
4331
4395
|
removePictureWaterMark(trackId: string, uri: string): RCMCUConfigBuilder;
|
|
4332
|
-
/**
|
|
4333
|
-
* 设置 MCU 混流配置
|
|
4334
|
-
* @param videoList 视频输入混流列表,为 null 代表视频全混流,为空集合代表视频全不混流,否则按照输入列表进行混流
|
|
4335
|
-
* @param audioList 音频输入混流列表,为 null 代表音频全混流,为空集合代表音频全不混流,否则按照输入列表进行混流
|
|
4336
|
-
*/
|
|
4337
|
-
/**
|
|
4338
|
-
* 设置 MCU 混流配置
|
|
4339
|
-
* @param roomIds 混流房间列表
|
|
4340
|
-
* @param mediaType 混流媒体类型
|
|
4341
|
-
* @param isAppend 是否为增量混流
|
|
4342
|
-
* * true 为增量混流
|
|
4343
|
-
* * false 为全量覆盖混流
|
|
4344
|
-
*/
|
|
4345
4396
|
/**
|
|
4346
4397
|
* 重置所有合流配置
|
|
4347
4398
|
* @since v5.3.7
|
|
@@ -4628,6 +4679,14 @@ declare class RCMediaStreamCapture {
|
|
|
4628
4679
|
tracks?: (RCScreenVideoTrack | RCScreenAudioTrack)[];
|
|
4629
4680
|
}>;
|
|
4630
4681
|
private _createScreenTracks;
|
|
4682
|
+
/**
|
|
4683
|
+
* electron 中取屏幕共享资源
|
|
4684
|
+
*/
|
|
4685
|
+
private _createElectronScreenStream;
|
|
4686
|
+
/**
|
|
4687
|
+
* web 浏览器中取屏幕共享资源
|
|
4688
|
+
*/
|
|
4689
|
+
private _createWebScreenStream;
|
|
4631
4690
|
/**
|
|
4632
4691
|
* 创建 RCLocalAudioTrack 实例
|
|
4633
4692
|
* @param tag
|
|
@@ -4648,6 +4707,7 @@ declare class RCMediaStreamCapture {
|
|
|
4648
4707
|
code: RCRTCCode;
|
|
4649
4708
|
track?: RCLocalVideoTrack;
|
|
4650
4709
|
}>;
|
|
4710
|
+
private _validateCreateLocalFileTracks;
|
|
4651
4711
|
/**
|
|
4652
4712
|
* 根据本地或网络媒体文件资源创建 `RCLocalFileTrack` 实例
|
|
4653
4713
|
* @param tag 资源标识
|
|
@@ -4703,6 +4763,7 @@ declare class RCRTCClient extends RCMediaStreamCapture {
|
|
|
4703
4763
|
*/
|
|
4704
4764
|
getCurrentId(): string;
|
|
4705
4765
|
private _crtRoom;
|
|
4766
|
+
private __joinRoom;
|
|
4706
4767
|
/**
|
|
4707
4768
|
* 加入普通音视频房间,加入成功后返回 room 实例、code、userIds、tracks
|
|
4708
4769
|
* @param {string} roomId - 房间号
|