@rongcloud/plugin-rtc 5.5.4 → 5.5.5-beem-alpha.1
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 +495 -39
- package/dist/index.esm.js +28657 -15
- package/dist/index.js +28686 -15
- package/dist/index.umd.js +28690 -15
- package/package.json +2 -5
- package/dist/async-task-queue.d.ts +0 -9
- package/dist/core/Invoker.d.ts +0 -55
- package/dist/core/PolarisReporter.d.ts +0 -36
- package/dist/core/RCAudienceClient.d.ts +0 -90
- package/dist/core/RCMediaStreamCapture.d.ts +0 -124
- package/dist/core/RCRTCClient.d.ts +0 -148
- package/dist/core/Store.d.ts +0 -86
- package/dist/core/codec/RTCContext.d.ts +0 -76
- package/dist/core/codec/interface.d.ts +0 -168
- package/dist/core/codec/proto.d.ts +0 -94
- package/dist/core/codec/rtc-helper.d.ts +0 -17
- package/dist/core/command/AsyncCommand.d.ts +0 -55
- package/dist/core/command/AsyncSubscribeCommand.d.ts +0 -28
- package/dist/core/command/AsyncUnsubscribeCommand.d.ts +0 -28
- package/dist/core/command/AsyncUpdateSubscribeListCommand.d.ts +0 -25
- package/dist/core/command/BaseCommand.d.ts +0 -31
- package/dist/core/command/EnabelInnerCDNCommand.d.ts +0 -16
- package/dist/core/command/ExchangeCommand.d.ts +0 -18
- package/dist/core/command/ExchangeWithPushOtherRoomCommand.d.ts +0 -22
- package/dist/core/command/JoinRoomCommand.d.ts +0 -31
- package/dist/core/command/LeaveOtherRoomCommand.d.ts +0 -32
- package/dist/core/command/LocalTrackMuteCommand.d.ts +0 -18
- package/dist/core/command/MCUConfigFlushCommand.d.ts +0 -18
- package/dist/core/command/OnRemoteUserUnpubCommand.d.ts +0 -13
- package/dist/core/command/OnSignalReconnectedCommand.d.ts +0 -38
- package/dist/core/command/ParseRemoteResCommand.d.ts +0 -38
- package/dist/core/command/ParseUserStateCommand.d.ts +0 -57
- package/dist/core/command/PubCommand.d.ts +0 -34
- package/dist/core/command/PublishCommand.d.ts +0 -36
- package/dist/core/command/RTCIdentityChangeCommand.d.ts +0 -18
- package/dist/core/command/RetryExchangeCommand.d.ts +0 -18
- package/dist/core/command/SubscribeCommand.d.ts +0 -21
- package/dist/core/command/UnpublishCommand.d.ts +0 -22
- package/dist/core/command/UnpublishPrevCommand.d.ts +0 -11
- package/dist/core/command/UnsubscribeCommand.d.ts +0 -20
- package/dist/core/command/UpdateSubscribeListCommand.d.ts +0 -28
- package/dist/core/command/helper.d.ts +0 -20
- package/dist/core/constants.d.ts +0 -4
- package/dist/core/enums/BackgroundPictureFillMode.d.ts +0 -14
- package/dist/core/enums/MixLayoutMode.d.ts +0 -18
- package/dist/core/enums/MixVideoRenderMode.d.ts +0 -14
- package/dist/core/enums/RCBitrate.d.ts +0 -48
- package/dist/core/enums/RCCommandKind.d.ts +0 -12
- package/dist/core/enums/RCFrameRate.d.ts +0 -7
- package/dist/core/enums/RCInnerCDNBroadcast.d.ts +0 -5
- package/dist/core/enums/RCInnerCDNModel.d.ts +0 -5
- package/dist/core/enums/RCInnerCDNPullIsHttps.d.ts +0 -5
- package/dist/core/enums/RCInnerCDNPullKind.d.ts +0 -6
- package/dist/core/enums/RCInnerCDNPushMode.d.ts +0 -5
- package/dist/core/enums/RCKickType.d.ts +0 -11
- package/dist/core/enums/RCLinkedListPoint.d.ts +0 -6
- package/dist/core/enums/RCLivingType.d.ts +0 -14
- package/dist/core/enums/RCLoggerTag.d.ts +0 -649
- package/dist/core/enums/RCMediaType.d.ts +0 -18
- package/dist/core/enums/RCMixInputFilterMode.d.ts +0 -35
- package/dist/core/enums/RCRTCCode.d.ts +0 -93
- package/dist/core/enums/RCRTCLiveRole.d.ts +0 -14
- package/dist/core/enums/RCRTCPingResult.d.ts +0 -5
- package/dist/core/enums/RCRTCResolution.d.ts +0 -132
- package/dist/core/enums/RCResolution.d.ts +0 -21
- package/dist/core/enums/RTCJoinType.d.ts +0 -18
- package/dist/core/enums/RTCMode.d.ts +0 -22
- package/dist/core/enums/inner/LiveRole.d.ts +0 -11
- package/dist/core/enums/inner/LiveType.d.ts +0 -14
- package/dist/core/enums/inner/PolarisRole.d.ts +0 -14
- package/dist/core/enums/inner/R2Action.d.ts +0 -14
- package/dist/core/enums/inner/R2Status.d.ts +0 -11
- package/dist/core/enums/inner/RCRTCMessageType.d.ts +0 -70
- package/dist/core/enums/inner/RCStreamType.d.ts +0 -14
- package/dist/core/enums/inner/RTCApiType.d.ts +0 -5
- package/dist/core/enums/inner/RTCIdentityChangeType.d.ts +0 -5
- package/dist/core/enums/inner/TrackState.d.ts +0 -14
- package/dist/core/interfaces.d.ts +0 -942
- package/dist/core/room/Pinger.d.ts +0 -36
- package/dist/core/room/RCAbstractRoom.d.ts +0 -354
- package/dist/core/room/RCAudienceLivingRoom.d.ts +0 -334
- package/dist/core/room/RCAudioLevelReport.d.ts +0 -16
- package/dist/core/room/RCLivingPKHandler.d.ts +0 -165
- package/dist/core/room/RCLivingRoom.d.ts +0 -112
- package/dist/core/room/RCLocalMediaStream.d.ts +0 -8
- package/dist/core/room/RCMCUConfigBuilder.d.ts +0 -211
- package/dist/core/room/RCRTCRoom.d.ts +0 -17
- package/dist/core/service/RCMediaService.d.ts +0 -121
- package/dist/core/service/helper.d.ts +0 -18
- package/dist/core/service/index.d.ts +0 -6
- package/dist/core/service/interface.d.ts +0 -328
- package/dist/core/service/mcu-interface.d.ts +0 -293
- package/dist/core/tracks/RC3AnoiseTrack.d.ts +0 -27
- package/dist/core/tracks/RCLocalTrack.d.ts +0 -143
- package/dist/core/tracks/RCRemoteTrack.d.ts +0 -29
- package/dist/core/tracks/RCTrack.d.ts +0 -95
- package/dist/core/webrtc/RCRTCPeerCManager.d.ts +0 -161
- package/dist/core/webrtc/RCRTCPeerConnection.d.ts +0 -112
- package/dist/core/webrtc/helper.d.ts +0 -26
- package/dist/core/webrtc/sdp/ASdpBuilder.d.ts +0 -120
- package/dist/core/webrtc/sdp/ASdpStrategy.d.ts +0 -53
- package/dist/core/webrtc/sdp/PlanBSdpBuilder.d.ts +0 -20
- package/dist/core/webrtc/sdp/PlanBStrategy.d.ts +0 -26
- package/dist/core/webrtc/sdp/SDPUtils.d.ts +0 -60
- package/dist/core/webrtc/sdp/UnifiedPlanSdpBuilder.d.ts +0 -11
- package/dist/core/webrtc/sdp/UnifiedPlanStrategy.d.ts +0 -25
- package/dist/core/webrtc/stat-parser/AbstractStatParser.d.ts +0 -117
- package/dist/core/webrtc/stat-parser/ChromeStatParser.d.ts +0 -14
- package/dist/core/webrtc/stat-parser/FirefoxStatParser.d.ts +0 -14
- package/dist/core/webrtc/stat-parser/IStatParser.d.ts +0 -24
- package/dist/core/webrtc/stat-parser/SafariStatParser.d.ts +0 -14
- package/dist/device.d.ts +0 -6
- package/dist/helper.d.ts +0 -195
- package/dist/logger.d.ts +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.5.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.5.5-beem-alpha.1
|
|
3
|
+
* CommitId - 4807d9272db7b224e762a75df11762453a730f9e
|
|
4
|
+
* Thu Oct 13 2022 21:01:14 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
8
|
-
import { EventEmitter, RTCPluginContext, AbsCodec, IPromiseResult, ErrorCode, KVString, IAsyncRes, ConnectionStatus, ConversationType, ISendMsgOptions, IReceivedMessage, IRuntime, LogLevel, IPluginGenerator } from '@rongcloud/engine';
|
|
7
|
+
import { EventEmitter, BasicLogger, INaviInfo, RTCPluginContext, AbsCodec, IPromiseResult, ErrorCode, KVString, IRuntime, IAsyncRes, ConnectionStatus, ConversationType, ISendMsgOptions, IReceivedMessage, EnableLogL, IPluginGenerator } from '@rongcloud/engine';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* 错误码,与移动端对齐
|
|
@@ -20,6 +19,8 @@ import { EventEmitter, RTCPluginContext, AbsCodec, IPromiseResult, ErrorCode, KV
|
|
|
20
19
|
declare enum RCRTCCode {
|
|
21
20
|
/** 成功 */
|
|
22
21
|
SUCCESS = 10000,
|
|
22
|
+
/** PB 错误 */
|
|
23
|
+
PB_ERROR = 40001,
|
|
23
24
|
/** IM 服务未连接 */
|
|
24
25
|
SIGNAL_DISCONNECTED = 50000,
|
|
25
26
|
/** 参数错误 */
|
|
@@ -172,6 +173,7 @@ declare abstract class RCTrack extends EventEmitter {
|
|
|
172
173
|
protected readonly _streamId: string;
|
|
173
174
|
protected _msTrack?: MediaStreamTrack;
|
|
174
175
|
private _msStream;
|
|
176
|
+
protected _logger: BasicLogger | null;
|
|
175
177
|
constructor(_tag: string, _userId: string, _kind: 'audio' | 'video', _isLocalTrack: boolean, _roomId?: string | undefined);
|
|
176
178
|
/**
|
|
177
179
|
* 获取音视轨所属的 streamId,streamId 相同的音轨和视轨可认为属于统一道流
|
|
@@ -538,11 +540,11 @@ declare enum RCRTCPingResult {
|
|
|
538
540
|
*/
|
|
539
541
|
declare enum RCRTCLiveRole {
|
|
540
542
|
/**
|
|
541
|
-
*
|
|
543
|
+
* 主播降级
|
|
542
544
|
*/
|
|
543
545
|
ANCHOR = 1,
|
|
544
546
|
/**
|
|
545
|
-
*
|
|
547
|
+
* 观众升级
|
|
546
548
|
*/
|
|
547
549
|
AUDIENCE = 2
|
|
548
550
|
}
|
|
@@ -646,7 +648,19 @@ declare enum RTCMode {
|
|
|
646
648
|
/**
|
|
647
649
|
* 跨应用直播
|
|
648
650
|
*/
|
|
649
|
-
CROSS_LIVE = 8
|
|
651
|
+
CROSS_LIVE = 8,
|
|
652
|
+
/**
|
|
653
|
+
* sip呼叫
|
|
654
|
+
*/
|
|
655
|
+
SIP = 4,
|
|
656
|
+
/**
|
|
657
|
+
* 呼叫模式.包括单呼和群呼
|
|
658
|
+
*/
|
|
659
|
+
CALL = 5,
|
|
660
|
+
/**
|
|
661
|
+
* 会议
|
|
662
|
+
*/
|
|
663
|
+
MEETING = 6
|
|
650
664
|
}
|
|
651
665
|
|
|
652
666
|
/**
|
|
@@ -1241,8 +1255,9 @@ declare enum RTCIdentityChangeType {
|
|
|
1241
1255
|
}
|
|
1242
1256
|
|
|
1243
1257
|
declare const keymaps: {
|
|
1244
|
-
readonly RtcInput: readonly ["roomType", "broadcastType", "extraInnerData", "needSysChatroom", "identityChangeType", "joinType", "innerDatas", "outerDatas"];
|
|
1245
|
-
readonly
|
|
1258
|
+
readonly RtcInput: readonly ["roomType", "broadcastType", "extraInnerData", "needSysChatroom", "identityChangeType", "joinType", "innerDatas", "outerDatas", "supportNtf"];
|
|
1259
|
+
readonly RtcOutput: readonly ["version"];
|
|
1260
|
+
readonly RtcUserListOutput: readonly ["users", "token", "sessionId", "roomInfo", "version"];
|
|
1246
1261
|
readonly SetUserStatusInput: readonly ["status"];
|
|
1247
1262
|
readonly RtcSetDataInput: readonly ["interior", "target", "key", "value", "objectName", "content"];
|
|
1248
1263
|
readonly RtcUserSetDataInput: readonly ["valueInfo", "objectName", "content"];
|
|
@@ -1266,6 +1281,16 @@ declare const keymaps: {
|
|
|
1266
1281
|
readonly RtcCancelInviteInput: readonly ["invitedUserId", "invitedRoomId", "inviteInfo", "inviteSessionId"];
|
|
1267
1282
|
readonly RtcInviteAnswerInput: readonly ["inviteUserId", "answerCode", "inviteRoomId", "inviteSessionId", "content", "key", "value"];
|
|
1268
1283
|
readonly RtcEndInviteInput: readonly ["inviteRoomId", "inviteSessionId", "inviteContent", "inviteRoomKeys"];
|
|
1284
|
+
readonly RtcRoomStatusInput: readonly ["version"];
|
|
1285
|
+
readonly RtcRoomStatusOutput: readonly ["bFullStatus", "version", "usersData", "roomStatus"];
|
|
1286
|
+
readonly RtcReportSDKInput: readonly ["sdkInfo"];
|
|
1287
|
+
readonly RCRTCPBPolaris: readonly ["type", "appKey", "sessionId", "roomId", "roomCreateTime", "userId", "userRole", "joinTime", "signalDataCenter", "r1Info", "r2Info", "r3Info", "r4Info"];
|
|
1288
|
+
readonly RCRTCPBR1Info: readonly ["joinTime", "rtcVersion", "imVersion", "platform", "device", "os", "browserName", "browserVersion"];
|
|
1289
|
+
readonly RCRTCPBR2Info: readonly ["joinTime", "sendTime", "rtcActionType", "rtcActionStatus", "trackId"];
|
|
1290
|
+
readonly RCRTCPBR3Info: readonly ["info"];
|
|
1291
|
+
readonly RCRTCPBR4Info: readonly ["info"];
|
|
1292
|
+
readonly RCRTCPBStatusInfo: readonly ["joinTime", "receiveTime", "totalBitRate", "appCPUUsage", "systemCPUUsage", "systemCPUFrequency", "networkStatus", "googleRTTNetwork", "ipAddress", "useReceiveBroadBand", "useSendBroadBand", "packetLossCount", "streams"];
|
|
1293
|
+
readonly RCRTCPBStreamInfo: readonly ["trackId", "codeName", "volume", "samplingRate", "bitRate", "packetLossRate", "frameRate", "resolution", "blockTime", "jitterData", "nAckCount", "pliCount", "googleRTTTotalTime", "isReceiveFirstFrameRate", "codeType", "isEnabled"];
|
|
1269
1294
|
};
|
|
1270
1295
|
declare type RTCKeyMaps = typeof keymaps;
|
|
1271
1296
|
|
|
@@ -1331,6 +1356,10 @@ interface IJoinRTCRoomData extends IRTCUsers {
|
|
|
1331
1356
|
}[];
|
|
1332
1357
|
kvEntries: IServerRTCRoomEntry[];
|
|
1333
1358
|
offlineKickTime: number;
|
|
1359
|
+
codeFormat?: string;
|
|
1360
|
+
roomCreateTime?: number;
|
|
1361
|
+
userJoinTime?: number;
|
|
1362
|
+
version: number;
|
|
1334
1363
|
}
|
|
1335
1364
|
interface IReqRoomPKOptions {
|
|
1336
1365
|
/**
|
|
@@ -1436,11 +1465,42 @@ interface IEndRoomPKOptions {
|
|
|
1436
1465
|
*/
|
|
1437
1466
|
keys: string[];
|
|
1438
1467
|
}
|
|
1468
|
+
interface IRTCNaviInfo extends INaviInfo {
|
|
1469
|
+
/**
|
|
1470
|
+
* jwt token
|
|
1471
|
+
*/
|
|
1472
|
+
jwt?: string;
|
|
1473
|
+
/**
|
|
1474
|
+
* http3 上报域名
|
|
1475
|
+
*/
|
|
1476
|
+
logServer?: string;
|
|
1477
|
+
/**
|
|
1478
|
+
* 数据中心
|
|
1479
|
+
*/
|
|
1480
|
+
dc?: string;
|
|
1481
|
+
/**
|
|
1482
|
+
* openGzip 开启标识,默认是false,开启使用true
|
|
1483
|
+
*/
|
|
1484
|
+
openGzip?: boolean;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
/**
|
|
1488
|
+
* 自定义上报北极星数据响应 code
|
|
1489
|
+
*/
|
|
1490
|
+
declare enum RCSendCode {
|
|
1491
|
+
NOT_REPORT = -1,
|
|
1492
|
+
REPORT_SUCCESS = 10000,
|
|
1493
|
+
REPORT_FAIL = 0,
|
|
1494
|
+
PB_ERROR = 40001
|
|
1495
|
+
}
|
|
1439
1496
|
|
|
1440
1497
|
declare class RTCContext {
|
|
1441
1498
|
private context;
|
|
1442
1499
|
private codec;
|
|
1500
|
+
roomCreateTime: number | undefined;
|
|
1501
|
+
userJoinTime: number | undefined;
|
|
1443
1502
|
constructor(context: RTCPluginContext, codec: AbsCodec<RTCKeyMaps>);
|
|
1503
|
+
logger: BasicLogger | null;
|
|
1444
1504
|
joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): IPromiseResult<IJoinRTCRoomData>;
|
|
1445
1505
|
quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
1446
1506
|
getRTCRoomInfo(roomId: string): IPromiseResult<IRTCRoomInfo>;
|
|
@@ -1472,6 +1532,10 @@ declare class RTCContext {
|
|
|
1472
1532
|
getRTCOutData(roomId: string, userIds: string[]): IPromiseResult<unknown>;
|
|
1473
1533
|
getRTCToken(roomId: string, mode: number, broadcastType?: number): IPromiseResult<IRtcTokenData>;
|
|
1474
1534
|
setRTCState(roomId: string, report: string): Promise<ErrorCode>;
|
|
1535
|
+
/**
|
|
1536
|
+
* 通过 http 方式上报 rtc state
|
|
1537
|
+
*/
|
|
1538
|
+
setRTCStateByHttp(logServer: string, runtime: IRuntime, report: IRCRTCReportData, reportType: string): Promise<RCSendCode | RCRTCCode>;
|
|
1475
1539
|
getRTCUserList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
1476
1540
|
joinLivingRoomAsAudience(roomId: string, mode: RTCMode, broadcastType?: number): Promise<IAsyncRes<{
|
|
1477
1541
|
token: string;
|
|
@@ -1485,16 +1549,41 @@ declare class RTCContext {
|
|
|
1485
1549
|
endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
|
|
1486
1550
|
getRTCJoinedUserInfo(userId: string): Promise<IAsyncRes<IRTCJoinedInfo[]>>;
|
|
1487
1551
|
pullRTCRoomEntry(roomId: string): Promise<IAsyncRes<IChrmKVPullData>>;
|
|
1552
|
+
/**
|
|
1553
|
+
* 通知拉取房间数据
|
|
1554
|
+
* @param roomId 房间 id
|
|
1555
|
+
* @param version 本地最大得房间数据版本号
|
|
1556
|
+
*/
|
|
1557
|
+
pullRTCRoomStatus(roomId: string, version: number): Promise<{
|
|
1558
|
+
code: ErrorCode;
|
|
1559
|
+
data?: IPullRTCRoomStatus;
|
|
1560
|
+
}>;
|
|
1488
1561
|
decodeRtcNotify(buffer: Uint8Array): {
|
|
1489
|
-
time:
|
|
1562
|
+
time: number;
|
|
1490
1563
|
type: any;
|
|
1491
1564
|
roomId: any;
|
|
1492
1565
|
};
|
|
1493
1566
|
getCurrentId(): string;
|
|
1494
|
-
getNaviInfo():
|
|
1567
|
+
getNaviInfo(): IRTCNaviInfo | null;
|
|
1495
1568
|
getConnectionStatus(): ConnectionStatus;
|
|
1496
1569
|
getAppkey(): string;
|
|
1497
|
-
|
|
1570
|
+
/** web 端发 rtcPing */
|
|
1571
|
+
webRtcPing(roomId: string, roomMode: RTCMode, broadcastType?: number): Promise<{
|
|
1572
|
+
code: ErrorCode;
|
|
1573
|
+
data?: {
|
|
1574
|
+
version: number;
|
|
1575
|
+
};
|
|
1576
|
+
}>;
|
|
1577
|
+
/**
|
|
1578
|
+
* 协议栈 rtcping 依赖 imlib 编解码数据
|
|
1579
|
+
* web 单独走 imlib 提供的 rtcSignaling 方法,减少对 imlib 的依赖
|
|
1580
|
+
*/
|
|
1581
|
+
rtcPing(roomId: string, roomMode: RTCMode, broadcastType?: number): Promise<{
|
|
1582
|
+
code: ErrorCode;
|
|
1583
|
+
data?: {
|
|
1584
|
+
version: number;
|
|
1585
|
+
} | undefined;
|
|
1586
|
+
}> | Promise<IAsyncRes<any>>;
|
|
1498
1587
|
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions): IPromiseResult<IReceivedMessage>;
|
|
1499
1588
|
registerRTCSignalListener(listener?: ((buffer: Uint8Array) => void) | undefined): void;
|
|
1500
1589
|
registerConnectionStateChangeListener(listener: (status: ConnectionStatus) => void): void;
|
|
@@ -1503,6 +1592,9 @@ declare class RTCContext {
|
|
|
1503
1592
|
registerMessageListener(listener: (message: IReceivedMessage) => boolean): void;
|
|
1504
1593
|
getCoreVersion(): string;
|
|
1505
1594
|
getPluginContext(): RTCPluginContext;
|
|
1595
|
+
reportSDKInfo(versionInfo: {
|
|
1596
|
+
[name: string]: string;
|
|
1597
|
+
}): void;
|
|
1506
1598
|
}
|
|
1507
1599
|
|
|
1508
1600
|
declare class RCMediaService {
|
|
@@ -1546,7 +1638,7 @@ declare class RCMediaService {
|
|
|
1546
1638
|
private static msInDetector;
|
|
1547
1639
|
private static detectorTime;
|
|
1548
1640
|
private static detectValidMinute;
|
|
1549
|
-
|
|
1641
|
+
static jwtToken: string;
|
|
1550
1642
|
private _msList;
|
|
1551
1643
|
constructor(_runtime: IRuntime, _context: RTCContext,
|
|
1552
1644
|
/**
|
|
@@ -1692,7 +1784,7 @@ declare class RCRTCPeerCManager {
|
|
|
1692
1784
|
/**
|
|
1693
1785
|
* 北极星上报模块
|
|
1694
1786
|
*/
|
|
1695
|
-
_polarisReport?:
|
|
1787
|
+
_polarisReport?: PolarisHttpReporter | undefined);
|
|
1696
1788
|
get useMutilPeerC(): boolean;
|
|
1697
1789
|
/**
|
|
1698
1790
|
* 根据 track 判断是否为上行
|
|
@@ -1812,7 +1904,7 @@ declare abstract class ReadableStore {
|
|
|
1812
1904
|
readonly roomId: string;
|
|
1813
1905
|
readonly crtUserId: string;
|
|
1814
1906
|
readonly roomMode: RTCMode;
|
|
1815
|
-
readonly polarisReport:
|
|
1907
|
+
readonly polarisReport: PolarisHttpReporter;
|
|
1816
1908
|
readonly isUpgrade?: boolean | undefined;
|
|
1817
1909
|
readonly isMainRoom?: boolean | undefined;
|
|
1818
1910
|
/**
|
|
@@ -1844,7 +1936,8 @@ declare abstract class ReadableStore {
|
|
|
1844
1936
|
protected _CDNUris: ICDNUris | null;
|
|
1845
1937
|
protected _CDNEnable: boolean;
|
|
1846
1938
|
protected _destroyed: boolean;
|
|
1847
|
-
|
|
1939
|
+
protected _roomStatusVersion: number;
|
|
1940
|
+
constructor(context: RTCContext, service: RCMediaService, peerMgr: RCRTCPeerCManager, roomId: string, crtUserId: string, roomMode: RTCMode, polarisReport: PolarisHttpReporter, isUpgrade?: boolean | undefined, isMainRoom?: boolean | undefined);
|
|
1848
1941
|
get useMutilPeerC(): boolean;
|
|
1849
1942
|
getResourcesByUserId(userId: string): IPublishedResource[] | undefined;
|
|
1850
1943
|
getRemoteTrack(trackId: string): RCRemoteTrack | undefined;
|
|
@@ -1864,6 +1957,7 @@ declare abstract class ReadableStore {
|
|
|
1864
1957
|
getTrackState(trackId: string): 0 | 1;
|
|
1865
1958
|
getCDNEnable(): boolean;
|
|
1866
1959
|
getCDNUris(): ICDNUris | null;
|
|
1960
|
+
getRoomStatusVersion(): number;
|
|
1867
1961
|
}
|
|
1868
1962
|
declare class Store extends ReadableStore {
|
|
1869
1963
|
private _initRemoteTracks;
|
|
@@ -1878,6 +1972,7 @@ declare class Store extends ReadableStore {
|
|
|
1878
1972
|
setCDNUris(uris: ICDNUris | null): void;
|
|
1879
1973
|
resetSubscribedList(subscribeList: ISubscribeAttr[]): void;
|
|
1880
1974
|
resetCollectSubscribeList(collectSubscribeList: ISubscribeAttr[]): void;
|
|
1975
|
+
setRoomStatusVersion(version: number): void;
|
|
1881
1976
|
}
|
|
1882
1977
|
|
|
1883
1978
|
declare enum CommandPriority {
|
|
@@ -1944,7 +2039,7 @@ declare class BaseInvoker<STORE> {
|
|
|
1944
2039
|
* 房间任务队列管理
|
|
1945
2040
|
*/
|
|
1946
2041
|
declare class Invoker extends BaseInvoker<Store> {
|
|
1947
|
-
constructor(context: RTCContext, service: RCMediaService, peerMrg: RCRTCPeerCManager, roomId: string, crtUserId: string, mode: RTCMode, reporter:
|
|
2042
|
+
constructor(context: RTCContext, service: RCMediaService, peerMrg: RCRTCPeerCManager, roomId: string, crtUserId: string, mode: RTCMode, reporter: PolarisHttpReporter, isUpgrade?: boolean, isMainRoom?: boolean);
|
|
1948
2043
|
/**
|
|
1949
2044
|
* 获取 store 存储实例,返回值类型 `ReadableStore`,避免非 command 定义中修改内存
|
|
1950
2045
|
*/
|
|
@@ -2149,7 +2244,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2149
2244
|
/**
|
|
2150
2245
|
* 北极星上报实例
|
|
2151
2246
|
*/
|
|
2152
|
-
protected _polarisReport:
|
|
2247
|
+
protected _polarisReport: PolarisHttpReporter | null;
|
|
2153
2248
|
/**
|
|
2154
2249
|
* 音量上报实例
|
|
2155
2250
|
*/
|
|
@@ -2165,6 +2260,11 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2165
2260
|
* 是否使用多 peerConnection
|
|
2166
2261
|
*/
|
|
2167
2262
|
_useMutilPeerC?: boolean | undefined, _clientSessionId?: string);
|
|
2263
|
+
/**
|
|
2264
|
+
* 拉取房间数据
|
|
2265
|
+
* @param roomId 房间 id
|
|
2266
|
+
*/
|
|
2267
|
+
private _startPullRTCRoomStatus;
|
|
2168
2268
|
__innerInit(mode: RTCMode, joinType?: RTCJoinType, livingType?: RCLivingType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): Promise<{
|
|
2169
2269
|
code: RCRTCCode | ErrorCode;
|
|
2170
2270
|
data?: IJoinRTCRoomData;
|
|
@@ -2573,7 +2673,7 @@ declare class RCAudienceLivingRoom {
|
|
|
2573
2673
|
/**
|
|
2574
2674
|
* 北极星上报实例
|
|
2575
2675
|
*/
|
|
2576
|
-
protected _polarisReport:
|
|
2676
|
+
protected _polarisReport: PolarisHttpReporter | null;
|
|
2577
2677
|
/**
|
|
2578
2678
|
* 音量上报实例
|
|
2579
2679
|
*/
|
|
@@ -2821,7 +2921,7 @@ declare class PolarisReporter {
|
|
|
2821
2921
|
* @param resourceId userId_11_1_tiny 改为 userId_11_tiny_video
|
|
2822
2922
|
*/
|
|
2823
2923
|
private _getPolarisTrackId;
|
|
2824
|
-
sendR3R4Data(data: IInnerRCRTCStateReport): Promise<
|
|
2924
|
+
sendR3R4Data(data: IInnerRCRTCStateReport): Promise<RCSendCode>;
|
|
2825
2925
|
/**
|
|
2826
2926
|
* 加入房间
|
|
2827
2927
|
*/
|
|
@@ -2833,6 +2933,43 @@ declare class PolarisReporter {
|
|
|
2833
2933
|
sendR2(action: string, status: string, trackIds: string[]): void;
|
|
2834
2934
|
}
|
|
2835
2935
|
|
|
2936
|
+
declare class PolarisHttpReporter {
|
|
2937
|
+
private readonly _context;
|
|
2938
|
+
private readonly _runtime;
|
|
2939
|
+
private readonly _roomId;
|
|
2940
|
+
private readonly _crtRTCRoom;
|
|
2941
|
+
private readonly _userRole;
|
|
2942
|
+
protected _polarisSignalReporter: PolarisReporter | null;
|
|
2943
|
+
private _useHttp;
|
|
2944
|
+
constructor(_context: RTCContext, _runtime: IRuntime, _roomId: string, _crtRTCRoom: RCAbstractRoom | RCAudienceLivingRoom, _userRole?: PolarisRole);
|
|
2945
|
+
private _send;
|
|
2946
|
+
private _refetchNaviInfo;
|
|
2947
|
+
/**
|
|
2948
|
+
* 小流需去掉 _tiny,小流 resourceId 为 userId_tag_mediaType_tiny
|
|
2949
|
+
*/
|
|
2950
|
+
private _getRealResourceId;
|
|
2951
|
+
/**
|
|
2952
|
+
* 生成北极星上报的 trackId
|
|
2953
|
+
* @param resourceId userId_11_1_tiny 改为 userId_11_tiny_video
|
|
2954
|
+
*/
|
|
2955
|
+
private _getPolarisTrackId;
|
|
2956
|
+
private _formatReportBaseData;
|
|
2957
|
+
private _formatReportData;
|
|
2958
|
+
private _formatR1Data;
|
|
2959
|
+
private _formatR2Data;
|
|
2960
|
+
private _formatR3R4Data;
|
|
2961
|
+
sendR3R4Data(data: IInnerRCRTCStateReport): Promise<RCSendCode>;
|
|
2962
|
+
/**
|
|
2963
|
+
* 加入房间
|
|
2964
|
+
*/
|
|
2965
|
+
sendR1(): Promise<void>;
|
|
2966
|
+
/**
|
|
2967
|
+
* RTC 和 LIVE 发布、取消发布
|
|
2968
|
+
* RTC 订阅、取消订阅
|
|
2969
|
+
*/
|
|
2970
|
+
sendR2(action: string, status: string, trackIds: string[]): Promise<void>;
|
|
2971
|
+
}
|
|
2972
|
+
|
|
2836
2973
|
/**
|
|
2837
2974
|
* PC 实例管理类
|
|
2838
2975
|
*/
|
|
@@ -2862,6 +2999,9 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2862
2999
|
private _reportStatsTimer;
|
|
2863
3000
|
private _reportR3R4ToPolarisTimer;
|
|
2864
3001
|
private _isDestroyed;
|
|
3002
|
+
private _reportStatsData?;
|
|
3003
|
+
private _originReportStatsData?;
|
|
3004
|
+
private _logger;
|
|
2865
3005
|
constructor(
|
|
2866
3006
|
/**
|
|
2867
3007
|
* peerConnection 对应名称
|
|
@@ -2878,10 +3018,12 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2878
3018
|
/**
|
|
2879
3019
|
* 北极星上传实例
|
|
2880
3020
|
*/
|
|
2881
|
-
_polarisReport?:
|
|
3021
|
+
_polarisReport?: PolarisHttpReporter | undefined);
|
|
2882
3022
|
getName(): string;
|
|
2883
3023
|
getLocalTracks(): RCLocalTrack[];
|
|
2884
3024
|
private _onConnectionStateChange;
|
|
3025
|
+
private startAutoExecute;
|
|
3026
|
+
private stopAutoExecute;
|
|
2885
3027
|
private _onICEConnectionStateChange;
|
|
2886
3028
|
private _onTrackReady;
|
|
2887
3029
|
/**
|
|
@@ -2916,7 +3058,7 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2916
3058
|
* @returns 返回格式化后的数据
|
|
2917
3059
|
*/
|
|
2918
3060
|
private _getStatsData;
|
|
2919
|
-
getAudioLevelReportData(): Promise<{
|
|
3061
|
+
getAudioLevelReportData(gap?: number): Promise<{
|
|
2920
3062
|
trackId: string;
|
|
2921
3063
|
audioLevel: number | null;
|
|
2922
3064
|
}[] | undefined>;
|
|
@@ -2925,6 +3067,10 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2925
3067
|
* @todo
|
|
2926
3068
|
*/
|
|
2927
3069
|
private _reportHandle;
|
|
3070
|
+
/**
|
|
3071
|
+
* 获取缓存的本地质量数据
|
|
3072
|
+
*/
|
|
3073
|
+
_getCacheStatsData(): IInnerRCRTCStateReport | null | undefined;
|
|
2928
3074
|
/**
|
|
2929
3075
|
* 北极星上报 R3、R4 数据
|
|
2930
3076
|
*/
|
|
@@ -2939,6 +3085,28 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2939
3085
|
isDestroyed(): boolean;
|
|
2940
3086
|
}
|
|
2941
3087
|
|
|
3088
|
+
/**
|
|
3089
|
+
* 通知拉取到的房间增量数据列表中每一项数据的动作
|
|
3090
|
+
*/
|
|
3091
|
+
declare enum PullRoomStatusEvent {
|
|
3092
|
+
/**
|
|
3093
|
+
* 人员加入
|
|
3094
|
+
*/
|
|
3095
|
+
JOIN = 0,
|
|
3096
|
+
/**
|
|
3097
|
+
* 人员离开
|
|
3098
|
+
*/
|
|
3099
|
+
LEAVE = 1,
|
|
3100
|
+
/**
|
|
3101
|
+
* 人员离线
|
|
3102
|
+
*/
|
|
3103
|
+
OFFLINE = 2,
|
|
3104
|
+
/**
|
|
3105
|
+
* 资源变动
|
|
3106
|
+
*/
|
|
3107
|
+
RESOURCECHANGE = 3
|
|
3108
|
+
}
|
|
3109
|
+
|
|
2942
3110
|
interface IRCTrackBitrate {
|
|
2943
3111
|
/**
|
|
2944
3112
|
* 最大码率
|
|
@@ -2974,10 +3142,8 @@ interface IResource {
|
|
|
2974
3142
|
uri: string;
|
|
2975
3143
|
/**
|
|
2976
3144
|
* 资源特征,simulcast 代表这道流支持大小流
|
|
2977
|
-
* @description 此参数存疑,MediaServer 似乎并未下发此字段,Web 端暂不启用
|
|
2978
|
-
* @deprecated
|
|
2979
3145
|
*/
|
|
2980
|
-
|
|
3146
|
+
simulcast: number;
|
|
2981
3147
|
}
|
|
2982
3148
|
/**
|
|
2983
3149
|
* 向房间内发布的媒体数据
|
|
@@ -3238,6 +3404,220 @@ interface IRCRTCStateReport {
|
|
|
3238
3404
|
*/
|
|
3239
3405
|
receivers: IRCTrackStat[];
|
|
3240
3406
|
}
|
|
3407
|
+
/**
|
|
3408
|
+
* http3 北极星上报基础数据
|
|
3409
|
+
*/
|
|
3410
|
+
interface IRCRTCReportBaseData {
|
|
3411
|
+
/**
|
|
3412
|
+
* 上报数据类型 R1-R4
|
|
3413
|
+
*/
|
|
3414
|
+
type: string;
|
|
3415
|
+
appKey: string;
|
|
3416
|
+
/**
|
|
3417
|
+
* 房间通话id
|
|
3418
|
+
*/
|
|
3419
|
+
sessionId: string;
|
|
3420
|
+
roomId: string;
|
|
3421
|
+
/**
|
|
3422
|
+
* 房间创建时间
|
|
3423
|
+
*/
|
|
3424
|
+
roomCreateTime: number;
|
|
3425
|
+
userId: string;
|
|
3426
|
+
userRole: number;
|
|
3427
|
+
joinTime: number;
|
|
3428
|
+
/**
|
|
3429
|
+
* signal 数据中心
|
|
3430
|
+
* */
|
|
3431
|
+
signalDataCenter: string;
|
|
3432
|
+
}
|
|
3433
|
+
/**
|
|
3434
|
+
* http3 北极星上报 R1 数据
|
|
3435
|
+
*/
|
|
3436
|
+
interface IR1Info {
|
|
3437
|
+
/**
|
|
3438
|
+
* 用户加入房间的时间
|
|
3439
|
+
*/
|
|
3440
|
+
joinTime: number;
|
|
3441
|
+
/**
|
|
3442
|
+
* RTC 版本号
|
|
3443
|
+
*/
|
|
3444
|
+
rtcVersion: string;
|
|
3445
|
+
/**
|
|
3446
|
+
* IM SDK 版本
|
|
3447
|
+
*/
|
|
3448
|
+
imVersion: string;
|
|
3449
|
+
/**
|
|
3450
|
+
* 平台(如:Android、iOS、Web)
|
|
3451
|
+
*/
|
|
3452
|
+
platform: string;
|
|
3453
|
+
/**
|
|
3454
|
+
* 设备信息(手机名称+型号)
|
|
3455
|
+
*/
|
|
3456
|
+
device: string;
|
|
3457
|
+
/**
|
|
3458
|
+
* 系统版本(手机系统版本)
|
|
3459
|
+
*/
|
|
3460
|
+
os: string;
|
|
3461
|
+
/**
|
|
3462
|
+
* 浏览器名称, 没有用 -1 表示
|
|
3463
|
+
*/
|
|
3464
|
+
browserName?: string;
|
|
3465
|
+
/**
|
|
3466
|
+
* 浏览器版本, 没有用 -1 表示
|
|
3467
|
+
*/
|
|
3468
|
+
browserVersion?: string;
|
|
3469
|
+
}
|
|
3470
|
+
/**
|
|
3471
|
+
* http3 北极星上报 R2 数据
|
|
3472
|
+
*/
|
|
3473
|
+
interface IR2Info {
|
|
3474
|
+
/**
|
|
3475
|
+
* 用户加入房间的时间
|
|
3476
|
+
*/
|
|
3477
|
+
joinTime: number;
|
|
3478
|
+
/**
|
|
3479
|
+
* 客户端 发布/取消发布 订阅/取消订阅 资源的时间
|
|
3480
|
+
*/
|
|
3481
|
+
sendTime: number;
|
|
3482
|
+
/**
|
|
3483
|
+
* 发布类型 subscribe : 订阅 publish : 发布
|
|
3484
|
+
*/
|
|
3485
|
+
rtcActionType: string;
|
|
3486
|
+
/**
|
|
3487
|
+
* 发布状态 begin : 开始 tend : 结束
|
|
3488
|
+
*/
|
|
3489
|
+
rtcActionStatus: string;
|
|
3490
|
+
trackId: string[];
|
|
3491
|
+
}
|
|
3492
|
+
/**
|
|
3493
|
+
* http3 北极星上报 R3 数据
|
|
3494
|
+
*/
|
|
3495
|
+
interface IR3R4Info {
|
|
3496
|
+
info: IR3R4CommonInfo;
|
|
3497
|
+
}
|
|
3498
|
+
interface IR3R4CommonInfo {
|
|
3499
|
+
/**
|
|
3500
|
+
* 用户加入房间的时间
|
|
3501
|
+
*/
|
|
3502
|
+
joinTime?: number;
|
|
3503
|
+
/**
|
|
3504
|
+
* 用户发布数据流的时间(毫秒),暂时由客户端生成,后期如果有问题服务端做兜底处理
|
|
3505
|
+
*/
|
|
3506
|
+
receiveTime?: number;
|
|
3507
|
+
/**
|
|
3508
|
+
* 总码率
|
|
3509
|
+
*/
|
|
3510
|
+
totalBitRate?: number;
|
|
3511
|
+
/**
|
|
3512
|
+
* APP CPU占用率
|
|
3513
|
+
*/
|
|
3514
|
+
appCPUUsage?: number;
|
|
3515
|
+
/**
|
|
3516
|
+
* 系统 CPU占用率
|
|
3517
|
+
*/
|
|
3518
|
+
systemCPUUsage?: number;
|
|
3519
|
+
/**
|
|
3520
|
+
* 系统CPU频率 (安卓8.0以上)
|
|
3521
|
+
*/
|
|
3522
|
+
systemCPUFrequency?: number;
|
|
3523
|
+
/**
|
|
3524
|
+
* 实时网络状态(2g、3g、4g、wifi)
|
|
3525
|
+
*/
|
|
3526
|
+
networkStatus?: string;
|
|
3527
|
+
/**
|
|
3528
|
+
* Goog rtt 网络延迟
|
|
3529
|
+
*/
|
|
3530
|
+
googleRTTNetwork?: number;
|
|
3531
|
+
/**
|
|
3532
|
+
* ip地址
|
|
3533
|
+
*/
|
|
3534
|
+
ipAddress?: string;
|
|
3535
|
+
/**
|
|
3536
|
+
* 可接收带宽(单位: bit)
|
|
3537
|
+
*/
|
|
3538
|
+
useReceiveBroadBand?: string;
|
|
3539
|
+
/**
|
|
3540
|
+
* 可用发送带宽(单位: bit)
|
|
3541
|
+
*/
|
|
3542
|
+
useSendBroadBand?: string;
|
|
3543
|
+
/**
|
|
3544
|
+
* 丢包数
|
|
3545
|
+
*/
|
|
3546
|
+
packetLossCount?: string;
|
|
3547
|
+
streams?: IR3R4StreamInfo[];
|
|
3548
|
+
}
|
|
3549
|
+
/**
|
|
3550
|
+
* http3 北极星上报 R3、R4 streamInfo 数据
|
|
3551
|
+
*/
|
|
3552
|
+
interface IR3R4StreamInfo {
|
|
3553
|
+
trackId: string;
|
|
3554
|
+
/**
|
|
3555
|
+
* 编解码名称
|
|
3556
|
+
*/
|
|
3557
|
+
codeName?: string;
|
|
3558
|
+
/**
|
|
3559
|
+
* 音频播放音量
|
|
3560
|
+
*/
|
|
3561
|
+
volume?: string;
|
|
3562
|
+
/**
|
|
3563
|
+
* 音频采样率
|
|
3564
|
+
*/
|
|
3565
|
+
samplingRate: number;
|
|
3566
|
+
/**
|
|
3567
|
+
* 下行码率
|
|
3568
|
+
*/
|
|
3569
|
+
bitRate?: number;
|
|
3570
|
+
packetLossRate?: number;
|
|
3571
|
+
/**
|
|
3572
|
+
* 视频接收帧率(单位:fps)
|
|
3573
|
+
*/
|
|
3574
|
+
frameRate?: number;
|
|
3575
|
+
/**
|
|
3576
|
+
* 视频分辨率(格式:640*480)
|
|
3577
|
+
*/
|
|
3578
|
+
resolution?: string;
|
|
3579
|
+
/**
|
|
3580
|
+
* 接收卡顿(间隔时间, 单位: ms)
|
|
3581
|
+
*/
|
|
3582
|
+
blockTime?: number;
|
|
3583
|
+
/**
|
|
3584
|
+
* jitter数据抖动
|
|
3585
|
+
*/
|
|
3586
|
+
jitterData?: number;
|
|
3587
|
+
/**
|
|
3588
|
+
* nack数量
|
|
3589
|
+
*/
|
|
3590
|
+
nAckCount?: string;
|
|
3591
|
+
/**
|
|
3592
|
+
* PLI请求数
|
|
3593
|
+
*/
|
|
3594
|
+
pliCount?: string;
|
|
3595
|
+
/**
|
|
3596
|
+
* googRtt往返时长
|
|
3597
|
+
*/
|
|
3598
|
+
googleRTTTotalTime?: number;
|
|
3599
|
+
/**
|
|
3600
|
+
* 第一个关键帧是否正常收到
|
|
3601
|
+
*/
|
|
3602
|
+
isReceiveFirstFrameRate?: number;
|
|
3603
|
+
/**
|
|
3604
|
+
* 编码方式
|
|
3605
|
+
*/
|
|
3606
|
+
codeType?: string;
|
|
3607
|
+
/**
|
|
3608
|
+
* 当前流的状态是否可用
|
|
3609
|
+
*/
|
|
3610
|
+
isEnabled?: number;
|
|
3611
|
+
}
|
|
3612
|
+
/**
|
|
3613
|
+
* http3 北极星上报总数据
|
|
3614
|
+
*/
|
|
3615
|
+
interface IRCRTCReportData extends IRCRTCReportBaseData {
|
|
3616
|
+
r1Info?: IR1Info;
|
|
3617
|
+
r2Info?: IR2Info;
|
|
3618
|
+
r3Info?: IR3R4Info;
|
|
3619
|
+
r4Info?: IR3R4Info;
|
|
3620
|
+
}
|
|
3241
3621
|
interface IRCRTCReportListener {
|
|
3242
3622
|
/**
|
|
3243
3623
|
* RTCPeerConnection 的详细状态数据
|
|
@@ -3357,16 +3737,16 @@ interface IRCRTCInitOptions {
|
|
|
3357
3737
|
/**
|
|
3358
3738
|
* 输出日志等级,生产环境默认使用 WARN,开发环境默认为 DEBUG
|
|
3359
3739
|
* @description
|
|
3360
|
-
* *
|
|
3361
|
-
* *
|
|
3740
|
+
* * 4 - DEBUG
|
|
3741
|
+
* * 3 - INFO
|
|
3362
3742
|
* * 2 - WARN
|
|
3363
|
-
* *
|
|
3743
|
+
* * 1 - ERROR
|
|
3364
3744
|
*/
|
|
3365
|
-
logLevel?:
|
|
3745
|
+
logLevel?: EnableLogL;
|
|
3366
3746
|
/**
|
|
3367
3747
|
* 修改默认的 log 输出函数
|
|
3368
3748
|
*/
|
|
3369
|
-
logStdout?: (logLevel:
|
|
3749
|
+
logStdout?: (logLevel: EnableLogL, content: string) => void;
|
|
3370
3750
|
/**
|
|
3371
3751
|
* 与 MediaServer 的 http 请求超时时间,单位为毫秒,默认值为 `5000`,有效值 `5000-30000`。
|
|
3372
3752
|
* 优先级:用户配置 > 导航配置 > 默认时间。
|
|
@@ -3388,6 +3768,7 @@ interface IRCRTCInitOptions {
|
|
|
3388
3768
|
* 观众拉内置 CDN 资源时是否使用 https,默认为 RCInnerCDNPullIsHttps.HTTPS
|
|
3389
3769
|
*/
|
|
3390
3770
|
pullInnerCDNUseHttps?: RCInnerCDNPullIsHttps;
|
|
3771
|
+
signalRetryTime?: number;
|
|
3391
3772
|
/**
|
|
3392
3773
|
* 音频降噪处理
|
|
3393
3774
|
* - workletModule 默认值为 https://cdn.ronghub.com/plugin-rtc/wasm/5.0.0-alpha.1/process-worklet.js
|
|
@@ -3547,6 +3928,79 @@ interface IChrmKVPullData {
|
|
|
3547
3928
|
isFullUpdate?: boolean;
|
|
3548
3929
|
syncTime?: number;
|
|
3549
3930
|
}
|
|
3931
|
+
/**
|
|
3932
|
+
* 通知拉取到的房间数据
|
|
3933
|
+
*/
|
|
3934
|
+
interface IPullRTCRoomStatus {
|
|
3935
|
+
/**
|
|
3936
|
+
* 是否是全量数据
|
|
3937
|
+
*/
|
|
3938
|
+
bFullStatus: boolean;
|
|
3939
|
+
/**
|
|
3940
|
+
* 当前房间的最大版本号
|
|
3941
|
+
*/
|
|
3942
|
+
version: number;
|
|
3943
|
+
/**
|
|
3944
|
+
* 如果是全量数据,usersData 不为空,给的是房间全部的人以及发布的资源
|
|
3945
|
+
*/
|
|
3946
|
+
usersData: IPullRTCRoomUsersData[];
|
|
3947
|
+
/**
|
|
3948
|
+
* 房间增量数据
|
|
3949
|
+
*/
|
|
3950
|
+
roomStatus: IRoomStatus[];
|
|
3951
|
+
}
|
|
3952
|
+
/**
|
|
3953
|
+
* 通知拉取到的房间增量数据
|
|
3954
|
+
*/
|
|
3955
|
+
interface IRoomStatus {
|
|
3956
|
+
/**
|
|
3957
|
+
* 用户 id
|
|
3958
|
+
*/
|
|
3959
|
+
userId: string;
|
|
3960
|
+
/**
|
|
3961
|
+
* 本次变更的动作类型
|
|
3962
|
+
*/
|
|
3963
|
+
event: PullRoomStatusEvent;
|
|
3964
|
+
/**
|
|
3965
|
+
* 本次变更的版本号
|
|
3966
|
+
*/
|
|
3967
|
+
time: number;
|
|
3968
|
+
/**
|
|
3969
|
+
* 用户变更的资源,event 为人员加入或资源变动时有值
|
|
3970
|
+
* key 包含 uris、cdn_uris、mcu_uris
|
|
3971
|
+
* value 为字符串数组
|
|
3972
|
+
*/
|
|
3973
|
+
userData: {
|
|
3974
|
+
key: string;
|
|
3975
|
+
value: string;
|
|
3976
|
+
}[];
|
|
3977
|
+
/**
|
|
3978
|
+
* 切换角色,0 代表非切换身份发生的加入、退出房间行为
|
|
3979
|
+
*/
|
|
3980
|
+
switchRoleType: RCRTCLiveRole | 0;
|
|
3981
|
+
/**
|
|
3982
|
+
* 额外的信息
|
|
3983
|
+
*/
|
|
3984
|
+
extra: string;
|
|
3985
|
+
}
|
|
3986
|
+
/**
|
|
3987
|
+
* 通知拉取到的房间全量数据
|
|
3988
|
+
*/
|
|
3989
|
+
interface IPullRTCRoomUsersData {
|
|
3990
|
+
/**
|
|
3991
|
+
* 用户 id
|
|
3992
|
+
*/
|
|
3993
|
+
userId: string;
|
|
3994
|
+
/**
|
|
3995
|
+
* 房间内所有资源数据
|
|
3996
|
+
* key 包含 uris、cdn_uris、mcu_uris
|
|
3997
|
+
* value 为字符串数组
|
|
3998
|
+
*/
|
|
3999
|
+
userData: {
|
|
4000
|
+
key: string;
|
|
4001
|
+
value: string;
|
|
4002
|
+
}[];
|
|
4003
|
+
}
|
|
3550
4004
|
|
|
3551
4005
|
/**
|
|
3552
4006
|
* 自定义合流布局时,背景图片填充方式
|
|
@@ -4082,7 +4536,7 @@ declare class RCMediaStreamCapture {
|
|
|
4082
4536
|
declare class RCRTCClient extends RCMediaStreamCapture {
|
|
4083
4537
|
protected readonly _context: RTCContext;
|
|
4084
4538
|
private readonly _runtime;
|
|
4085
|
-
private
|
|
4539
|
+
private _options;
|
|
4086
4540
|
private readonly _service;
|
|
4087
4541
|
constructor(_context: RTCContext, _runtime: IRuntime, _options: IRCRTCInitOptions);
|
|
4088
4542
|
private _handleMessage;
|
|
@@ -4101,14 +4555,15 @@ declare class RCRTCClient extends RCMediaStreamCapture {
|
|
|
4101
4555
|
getCurrentId(): string;
|
|
4102
4556
|
private _crtRoom;
|
|
4103
4557
|
/**
|
|
4104
|
-
*
|
|
4105
|
-
* @param roomId
|
|
4106
|
-
* @param joinType
|
|
4107
|
-
* @param outerUserDatas
|
|
4108
|
-
* @param useMutilPeerC
|
|
4109
|
-
* @param roomType
|
|
4558
|
+
* > 加入普通音视频房间,返回房间对象、code、userIds、tracks
|
|
4559
|
+
* @param {string} roomId - 房间号
|
|
4560
|
+
* @param {RTCJoinType} [joinType] - 要加入的房间类型。
|
|
4561
|
+
* @param {IRTCUserData} [outerUserDatas] - 加入房间的用户的用户数据。
|
|
4562
|
+
* @param {boolean} [useMutilPeerC] - 是否使用多点连接,默认为false,即使用单点连接。
|
|
4563
|
+
* @param {RTCMode} roomType - RTCMode = RTCMode.RTC,
|
|
4564
|
+
* @param {number} signalRetryTime - 重新连接信令服务器的时间间隔。
|
|
4110
4565
|
*/
|
|
4111
|
-
joinRTCRoom(roomId: string, joinType?: RTCJoinType, outerUserDatas?: IRTCUserData, useMutilPeerC?: boolean, roomType?: RTCMode): Promise<{
|
|
4566
|
+
joinRTCRoom(roomId: string, joinType?: RTCJoinType, outerUserDatas?: IRTCUserData, useMutilPeerC?: boolean, roomType?: RTCMode, signalRetryTime?: number): Promise<{
|
|
4112
4567
|
room?: RCRTCRoom;
|
|
4113
4568
|
code: RCRTCCode;
|
|
4114
4569
|
userIds?: string[];
|
|
@@ -4206,6 +4661,7 @@ declare class RCRTCClient extends RCMediaStreamCapture {
|
|
|
4206
4661
|
code: RCRTCCode | ErrorCode;
|
|
4207
4662
|
data?: IRTCJoinedInfo[];
|
|
4208
4663
|
}>;
|
|
4664
|
+
reportSDKInfo(): void;
|
|
4209
4665
|
}
|
|
4210
4666
|
|
|
4211
4667
|
/**
|