@rongcloud/plugin-rtc 5.7.4 → 5.7.5-alpha.2
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.cjs.js +1 -1
- package/dist/index.d.ts +39 -28
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -348,6 +348,10 @@ declare abstract class RCLocalTrack extends RCTrack {
|
|
|
348
348
|
* 本地流已销毁
|
|
349
349
|
*/
|
|
350
350
|
static __INNER_EVENT_DESTROY__: string;
|
|
351
|
+
/**
|
|
352
|
+
* 内部发送两秒视频
|
|
353
|
+
*/
|
|
354
|
+
static __INNER_SEND_TWO_SECONDS_VIDEO__: string;
|
|
351
355
|
/**
|
|
352
356
|
* track 是否被销毁
|
|
353
357
|
*/
|
|
@@ -1243,28 +1247,17 @@ declare enum PullRoomStatusEvent {
|
|
|
1243
1247
|
RESOURCECHANGE = 3
|
|
1244
1248
|
}
|
|
1245
1249
|
|
|
1246
|
-
declare type
|
|
1250
|
+
declare type RTCEncodedFrame = RTCEncodedAudioFrame | RTCEncodedVideoFrame;
|
|
1251
|
+
declare type RCEncryptFunction<T extends RTCEncodedFrame> = (data: T) => T;
|
|
1247
1252
|
interface IRCEncryptorHooks {
|
|
1248
1253
|
/**
|
|
1249
|
-
*
|
|
1250
|
-
* 加密回调,用于接收待加密的音频二进制数据的 Uint8Array 类型数组
|
|
1251
|
-
*/
|
|
1252
|
-
decodeAudio: RCEncryptFunction;
|
|
1253
|
-
/**
|
|
1254
|
-
* @since 5.7.3
|
|
1255
|
-
* 加密回调,用于接收待加密的视频二进制数据的 Uint8Array 类型数组
|
|
1256
|
-
*/
|
|
1257
|
-
decodeVideo: RCEncryptFunction;
|
|
1258
|
-
/**
|
|
1259
|
-
* @since 5.7.3
|
|
1260
|
-
* 解密回调,用于接收待解密的音频二进制数据的 Uint8Array 类型数组
|
|
1254
|
+
* 加密回调,用于接收待加密的 opus 音频和 h.264 视频帧数据
|
|
1261
1255
|
*/
|
|
1262
|
-
|
|
1256
|
+
decode: RCEncryptFunction<RTCEncodedFrame>;
|
|
1263
1257
|
/**
|
|
1264
|
-
*
|
|
1265
|
-
* 解密回调,用于接收待解密的视频二进制数据的 Uint8Array 类型数组
|
|
1258
|
+
* 解密回调,用于接收待解密的 opus 音频和 h.264 视频帧数据
|
|
1266
1259
|
*/
|
|
1267
|
-
|
|
1260
|
+
encode: RCEncryptFunction<RTCEncodedFrame>;
|
|
1268
1261
|
}
|
|
1269
1262
|
|
|
1270
1263
|
interface IRCTrackBitrate {
|
|
@@ -1518,6 +1511,10 @@ interface ISendTrackState extends IRCTrackStat {
|
|
|
1518
1511
|
* 流状态(0:不可用, 1:可用)
|
|
1519
1512
|
*/
|
|
1520
1513
|
trackState: TrackState;
|
|
1514
|
+
/**
|
|
1515
|
+
* 发送帧数
|
|
1516
|
+
*/
|
|
1517
|
+
framesSent?: number;
|
|
1521
1518
|
}
|
|
1522
1519
|
/**
|
|
1523
1520
|
* receive track 所有字段
|
|
@@ -1894,14 +1891,10 @@ interface IRoomEventListener extends IRCRTCTrackEventListener {
|
|
|
1894
1891
|
*/
|
|
1895
1892
|
onUserJoin?(userIds: string[]): void;
|
|
1896
1893
|
/**
|
|
1897
|
-
*
|
|
1894
|
+
* 人员退出
|
|
1898
1895
|
* @param userIds
|
|
1899
1896
|
*/
|
|
1900
1897
|
onUserLeave?(userIds: string[]): void;
|
|
1901
|
-
/**
|
|
1902
|
-
* 人员离线退出
|
|
1903
|
-
*/
|
|
1904
|
-
onUserOffline?(userIds: string[]): void;
|
|
1905
1898
|
/**
|
|
1906
1899
|
* 主播开启、停止推 CDN 状态通知
|
|
1907
1900
|
*/
|
|
@@ -1982,6 +1975,10 @@ interface IRCRTCInitOptions {
|
|
|
1982
1975
|
* 加密机创建参数
|
|
1983
1976
|
*/
|
|
1984
1977
|
encryptor?: IRCEncryptorHooks;
|
|
1978
|
+
/**
|
|
1979
|
+
* 是否开启 WebRTC 问题检测器,默认为 `false`
|
|
1980
|
+
*/
|
|
1981
|
+
isOpenWebRTCIssueDetector?: boolean;
|
|
1985
1982
|
}
|
|
1986
1983
|
interface ICameraVideoProfile extends IVideoProfile {
|
|
1987
1984
|
cameraId?: string;
|
|
@@ -3401,6 +3398,7 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
3401
3398
|
* 是否是房间内观众
|
|
3402
3399
|
*/
|
|
3403
3400
|
private readonly _isRoomAudience;
|
|
3401
|
+
private readonly _options;
|
|
3404
3402
|
static __INNER_EVENT_TRACK_READY__: string;
|
|
3405
3403
|
static __INNER_AUDIOLEVEL_CHANGE__: string;
|
|
3406
3404
|
static __INNER_ICE_STATE_CHANGE__: string;
|
|
@@ -3414,6 +3412,7 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
3414
3412
|
private _reportR3R4ToPolarisTimer;
|
|
3415
3413
|
private _isDestroyed;
|
|
3416
3414
|
private _formatStatsData?;
|
|
3415
|
+
private _WebRTCIssueDetector?;
|
|
3417
3416
|
constructor(_logger: BasicLogger,
|
|
3418
3417
|
/**
|
|
3419
3418
|
* _reTryExchange 方法
|
|
@@ -3434,11 +3433,16 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
3434
3433
|
/**
|
|
3435
3434
|
* 是否是房间内观众
|
|
3436
3435
|
*/
|
|
3437
|
-
_isRoomAudience?: boolean,
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3436
|
+
_isRoomAudience?: boolean, _options?: {
|
|
3437
|
+
/**
|
|
3438
|
+
* 是否启用自定义加密
|
|
3439
|
+
*/
|
|
3440
|
+
encrypt: boolean;
|
|
3441
|
+
/**
|
|
3442
|
+
* 是否开启 WebRTC 问题检测器
|
|
3443
|
+
*/
|
|
3444
|
+
isOpenWebRTCIssueDetector: boolean;
|
|
3445
|
+
});
|
|
3442
3446
|
getLocalTracks(): RCLocalTrack[];
|
|
3443
3447
|
private _onConnectionStateChange;
|
|
3444
3448
|
private startAutoExecute;
|
|
@@ -3500,6 +3504,13 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
3500
3504
|
* @param listener
|
|
3501
3505
|
*/
|
|
3502
3506
|
registerReportListener(listener: IRCRTCReportListener | null): void;
|
|
3507
|
+
/**
|
|
3508
|
+
* 判断是否发送了两秒视频
|
|
3509
|
+
* @param framesSent 发送帧数
|
|
3510
|
+
* @param frameRate 发送帧率
|
|
3511
|
+
* @param trackId
|
|
3512
|
+
*/
|
|
3513
|
+
private _isSendTwoSecondsVideo;
|
|
3503
3514
|
/**
|
|
3504
3515
|
* 组装上行质量报告数据
|
|
3505
3516
|
*/
|
|
@@ -5048,4 +5059,4 @@ declare const helper: {
|
|
|
5048
5059
|
ifSupportScreenShare: typeof ifSupportScreenShare;
|
|
5049
5060
|
};
|
|
5050
5061
|
|
|
5051
|
-
export { BackgroundPictureFillMode, IAudienceRoomEventListener, IAudioLevelChangeHandler, ICameraVideoProfile, ICreateLocalTrackOptions, IJoinRTCRoomOptions, IJoinResCDNInfo, ILiveAudioState, IMCUOutputConfig, IMCUOutputVideoConfig, IMicphoneAudioProfile, IPKEndInfo, IPKInviteAnswerInfo, IPKInviteInfo, IPubSuccessRes, IPublishAttrs, IPublishedResource, IRCCandidatePairStat, IRCEncryptorHooks, IRCRTCInitOptions, IRCRTCReportListener, IRCRTCStateReport, IRCTrackStat, IRTCUserData, IReqResPKOptions, IRoomEventListener, IRoomPKEventListener, IScreenVideoProfile, ISubscribeAttr, IVideoProfile, MixLayoutMode, MixVideoRenderMode, RCAbstractRoom, RCAudienceClient, RCAudienceLivingRoom, RCAudioBitrate, RCCameraVideoTrack, RCEncryptFunction, RCFrameRate, RCInnerCDNPullIsHttps, RCInnerCDNPullKind, RCKickReason, RCLivingRoom, RCLivingType, RCLocalAudioTrack, RCLocalFileAudioTrack, RCLocalFileTrack, RCLocalFileVideoTrack, RCLocalTrack, RCLocalVideoTrack, RCMCUConfigBuilder, RCMediaStreamCapture, RCMediaType, RCMicphoneAudioTrack, RCRTCClient, RCRTCCode, RCRTCLiveRole, RCRTCPingResult, RCRTCRoom, RCRemoteAudioTrack, RCRemoteTrack, RCRemoteVideoTrack, RCResolution, RCScreenAudioTrack, RCScreenVideoTrack, RCTag, RCTrack, RCVideoBitrate, RTCJoinType, RTCMode, device, helper, installer };
|
|
5062
|
+
export { BackgroundPictureFillMode, IAudienceRoomEventListener, IAudioLevelChangeHandler, ICameraVideoProfile, ICreateLocalTrackOptions, IJoinRTCRoomOptions, IJoinResCDNInfo, ILiveAudioState, IMCUOutputConfig, IMCUOutputVideoConfig, IMicphoneAudioProfile, IPKEndInfo, IPKInviteAnswerInfo, IPKInviteInfo, IPubSuccessRes, IPublishAttrs, IPublishedResource, IRCCandidatePairStat, IRCEncryptorHooks, IRCRTCInitOptions, IRCRTCReportListener, IRCRTCStateReport, IRCTrackStat, IRTCUserData, IReqResPKOptions, IRoomEventListener, IRoomPKEventListener, IScreenVideoProfile, ISubscribeAttr, IVideoProfile, MixLayoutMode, MixVideoRenderMode, RCAbstractRoom, RCAudienceClient, RCAudienceLivingRoom, RCAudioBitrate, RCCameraVideoTrack, RCEncryptFunction, RCFrameRate, RCInnerCDNPullIsHttps, RCInnerCDNPullKind, RCKickReason, RCLivingRoom, RCLivingType, RCLocalAudioTrack, RCLocalFileAudioTrack, RCLocalFileTrack, RCLocalFileVideoTrack, RCLocalTrack, RCLocalVideoTrack, RCMCUConfigBuilder, RCMediaStreamCapture, RCMediaType, RCMicphoneAudioTrack, RCRTCClient, RCRTCCode, RCRTCLiveRole, RCRTCPingResult, RCRTCRoom, RCRemoteAudioTrack, RCRemoteTrack, RCRemoteVideoTrack, RCResolution, RCScreenAudioTrack, RCScreenVideoTrack, RCTag, RCTrack, RCVideoBitrate, RTCEncodedFrame, RTCJoinType, RTCMode, device, helper, installer };
|