@rongcloud/plugin-rtc 5.5.6 → 5.6.2-enterprise.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 +620 -49
- package/dist/index.esm.js +28759 -15
- package/dist/index.js +28788 -15
- package/dist/index.umd.js +28792 -15
- package/package.json +3 -3
- 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 -27
- 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.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.6.2-enterprise.1
|
|
3
|
+
* CommitId - 997fa7d5adea5b993240a0ca44660464b5de8b5f
|
|
4
|
+
* Mon Nov 14 2022 16:28:20 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,8 @@ 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;
|
|
177
|
+
protected readonly DataTrackId: string;
|
|
175
178
|
constructor(_tag: string, _userId: string, _kind: 'audio' | 'video', _isLocalTrack: boolean, _roomId?: string | undefined);
|
|
176
179
|
/**
|
|
177
180
|
* 获取音视轨所属的 streamId,streamId 相同的音轨和视轨可认为属于统一道流
|
|
@@ -538,11 +541,11 @@ declare enum RCRTCPingResult {
|
|
|
538
541
|
*/
|
|
539
542
|
declare enum RCRTCLiveRole {
|
|
540
543
|
/**
|
|
541
|
-
*
|
|
544
|
+
* 主播降级
|
|
542
545
|
*/
|
|
543
546
|
ANCHOR = 1,
|
|
544
547
|
/**
|
|
545
|
-
*
|
|
548
|
+
* 观众升级
|
|
546
549
|
*/
|
|
547
550
|
AUDIENCE = 2
|
|
548
551
|
}
|
|
@@ -646,7 +649,19 @@ declare enum RTCMode {
|
|
|
646
649
|
/**
|
|
647
650
|
* 跨应用直播
|
|
648
651
|
*/
|
|
649
|
-
CROSS_LIVE = 8
|
|
652
|
+
CROSS_LIVE = 8,
|
|
653
|
+
/**
|
|
654
|
+
* sip呼叫
|
|
655
|
+
*/
|
|
656
|
+
SIP = 4,
|
|
657
|
+
/**
|
|
658
|
+
* 呼叫模式.包括单呼和群呼
|
|
659
|
+
*/
|
|
660
|
+
CALL = 5,
|
|
661
|
+
/**
|
|
662
|
+
* 会议
|
|
663
|
+
*/
|
|
664
|
+
MEETING = 6
|
|
650
665
|
}
|
|
651
666
|
|
|
652
667
|
/**
|
|
@@ -1241,8 +1256,9 @@ declare enum RTCIdentityChangeType {
|
|
|
1241
1256
|
}
|
|
1242
1257
|
|
|
1243
1258
|
declare const keymaps: {
|
|
1244
|
-
readonly RtcInput: readonly ["roomType", "broadcastType", "extraInnerData", "needSysChatroom", "identityChangeType", "joinType", "innerDatas", "outerDatas"];
|
|
1245
|
-
readonly
|
|
1259
|
+
readonly RtcInput: readonly ["roomType", "broadcastType", "extraInnerData", "needSysChatroom", "identityChangeType", "joinType", "innerDatas", "outerDatas", "supportNtf"];
|
|
1260
|
+
readonly RtcOutput: readonly ["version"];
|
|
1261
|
+
readonly RtcUserListOutput: readonly ["users", "token", "sessionId", "roomInfo", "version"];
|
|
1246
1262
|
readonly SetUserStatusInput: readonly ["status"];
|
|
1247
1263
|
readonly RtcSetDataInput: readonly ["interior", "target", "key", "value", "objectName", "content"];
|
|
1248
1264
|
readonly RtcUserSetDataInput: readonly ["valueInfo", "objectName", "content"];
|
|
@@ -1266,6 +1282,16 @@ declare const keymaps: {
|
|
|
1266
1282
|
readonly RtcCancelInviteInput: readonly ["invitedUserId", "invitedRoomId", "inviteInfo", "inviteSessionId"];
|
|
1267
1283
|
readonly RtcInviteAnswerInput: readonly ["inviteUserId", "answerCode", "inviteRoomId", "inviteSessionId", "content", "key", "value"];
|
|
1268
1284
|
readonly RtcEndInviteInput: readonly ["inviteRoomId", "inviteSessionId", "inviteContent", "inviteRoomKeys"];
|
|
1285
|
+
readonly RtcRoomStatusInput: readonly ["version"];
|
|
1286
|
+
readonly RtcRoomStatusOutput: readonly ["bFullStatus", "version", "usersData", "roomStatus"];
|
|
1287
|
+
readonly RtcReportSDKInput: readonly ["sdkInfo"];
|
|
1288
|
+
readonly RCRTCPBPolaris: readonly ["type", "appKey", "sessionId", "roomId", "roomCreateTime", "userId", "userRole", "joinTime", "signalDataCenter", "r1Info", "r2Info", "r3Info", "r4Info"];
|
|
1289
|
+
readonly RCRTCPBR1Info: readonly ["joinTime", "rtcVersion", "imVersion", "platform", "device", "os", "browserName", "browserVersion"];
|
|
1290
|
+
readonly RCRTCPBR2Info: readonly ["joinTime", "sendTime", "rtcActionType", "rtcActionStatus", "trackId"];
|
|
1291
|
+
readonly RCRTCPBR3Info: readonly ["info"];
|
|
1292
|
+
readonly RCRTCPBR4Info: readonly ["info"];
|
|
1293
|
+
readonly RCRTCPBStatusInfo: readonly ["joinTime", "receiveTime", "totalBitRate", "appCPUUsage", "systemCPUUsage", "systemCPUFrequency", "networkStatus", "googleRTTNetwork", "ipAddress", "useReceiveBroadBand", "useSendBroadBand", "packetLossCount", "streams"];
|
|
1294
|
+
readonly RCRTCPBStreamInfo: readonly ["trackId", "codeName", "volume", "samplingRate", "bitRate", "packetLossRate", "frameRate", "resolution", "blockTime", "jitterData", "nAckCount", "pliCount", "googleRTTTotalTime", "isReceiveFirstFrameRate", "codeType", "isEnabled"];
|
|
1269
1295
|
};
|
|
1270
1296
|
declare type RTCKeyMaps = typeof keymaps;
|
|
1271
1297
|
|
|
@@ -1331,6 +1357,10 @@ interface IJoinRTCRoomData extends IRTCUsers {
|
|
|
1331
1357
|
}[];
|
|
1332
1358
|
kvEntries: IServerRTCRoomEntry[];
|
|
1333
1359
|
offlineKickTime: number;
|
|
1360
|
+
codeFormat?: string;
|
|
1361
|
+
roomCreateTime?: number;
|
|
1362
|
+
userJoinTime?: number;
|
|
1363
|
+
version: number;
|
|
1334
1364
|
}
|
|
1335
1365
|
interface IReqRoomPKOptions {
|
|
1336
1366
|
/**
|
|
@@ -1436,11 +1466,42 @@ interface IEndRoomPKOptions {
|
|
|
1436
1466
|
*/
|
|
1437
1467
|
keys: string[];
|
|
1438
1468
|
}
|
|
1469
|
+
interface IRTCNaviInfo extends INaviInfo {
|
|
1470
|
+
/**
|
|
1471
|
+
* jwt token
|
|
1472
|
+
*/
|
|
1473
|
+
jwt?: string;
|
|
1474
|
+
/**
|
|
1475
|
+
* http3 上报域名
|
|
1476
|
+
*/
|
|
1477
|
+
logServer?: string;
|
|
1478
|
+
/**
|
|
1479
|
+
* 数据中心
|
|
1480
|
+
*/
|
|
1481
|
+
dc?: string;
|
|
1482
|
+
/**
|
|
1483
|
+
* openGzip 开启标识,默认是false,开启使用true
|
|
1484
|
+
*/
|
|
1485
|
+
openGzip?: boolean;
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
/**
|
|
1489
|
+
* 自定义上报北极星数据响应 code
|
|
1490
|
+
*/
|
|
1491
|
+
declare enum RCSendCode {
|
|
1492
|
+
NOT_REPORT = -1,
|
|
1493
|
+
REPORT_SUCCESS = 10000,
|
|
1494
|
+
REPORT_FAIL = 0,
|
|
1495
|
+
PB_ERROR = 40001
|
|
1496
|
+
}
|
|
1439
1497
|
|
|
1440
1498
|
declare class RTCContext {
|
|
1441
1499
|
private context;
|
|
1442
1500
|
private codec;
|
|
1501
|
+
roomCreateTime: number | undefined;
|
|
1502
|
+
userJoinTime: number | undefined;
|
|
1443
1503
|
constructor(context: RTCPluginContext, codec: AbsCodec<RTCKeyMaps>);
|
|
1504
|
+
logger: BasicLogger | null;
|
|
1444
1505
|
joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): IPromiseResult<IJoinRTCRoomData>;
|
|
1445
1506
|
quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
1446
1507
|
getRTCRoomInfo(roomId: string): IPromiseResult<IRTCRoomInfo>;
|
|
@@ -1472,6 +1533,10 @@ declare class RTCContext {
|
|
|
1472
1533
|
getRTCOutData(roomId: string, userIds: string[]): IPromiseResult<unknown>;
|
|
1473
1534
|
getRTCToken(roomId: string, mode: number, broadcastType?: number): IPromiseResult<IRtcTokenData>;
|
|
1474
1535
|
setRTCState(roomId: string, report: string): Promise<ErrorCode>;
|
|
1536
|
+
/**
|
|
1537
|
+
* 通过 http 方式上报 rtc state
|
|
1538
|
+
*/
|
|
1539
|
+
setRTCStateByHttp(logServer: string, runtime: IRuntime, report: IRCRTCReportData, reportType: string): Promise<RCSendCode | RCRTCCode>;
|
|
1475
1540
|
getRTCUserList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
1476
1541
|
joinLivingRoomAsAudience(roomId: string, mode: RTCMode, broadcastType?: number): Promise<IAsyncRes<{
|
|
1477
1542
|
token: string;
|
|
@@ -1485,16 +1550,41 @@ declare class RTCContext {
|
|
|
1485
1550
|
endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
|
|
1486
1551
|
getRTCJoinedUserInfo(userId: string): Promise<IAsyncRes<IRTCJoinedInfo[]>>;
|
|
1487
1552
|
pullRTCRoomEntry(roomId: string): Promise<IAsyncRes<IChrmKVPullData>>;
|
|
1553
|
+
/**
|
|
1554
|
+
* 通知拉取房间数据
|
|
1555
|
+
* @param roomId 房间 id
|
|
1556
|
+
* @param version 本地最大得房间数据版本号
|
|
1557
|
+
*/
|
|
1558
|
+
pullRTCRoomStatus(roomId: string, version: number): Promise<{
|
|
1559
|
+
code: ErrorCode;
|
|
1560
|
+
data?: IPullRTCRoomStatus;
|
|
1561
|
+
}>;
|
|
1488
1562
|
decodeRtcNotify(buffer: Uint8Array): {
|
|
1489
1563
|
time: number;
|
|
1490
1564
|
type: any;
|
|
1491
1565
|
roomId: any;
|
|
1492
1566
|
};
|
|
1493
1567
|
getCurrentId(): string;
|
|
1494
|
-
getNaviInfo():
|
|
1568
|
+
getNaviInfo(): IRTCNaviInfo | null;
|
|
1495
1569
|
getConnectionStatus(): ConnectionStatus;
|
|
1496
1570
|
getAppkey(): string;
|
|
1497
|
-
|
|
1571
|
+
/** web 端发 rtcPing */
|
|
1572
|
+
webRtcPing(roomId: string, roomMode: RTCMode, broadcastType?: number): Promise<{
|
|
1573
|
+
code: ErrorCode;
|
|
1574
|
+
data?: {
|
|
1575
|
+
version: number;
|
|
1576
|
+
};
|
|
1577
|
+
}>;
|
|
1578
|
+
/**
|
|
1579
|
+
* 协议栈 rtcping 依赖 imlib 编解码数据
|
|
1580
|
+
* web 单独走 imlib 提供的 rtcSignaling 方法,减少对 imlib 的依赖
|
|
1581
|
+
*/
|
|
1582
|
+
rtcPing(roomId: string, roomMode: RTCMode, broadcastType?: number): Promise<{
|
|
1583
|
+
code: ErrorCode;
|
|
1584
|
+
data?: {
|
|
1585
|
+
version: number;
|
|
1586
|
+
} | undefined;
|
|
1587
|
+
}> | Promise<IAsyncRes<any>>;
|
|
1498
1588
|
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions): IPromiseResult<IReceivedMessage>;
|
|
1499
1589
|
registerRTCSignalListener(listener?: ((buffer: Uint8Array) => void) | undefined): void;
|
|
1500
1590
|
registerConnectionStateChangeListener(listener: (status: ConnectionStatus) => void): void;
|
|
@@ -1503,6 +1593,9 @@ declare class RTCContext {
|
|
|
1503
1593
|
registerMessageListener(listener: (message: IReceivedMessage) => boolean): void;
|
|
1504
1594
|
getCoreVersion(): string;
|
|
1505
1595
|
getPluginContext(): RTCPluginContext;
|
|
1596
|
+
reportSDKInfo(versionInfo: {
|
|
1597
|
+
[name: string]: string;
|
|
1598
|
+
}): void;
|
|
1506
1599
|
}
|
|
1507
1600
|
|
|
1508
1601
|
declare class RCMediaService {
|
|
@@ -1546,7 +1639,7 @@ declare class RCMediaService {
|
|
|
1546
1639
|
private static msInDetector;
|
|
1547
1640
|
private static detectorTime;
|
|
1548
1641
|
private static detectValidMinute;
|
|
1549
|
-
|
|
1642
|
+
static jwtToken: string;
|
|
1550
1643
|
private _msList;
|
|
1551
1644
|
constructor(_runtime: IRuntime, _context: RTCContext,
|
|
1552
1645
|
/**
|
|
@@ -1584,7 +1677,7 @@ declare class RCMediaService {
|
|
|
1584
1677
|
* @param header
|
|
1585
1678
|
* @param body
|
|
1586
1679
|
*/
|
|
1587
|
-
exchange(headers: IRTCReqHeader, body: IExchangeReqBody): Promise<{
|
|
1680
|
+
exchange(headers: IRTCReqHeader, body: IExchangeReqBody, traceId: string): Promise<{
|
|
1588
1681
|
code: RCRTCCode;
|
|
1589
1682
|
data?: IExchangeResponse | undefined;
|
|
1590
1683
|
}>;
|
|
@@ -1672,6 +1765,7 @@ declare class RCRTCPeerCManager {
|
|
|
1672
1765
|
* 存储创建的所有 peerC,key 为 pcName,/exchange 请求中 request header 中的 Peer-Connection-Id 值
|
|
1673
1766
|
*/
|
|
1674
1767
|
private _mutilPeerC;
|
|
1768
|
+
onTrackTrouble?: Function;
|
|
1675
1769
|
constructor(
|
|
1676
1770
|
/**
|
|
1677
1771
|
* 是否使用多 peerConnection
|
|
@@ -1692,7 +1786,7 @@ declare class RCRTCPeerCManager {
|
|
|
1692
1786
|
/**
|
|
1693
1787
|
* 北极星上报模块
|
|
1694
1788
|
*/
|
|
1695
|
-
_polarisReport?:
|
|
1789
|
+
_polarisReport?: PolarisHttpReporter | undefined);
|
|
1696
1790
|
get useMutilPeerC(): boolean;
|
|
1697
1791
|
/**
|
|
1698
1792
|
* 根据 track 判断是否为上行
|
|
@@ -1812,7 +1906,7 @@ declare abstract class ReadableStore {
|
|
|
1812
1906
|
readonly roomId: string;
|
|
1813
1907
|
readonly crtUserId: string;
|
|
1814
1908
|
readonly roomMode: RTCMode;
|
|
1815
|
-
readonly polarisReport:
|
|
1909
|
+
readonly polarisReport: PolarisHttpReporter;
|
|
1816
1910
|
readonly isUpgrade?: boolean | undefined;
|
|
1817
1911
|
readonly isMainRoom?: boolean | undefined;
|
|
1818
1912
|
/**
|
|
@@ -1844,7 +1938,8 @@ declare abstract class ReadableStore {
|
|
|
1844
1938
|
protected _CDNUris: ICDNUris | null;
|
|
1845
1939
|
protected _CDNEnable: boolean;
|
|
1846
1940
|
protected _destroyed: boolean;
|
|
1847
|
-
|
|
1941
|
+
protected _roomStatusVersion: number;
|
|
1942
|
+
constructor(context: RTCContext, service: RCMediaService, peerMgr: RCRTCPeerCManager, roomId: string, crtUserId: string, roomMode: RTCMode, polarisReport: PolarisHttpReporter, isUpgrade?: boolean | undefined, isMainRoom?: boolean | undefined);
|
|
1848
1943
|
get useMutilPeerC(): boolean;
|
|
1849
1944
|
getResourcesByUserId(userId: string): IPublishedResource[] | undefined;
|
|
1850
1945
|
getRemoteTrack(trackId: string): RCRemoteTrack | undefined;
|
|
@@ -1864,10 +1959,11 @@ declare abstract class ReadableStore {
|
|
|
1864
1959
|
getTrackState(trackId: string): 0 | 1;
|
|
1865
1960
|
getCDNEnable(): boolean;
|
|
1866
1961
|
getCDNUris(): ICDNUris | null;
|
|
1962
|
+
getRoomStatusVersion(): number;
|
|
1867
1963
|
}
|
|
1868
1964
|
declare class Store extends ReadableStore {
|
|
1869
1965
|
private _initRemoteTracks;
|
|
1870
|
-
initWithRoomData(data: IJoinRTCRoomData): void;
|
|
1966
|
+
initWithRoomData(data: IJoinRTCRoomData, traceId: string): void;
|
|
1871
1967
|
assignRoomData(data: RoomData): void;
|
|
1872
1968
|
setResourcesByUserId(userId: string, arr: IPublishedResource[]): void;
|
|
1873
1969
|
removeRemoteTrack(trackId: string): void;
|
|
@@ -1878,6 +1974,7 @@ declare class Store extends ReadableStore {
|
|
|
1878
1974
|
setCDNUris(uris: ICDNUris | null): void;
|
|
1879
1975
|
resetSubscribedList(subscribeList: ISubscribeAttr[]): void;
|
|
1880
1976
|
resetCollectSubscribeList(collectSubscribeList: ISubscribeAttr[]): void;
|
|
1977
|
+
setRoomStatusVersion(version: number): void;
|
|
1881
1978
|
}
|
|
1882
1979
|
|
|
1883
1980
|
declare enum CommandPriority {
|
|
@@ -1944,7 +2041,7 @@ declare class BaseInvoker<STORE> {
|
|
|
1944
2041
|
* 房间任务队列管理
|
|
1945
2042
|
*/
|
|
1946
2043
|
declare class Invoker extends BaseInvoker<Store> {
|
|
1947
|
-
constructor(context: RTCContext, service: RCMediaService, peerMrg: RCRTCPeerCManager, roomId: string, crtUserId: string, mode: RTCMode, reporter:
|
|
2044
|
+
constructor(context: RTCContext, service: RCMediaService, peerMrg: RCRTCPeerCManager, roomId: string, crtUserId: string, mode: RTCMode, reporter: PolarisHttpReporter, isUpgrade?: boolean, isMainRoom?: boolean);
|
|
1948
2045
|
/**
|
|
1949
2046
|
* 获取 store 存储实例,返回值类型 `ReadableStore`,避免非 command 定义中修改内存
|
|
1950
2047
|
*/
|
|
@@ -2142,6 +2239,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2142
2239
|
*/
|
|
2143
2240
|
protected readonly _useMutilPeerC?: boolean | undefined;
|
|
2144
2241
|
protected readonly _clientSessionId: string;
|
|
2242
|
+
protected readonly signalRetryTime: number;
|
|
2145
2243
|
/**
|
|
2146
2244
|
* 房间保活 rtcPing
|
|
2147
2245
|
*/
|
|
@@ -2149,7 +2247,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2149
2247
|
/**
|
|
2150
2248
|
* 北极星上报实例
|
|
2151
2249
|
*/
|
|
2152
|
-
protected _polarisReport:
|
|
2250
|
+
protected _polarisReport: PolarisHttpReporter | null;
|
|
2153
2251
|
/**
|
|
2154
2252
|
* 音量上报实例
|
|
2155
2253
|
*/
|
|
@@ -2160,12 +2258,31 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2160
2258
|
protected _peerCManager: RCRTCPeerCManager | null;
|
|
2161
2259
|
protected readonly _invoker: Invoker;
|
|
2162
2260
|
protected readonly _store: ReadableStore;
|
|
2261
|
+
/**
|
|
2262
|
+
* RCRTCRoom 类的构造函数。
|
|
2263
|
+
* @param {RTCContext} _context - RTC上下文,
|
|
2264
|
+
* @param {IRuntime} _runtime - 运行时
|
|
2265
|
+
* @param {string} _roomId - 房间号
|
|
2266
|
+
* @param {RTCMode} _roomMode - RTC模式,
|
|
2267
|
+
* @param {RCMediaService} _service - RCMediaService
|
|
2268
|
+
* @param {IRCRTCInitOptions} _initOptions - IRCRTCInitOptions
|
|
2269
|
+
* @param {boolean} [isUpgrade] - 是否是升级,如果是升级则不会创建新的peerConnection
|
|
2270
|
+
* @param {boolean} [isMainRoom] - 无论是主房间,主房间都是用户创建的房间,子房间是用户创建的房间。
|
|
2271
|
+
* @param {boolean} [_useMutilPeerC] - 是否使用多个 peerConnections
|
|
2272
|
+
* @param {string} _clientSessionId - 客户端会话 ID,用于标识客户端。
|
|
2273
|
+
* @param {number} signalRetryTime - 发送信号的时间间隔。
|
|
2274
|
+
*/
|
|
2163
2275
|
constructor(_context: RTCContext, _runtime: IRuntime, _roomId: string, _roomMode: RTCMode, _service: RCMediaService, _initOptions: IRCRTCInitOptions, isUpgrade?: boolean, isMainRoom?: boolean,
|
|
2164
2276
|
/**
|
|
2165
2277
|
* 是否使用多 peerConnection
|
|
2166
2278
|
*/
|
|
2167
|
-
_useMutilPeerC?: boolean | undefined, _clientSessionId?: string);
|
|
2168
|
-
|
|
2279
|
+
_useMutilPeerC?: boolean | undefined, _clientSessionId?: string, signalRetryTime?: number);
|
|
2280
|
+
/**
|
|
2281
|
+
* 拉取房间数据
|
|
2282
|
+
* @param roomId 房间 id
|
|
2283
|
+
*/
|
|
2284
|
+
private _startPullRTCRoomStatus;
|
|
2285
|
+
__innerInit(mode: RTCMode, joinType?: RTCJoinType, livingType?: RCLivingType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData, traceId?: string): Promise<{
|
|
2169
2286
|
code: RCRTCCode | ErrorCode;
|
|
2170
2287
|
data?: IJoinRTCRoomData;
|
|
2171
2288
|
}>;
|
|
@@ -2185,7 +2302,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2185
2302
|
private _onTrackReady;
|
|
2186
2303
|
protected _callAppListener(eventType: keyof IRoomEventListener, ...attrs: any[]): void;
|
|
2187
2304
|
private _onTrackUnpublish;
|
|
2188
|
-
__parseInnerMessage(message: IReceivedMessage): boolean;
|
|
2305
|
+
__parseInnerMessage(message: IReceivedMessage, traceId: string): boolean;
|
|
2189
2306
|
/**
|
|
2190
2307
|
* 被踢出房间通知
|
|
2191
2308
|
* @param byServer
|
|
@@ -2200,13 +2317,17 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2200
2317
|
* @param messageType 消息类型
|
|
2201
2318
|
* @param userId 消息发送者
|
|
2202
2319
|
*/
|
|
2203
|
-
protected _resourceHandle(content: ResourceMsgContent, messageType: RCRTCMessageType.PUBLISH | RCRTCMessageType.UNPUBLISH | RCRTCMessageType.MODIFY | RCRTCMessageType.TOTAL_CONTENT_RESOURCE, userId: string): Promise<void>;
|
|
2320
|
+
protected _resourceHandle(content: ResourceMsgContent, messageType: RCRTCMessageType.PUBLISH | RCRTCMessageType.UNPUBLISH | RCRTCMessageType.MODIFY | RCRTCMessageType.TOTAL_CONTENT_RESOURCE, userId: string, traceId: string): Promise<void>;
|
|
2204
2321
|
private _onTrackPublish;
|
|
2205
2322
|
/**
|
|
2206
2323
|
* 处理 `RCRTCMessageType.STATE` 消息
|
|
2207
2324
|
* @param content
|
|
2208
2325
|
*/
|
|
2209
2326
|
private _stateHandle;
|
|
2327
|
+
/**
|
|
2328
|
+
* 处理人员应用层事件
|
|
2329
|
+
*/
|
|
2330
|
+
private _dealUserAppListener;
|
|
2210
2331
|
/**
|
|
2211
2332
|
* 获取房间 Id
|
|
2212
2333
|
*/
|
|
@@ -2573,7 +2694,7 @@ declare class RCAudienceLivingRoom {
|
|
|
2573
2694
|
/**
|
|
2574
2695
|
* 北极星上报实例
|
|
2575
2696
|
*/
|
|
2576
|
-
protected _polarisReport:
|
|
2697
|
+
protected _polarisReport: PolarisHttpReporter | null;
|
|
2577
2698
|
/**
|
|
2578
2699
|
* 音量上报实例
|
|
2579
2700
|
*/
|
|
@@ -2821,7 +2942,7 @@ declare class PolarisReporter {
|
|
|
2821
2942
|
* @param resourceId userId_11_1_tiny 改为 userId_11_tiny_video
|
|
2822
2943
|
*/
|
|
2823
2944
|
private _getPolarisTrackId;
|
|
2824
|
-
sendR3R4Data(data: IInnerRCRTCStateReport): Promise<
|
|
2945
|
+
sendR3R4Data(data: IInnerRCRTCStateReport): Promise<RCSendCode>;
|
|
2825
2946
|
/**
|
|
2826
2947
|
* 加入房间
|
|
2827
2948
|
*/
|
|
@@ -2833,6 +2954,51 @@ declare class PolarisReporter {
|
|
|
2833
2954
|
sendR2(action: string, status: string, trackIds: string[]): void;
|
|
2834
2955
|
}
|
|
2835
2956
|
|
|
2957
|
+
declare class PolarisHttpReporter {
|
|
2958
|
+
private readonly _context;
|
|
2959
|
+
private readonly _runtime;
|
|
2960
|
+
private readonly _roomId;
|
|
2961
|
+
private readonly _crtRTCRoom;
|
|
2962
|
+
private readonly _userRole;
|
|
2963
|
+
protected _polarisSignalReporter: PolarisReporter | null;
|
|
2964
|
+
private _useHttp;
|
|
2965
|
+
static logServer: string | undefined;
|
|
2966
|
+
static dc: string | undefined;
|
|
2967
|
+
constructor(_context: RTCContext, _runtime: IRuntime, _roomId: string, _crtRTCRoom: RCAbstractRoom | RCAudienceLivingRoom, _userRole?: PolarisRole);
|
|
2968
|
+
private _send;
|
|
2969
|
+
private _refetchNaviInfo;
|
|
2970
|
+
/**
|
|
2971
|
+
* 小流需去掉 _tiny,小流 resourceId 为 userId_tag_mediaType_tiny
|
|
2972
|
+
*/
|
|
2973
|
+
private _getRealResourceId;
|
|
2974
|
+
/**
|
|
2975
|
+
* 生成北极星上报的 trackId
|
|
2976
|
+
* @param resourceId userId_11_1_tiny 改为 userId_11_tiny_video
|
|
2977
|
+
*/
|
|
2978
|
+
private _getPolarisTrackId;
|
|
2979
|
+
private _formatReportBaseData;
|
|
2980
|
+
private _formatReportData;
|
|
2981
|
+
private _formatR1Data;
|
|
2982
|
+
private _formatR2Data;
|
|
2983
|
+
private _formatR3R4Data;
|
|
2984
|
+
sendR3R4Data(data: IInnerRCRTCStateReport): Promise<RCSendCode>;
|
|
2985
|
+
/**
|
|
2986
|
+
* 加入房间
|
|
2987
|
+
*/
|
|
2988
|
+
sendR1(): Promise<void>;
|
|
2989
|
+
/**
|
|
2990
|
+
* RTC 和 LIVE 发布、取消发布
|
|
2991
|
+
* RTC 订阅、取消订阅
|
|
2992
|
+
*/
|
|
2993
|
+
sendR2(action: string, status: string, trackIds: string[]): Promise<void>;
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2996
|
+
declare enum RCEncoder {
|
|
2997
|
+
VP8 = "VP8",
|
|
2998
|
+
VP9 = "VP9",
|
|
2999
|
+
H264 = "H264"
|
|
3000
|
+
}
|
|
3001
|
+
|
|
2836
3002
|
/**
|
|
2837
3003
|
* PC 实例管理类
|
|
2838
3004
|
*/
|
|
@@ -2853,6 +3019,7 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2853
3019
|
* 北极星上传实例
|
|
2854
3020
|
*/
|
|
2855
3021
|
private readonly _polarisReport?;
|
|
3022
|
+
private readonly onTrackTrouble?;
|
|
2856
3023
|
static __INNER_EVENT_TRACK_READY__: string;
|
|
2857
3024
|
private readonly _rtcPeerConn;
|
|
2858
3025
|
private readonly _sdpStrategy;
|
|
@@ -2862,6 +3029,9 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2862
3029
|
private _reportStatsTimer;
|
|
2863
3030
|
private _reportR3R4ToPolarisTimer;
|
|
2864
3031
|
private _isDestroyed;
|
|
3032
|
+
private _reportStatsData?;
|
|
3033
|
+
private _originReportStatsData?;
|
|
3034
|
+
private _logger;
|
|
2865
3035
|
constructor(
|
|
2866
3036
|
/**
|
|
2867
3037
|
* peerConnection 对应名称
|
|
@@ -2878,10 +3048,12 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2878
3048
|
/**
|
|
2879
3049
|
* 北极星上传实例
|
|
2880
3050
|
*/
|
|
2881
|
-
_polarisReport?:
|
|
3051
|
+
_polarisReport?: PolarisHttpReporter | undefined, onTrackTrouble?: Function | undefined);
|
|
2882
3052
|
getName(): string;
|
|
2883
3053
|
getLocalTracks(): RCLocalTrack[];
|
|
2884
3054
|
private _onConnectionStateChange;
|
|
3055
|
+
private startAutoExecute;
|
|
3056
|
+
private stopAutoExecute;
|
|
2885
3057
|
private _onICEConnectionStateChange;
|
|
2886
3058
|
private _onTrackReady;
|
|
2887
3059
|
/**
|
|
@@ -2889,12 +3061,35 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2889
3061
|
* @deprecated use RCLocalTrack.setBitrate instead of setBitrate
|
|
2890
3062
|
*/
|
|
2891
3063
|
setBitrate(max: number, min: number, start?: number): Promise<void>;
|
|
3064
|
+
/**
|
|
3065
|
+
* `createOffer` 是一个创建报价并记录报价 SDP 和 SDP 语义的函数
|
|
3066
|
+
* @param {boolean} iceRestart - 布尔值
|
|
3067
|
+
* @returns 具有两个属性的对象:
|
|
3068
|
+
* - sdp:SDP 字符串
|
|
3069
|
+
* - 语义:SDP 语义
|
|
3070
|
+
*/
|
|
2892
3071
|
createOffer(iceRestart: boolean): Promise<IOfferInfo>;
|
|
2893
3072
|
setRemoteAnswer(answer: string): Promise<RCRTCCode>;
|
|
2894
3073
|
getLocalTrack(trackId: string): RCLocalTrack | null;
|
|
3074
|
+
/**
|
|
3075
|
+
* 它将本地轨道添加到对等连接。
|
|
3076
|
+
* @param {RCLocalTrack} track - 要添加的本地轨道。
|
|
3077
|
+
*/
|
|
2895
3078
|
addLocalTrack(track: RCLocalTrack): void;
|
|
3079
|
+
/**
|
|
3080
|
+
* 按 ID 删除本地轨道
|
|
3081
|
+
* @param {string} trackId - 要移除的轨道的 ID。
|
|
3082
|
+
* @returns 正在删除的轨道。
|
|
3083
|
+
*/
|
|
2896
3084
|
removeLocalTrackById(trackId: string): void;
|
|
3085
|
+
/**
|
|
3086
|
+
* 它会删除所有本地Track。
|
|
3087
|
+
*/
|
|
2897
3088
|
removeAllLocalTrack(): void;
|
|
3089
|
+
/**
|
|
3090
|
+
* 从对等连接中删除本地轨道。
|
|
3091
|
+
* @param {RCLocalTrack} track - 要删除的本地轨道。
|
|
3092
|
+
*/
|
|
2898
3093
|
removeLocalTrack(track: RCLocalTrack): void;
|
|
2899
3094
|
private _updateRecvTransceiverMap;
|
|
2900
3095
|
updateSubRemoteTracks(remoteTracks: RCRemoteTrack[]): void;
|
|
@@ -2916,7 +3111,7 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2916
3111
|
* @returns 返回格式化后的数据
|
|
2917
3112
|
*/
|
|
2918
3113
|
private _getStatsData;
|
|
2919
|
-
getAudioLevelReportData(): Promise<{
|
|
3114
|
+
getAudioLevelReportData(gap?: number): Promise<{
|
|
2920
3115
|
trackId: string;
|
|
2921
3116
|
audioLevel: number | null;
|
|
2922
3117
|
}[] | undefined>;
|
|
@@ -2925,6 +3120,10 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2925
3120
|
* @todo
|
|
2926
3121
|
*/
|
|
2927
3122
|
private _reportHandle;
|
|
3123
|
+
/**
|
|
3124
|
+
* 获取缓存的本地质量数据
|
|
3125
|
+
*/
|
|
3126
|
+
_getCacheStatsData(): IInnerRCRTCStateReport | null | undefined;
|
|
2928
3127
|
/**
|
|
2929
3128
|
* 北极星上报 R3、R4 数据
|
|
2930
3129
|
*/
|
|
@@ -2934,9 +3133,47 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2934
3133
|
*/
|
|
2935
3134
|
__reportR3R4ToPolaris(): Promise<void>;
|
|
2936
3135
|
getRTCPeerConn(): RTCPeerConnection;
|
|
3136
|
+
/**
|
|
3137
|
+
* 它返回一个 RTCRtpCodecCapability 对象数组,第一个元素是与传入的编码器类型匹配的元素
|
|
3138
|
+
* @param {RCEncoder} encoder - RCEncoder.H264
|
|
3139
|
+
* @returns 正在返回 RTCRtpCodecCapability[] 数组。
|
|
3140
|
+
*/
|
|
3141
|
+
private getCapabilitiesCodes;
|
|
3142
|
+
/**
|
|
3143
|
+
* 它为视频流设置编码器首选项。
|
|
3144
|
+
* @param {RCEncoder} [encoder] - RC编码器
|
|
3145
|
+
*/
|
|
3146
|
+
setEncoderPreferences(encoder?: RCEncoder): Promise<void>;
|
|
2937
3147
|
destroy(): void;
|
|
2938
3148
|
clearReTryExchangeTimer(): void;
|
|
2939
3149
|
isDestroyed(): boolean;
|
|
3150
|
+
/**
|
|
3151
|
+
* 视频不可使用的收集器
|
|
3152
|
+
*/
|
|
3153
|
+
private troubleTracksCollection;
|
|
3154
|
+
private setTroubleTrack;
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
/**
|
|
3158
|
+
* 通知拉取到的房间增量数据列表中每一项数据的动作
|
|
3159
|
+
*/
|
|
3160
|
+
declare enum PullRoomStatusEvent {
|
|
3161
|
+
/**
|
|
3162
|
+
* 人员加入
|
|
3163
|
+
*/
|
|
3164
|
+
JOIN = 0,
|
|
3165
|
+
/**
|
|
3166
|
+
* 人员离开
|
|
3167
|
+
*/
|
|
3168
|
+
LEAVE = 1,
|
|
3169
|
+
/**
|
|
3170
|
+
* 人员离线
|
|
3171
|
+
*/
|
|
3172
|
+
OFFLINE = 2,
|
|
3173
|
+
/**
|
|
3174
|
+
* 资源变动
|
|
3175
|
+
*/
|
|
3176
|
+
RESOURCECHANGE = 3
|
|
2940
3177
|
}
|
|
2941
3178
|
|
|
2942
3179
|
interface IRCTrackBitrate {
|
|
@@ -2974,10 +3211,8 @@ interface IResource {
|
|
|
2974
3211
|
uri: string;
|
|
2975
3212
|
/**
|
|
2976
3213
|
* 资源特征,simulcast 代表这道流支持大小流
|
|
2977
|
-
* @description 此参数存疑,MediaServer 似乎并未下发此字段,Web 端暂不启用
|
|
2978
|
-
* @deprecated
|
|
2979
3214
|
*/
|
|
2980
|
-
|
|
3215
|
+
simulcast: number;
|
|
2981
3216
|
}
|
|
2982
3217
|
/**
|
|
2983
3218
|
* 向房间内发布的媒体数据
|
|
@@ -3238,6 +3473,228 @@ interface IRCRTCStateReport {
|
|
|
3238
3473
|
*/
|
|
3239
3474
|
receivers: IRCTrackStat[];
|
|
3240
3475
|
}
|
|
3476
|
+
/**
|
|
3477
|
+
* http3 北极星上报基础数据
|
|
3478
|
+
*/
|
|
3479
|
+
interface IRCRTCReportBaseData {
|
|
3480
|
+
/**
|
|
3481
|
+
* 上报数据类型 R1-R4
|
|
3482
|
+
*/
|
|
3483
|
+
type: string;
|
|
3484
|
+
appKey: string;
|
|
3485
|
+
/**
|
|
3486
|
+
* 房间通话id
|
|
3487
|
+
*/
|
|
3488
|
+
sessionId: string;
|
|
3489
|
+
roomId: string;
|
|
3490
|
+
/**
|
|
3491
|
+
* 房间创建时间
|
|
3492
|
+
*/
|
|
3493
|
+
roomCreateTime: number;
|
|
3494
|
+
userId: string;
|
|
3495
|
+
userRole: number;
|
|
3496
|
+
joinTime: number;
|
|
3497
|
+
/**
|
|
3498
|
+
* signal 数据中心
|
|
3499
|
+
* */
|
|
3500
|
+
signalDataCenter: string;
|
|
3501
|
+
}
|
|
3502
|
+
/**
|
|
3503
|
+
* http3 北极星上报 R1 数据
|
|
3504
|
+
*/
|
|
3505
|
+
interface IR1Info {
|
|
3506
|
+
/**
|
|
3507
|
+
* 用户加入房间的时间
|
|
3508
|
+
*/
|
|
3509
|
+
joinTime: number;
|
|
3510
|
+
/**
|
|
3511
|
+
* RTC 版本号
|
|
3512
|
+
*/
|
|
3513
|
+
rtcVersion: string;
|
|
3514
|
+
/**
|
|
3515
|
+
* IM SDK 版本
|
|
3516
|
+
*/
|
|
3517
|
+
imVersion: string;
|
|
3518
|
+
/**
|
|
3519
|
+
* 平台(如:Android、iOS、Web)
|
|
3520
|
+
*/
|
|
3521
|
+
platform: string;
|
|
3522
|
+
/**
|
|
3523
|
+
* 设备信息(手机名称+型号)
|
|
3524
|
+
*/
|
|
3525
|
+
device: string;
|
|
3526
|
+
/**
|
|
3527
|
+
* 系统版本(手机系统版本)
|
|
3528
|
+
*/
|
|
3529
|
+
os: string;
|
|
3530
|
+
/**
|
|
3531
|
+
* 浏览器名称, 没有用 -1 表示
|
|
3532
|
+
*/
|
|
3533
|
+
browserName?: string;
|
|
3534
|
+
/**
|
|
3535
|
+
* 浏览器版本, 没有用 -1 表示
|
|
3536
|
+
*/
|
|
3537
|
+
browserVersion?: string;
|
|
3538
|
+
/**
|
|
3539
|
+
* 发送数据的时间
|
|
3540
|
+
*/
|
|
3541
|
+
receiveTime?: number;
|
|
3542
|
+
}
|
|
3543
|
+
/**
|
|
3544
|
+
* http3 北极星上报 R2 数据
|
|
3545
|
+
*/
|
|
3546
|
+
interface IR2Info {
|
|
3547
|
+
/**
|
|
3548
|
+
* 用户加入房间的时间
|
|
3549
|
+
*/
|
|
3550
|
+
joinTime: number;
|
|
3551
|
+
/**
|
|
3552
|
+
* 客户端 发布/取消发布 订阅/取消订阅 资源的时间
|
|
3553
|
+
*/
|
|
3554
|
+
sendTime: number;
|
|
3555
|
+
/**
|
|
3556
|
+
* 发布类型 subscribe : 订阅 publish : 发布
|
|
3557
|
+
*/
|
|
3558
|
+
rtcActionType: string;
|
|
3559
|
+
/**
|
|
3560
|
+
* 发布状态 begin : 开始 tend : 结束
|
|
3561
|
+
*/
|
|
3562
|
+
rtcActionStatus: string;
|
|
3563
|
+
trackId: string[];
|
|
3564
|
+
/**
|
|
3565
|
+
* 发送数据的时间
|
|
3566
|
+
*/
|
|
3567
|
+
receiveTime?: number;
|
|
3568
|
+
}
|
|
3569
|
+
/**
|
|
3570
|
+
* http3 北极星上报 R3 数据
|
|
3571
|
+
*/
|
|
3572
|
+
interface IR3R4Info {
|
|
3573
|
+
info: IR3R4CommonInfo;
|
|
3574
|
+
}
|
|
3575
|
+
interface IR3R4CommonInfo {
|
|
3576
|
+
/**
|
|
3577
|
+
* 用户加入房间的时间
|
|
3578
|
+
*/
|
|
3579
|
+
joinTime?: number;
|
|
3580
|
+
/**
|
|
3581
|
+
* 用户发布数据流的时间(毫秒),暂时由客户端生成,后期如果有问题服务端做兜底处理
|
|
3582
|
+
*/
|
|
3583
|
+
receiveTime?: number;
|
|
3584
|
+
/**
|
|
3585
|
+
* 总码率
|
|
3586
|
+
*/
|
|
3587
|
+
totalBitRate?: number;
|
|
3588
|
+
/**
|
|
3589
|
+
* APP CPU占用率
|
|
3590
|
+
*/
|
|
3591
|
+
appCPUUsage?: number;
|
|
3592
|
+
/**
|
|
3593
|
+
* 系统 CPU占用率
|
|
3594
|
+
*/
|
|
3595
|
+
systemCPUUsage?: number;
|
|
3596
|
+
/**
|
|
3597
|
+
* 系统CPU频率 (安卓8.0以上)
|
|
3598
|
+
*/
|
|
3599
|
+
systemCPUFrequency?: number;
|
|
3600
|
+
/**
|
|
3601
|
+
* 实时网络状态(2g、3g、4g、wifi)
|
|
3602
|
+
*/
|
|
3603
|
+
networkStatus?: string;
|
|
3604
|
+
/**
|
|
3605
|
+
* Goog rtt 网络延迟
|
|
3606
|
+
*/
|
|
3607
|
+
googleRTTNetwork?: number;
|
|
3608
|
+
/**
|
|
3609
|
+
* ip地址
|
|
3610
|
+
*/
|
|
3611
|
+
ipAddress?: string;
|
|
3612
|
+
/**
|
|
3613
|
+
* 可接收带宽(单位: bit)
|
|
3614
|
+
*/
|
|
3615
|
+
useReceiveBroadBand?: string;
|
|
3616
|
+
/**
|
|
3617
|
+
* 可用发送带宽(单位: bit)
|
|
3618
|
+
*/
|
|
3619
|
+
useSendBroadBand?: string;
|
|
3620
|
+
/**
|
|
3621
|
+
* 丢包数
|
|
3622
|
+
*/
|
|
3623
|
+
packetLossCount?: string;
|
|
3624
|
+
streams?: IR3R4StreamInfo[];
|
|
3625
|
+
}
|
|
3626
|
+
/**
|
|
3627
|
+
* http3 北极星上报 R3、R4 streamInfo 数据
|
|
3628
|
+
*/
|
|
3629
|
+
interface IR3R4StreamInfo {
|
|
3630
|
+
trackId: string;
|
|
3631
|
+
/**
|
|
3632
|
+
* 编解码名称
|
|
3633
|
+
*/
|
|
3634
|
+
codeName?: string;
|
|
3635
|
+
/**
|
|
3636
|
+
* 音频播放音量
|
|
3637
|
+
*/
|
|
3638
|
+
volume?: string;
|
|
3639
|
+
/**
|
|
3640
|
+
* 音频采样率
|
|
3641
|
+
*/
|
|
3642
|
+
samplingRate: number;
|
|
3643
|
+
/**
|
|
3644
|
+
* 下行码率
|
|
3645
|
+
*/
|
|
3646
|
+
bitRate?: number;
|
|
3647
|
+
packetLossRate?: number;
|
|
3648
|
+
/**
|
|
3649
|
+
* 视频接收帧率(单位:fps)
|
|
3650
|
+
*/
|
|
3651
|
+
frameRate?: number;
|
|
3652
|
+
/**
|
|
3653
|
+
* 视频分辨率(格式:640*480)
|
|
3654
|
+
*/
|
|
3655
|
+
resolution?: string;
|
|
3656
|
+
/**
|
|
3657
|
+
* 接收卡顿(间隔时间, 单位: ms)
|
|
3658
|
+
*/
|
|
3659
|
+
blockTime?: number;
|
|
3660
|
+
/**
|
|
3661
|
+
* jitter数据抖动
|
|
3662
|
+
*/
|
|
3663
|
+
jitterData?: number;
|
|
3664
|
+
/**
|
|
3665
|
+
* nack数量
|
|
3666
|
+
*/
|
|
3667
|
+
nAckCount?: string;
|
|
3668
|
+
/**
|
|
3669
|
+
* PLI请求数
|
|
3670
|
+
*/
|
|
3671
|
+
pliCount?: string;
|
|
3672
|
+
/**
|
|
3673
|
+
* googRtt往返时长
|
|
3674
|
+
*/
|
|
3675
|
+
googleRTTTotalTime?: number;
|
|
3676
|
+
/**
|
|
3677
|
+
* 第一个关键帧是否正常收到
|
|
3678
|
+
*/
|
|
3679
|
+
isReceiveFirstFrameRate?: number;
|
|
3680
|
+
/**
|
|
3681
|
+
* 编码方式
|
|
3682
|
+
*/
|
|
3683
|
+
codeType?: string;
|
|
3684
|
+
/**
|
|
3685
|
+
* 当前流的状态是否可用
|
|
3686
|
+
*/
|
|
3687
|
+
isEnabled?: number;
|
|
3688
|
+
}
|
|
3689
|
+
/**
|
|
3690
|
+
* http3 北极星上报总数据
|
|
3691
|
+
*/
|
|
3692
|
+
interface IRCRTCReportData extends IRCRTCReportBaseData {
|
|
3693
|
+
r1Info?: IR1Info;
|
|
3694
|
+
r2Info?: IR2Info;
|
|
3695
|
+
r3Info?: IR3R4Info;
|
|
3696
|
+
r4Info?: IR3R4Info;
|
|
3697
|
+
}
|
|
3241
3698
|
interface IRCRTCReportListener {
|
|
3242
3699
|
/**
|
|
3243
3700
|
* RTCPeerConnection 的详细状态数据
|
|
@@ -3341,6 +3798,11 @@ interface IRoomEventListener extends IRCRTCTrackEventListener {
|
|
|
3341
3798
|
* @param failedList 订阅失败的列表
|
|
3342
3799
|
*/
|
|
3343
3800
|
onTaskCompleted?(code: RCRTCCode, subscribe: ISubscribeAttr[], unsubscribe: ISubscribeAttr[], failedList: ISubscribeAttr[]): void;
|
|
3801
|
+
/**
|
|
3802
|
+
* 当房间内资源(音频视频)异常时给出处理
|
|
3803
|
+
*
|
|
3804
|
+
*/
|
|
3805
|
+
onTrackTrouble?(tracks: RCLocalTrack[]): void;
|
|
3344
3806
|
}
|
|
3345
3807
|
/**
|
|
3346
3808
|
* RTCClient 初始化配置
|
|
@@ -3357,16 +3819,16 @@ interface IRCRTCInitOptions {
|
|
|
3357
3819
|
/**
|
|
3358
3820
|
* 输出日志等级,生产环境默认使用 WARN,开发环境默认为 DEBUG
|
|
3359
3821
|
* @description
|
|
3360
|
-
* *
|
|
3361
|
-
* *
|
|
3822
|
+
* * 4 - DEBUG
|
|
3823
|
+
* * 3 - INFO
|
|
3362
3824
|
* * 2 - WARN
|
|
3363
|
-
* *
|
|
3825
|
+
* * 1 - ERROR
|
|
3364
3826
|
*/
|
|
3365
|
-
logLevel?:
|
|
3827
|
+
logLevel?: EnableLogL;
|
|
3366
3828
|
/**
|
|
3367
3829
|
* 修改默认的 log 输出函数
|
|
3368
3830
|
*/
|
|
3369
|
-
logStdout?: (logLevel:
|
|
3831
|
+
logStdout?: (logLevel: EnableLogL, content: string) => void;
|
|
3370
3832
|
/**
|
|
3371
3833
|
* 与 MediaServer 的 http 请求超时时间,单位为毫秒,默认值为 `5000`,有效值 `5000-30000`。
|
|
3372
3834
|
* 优先级:用户配置 > 导航配置 > 默认时间。
|
|
@@ -3547,6 +4009,79 @@ interface IChrmKVPullData {
|
|
|
3547
4009
|
isFullUpdate?: boolean;
|
|
3548
4010
|
syncTime?: number;
|
|
3549
4011
|
}
|
|
4012
|
+
/**
|
|
4013
|
+
* 通知拉取到的房间数据
|
|
4014
|
+
*/
|
|
4015
|
+
interface IPullRTCRoomStatus {
|
|
4016
|
+
/**
|
|
4017
|
+
* 是否是全量数据
|
|
4018
|
+
*/
|
|
4019
|
+
bFullStatus: boolean;
|
|
4020
|
+
/**
|
|
4021
|
+
* 当前房间的最大版本号
|
|
4022
|
+
*/
|
|
4023
|
+
version: number;
|
|
4024
|
+
/**
|
|
4025
|
+
* 如果是全量数据,usersData 不为空,给的是房间全部的人以及发布的资源
|
|
4026
|
+
*/
|
|
4027
|
+
usersData: IPullRTCRoomUsersData[];
|
|
4028
|
+
/**
|
|
4029
|
+
* 房间增量数据
|
|
4030
|
+
*/
|
|
4031
|
+
roomStatus: IRoomStatus[];
|
|
4032
|
+
}
|
|
4033
|
+
/**
|
|
4034
|
+
* 通知拉取到的房间增量数据
|
|
4035
|
+
*/
|
|
4036
|
+
interface IRoomStatus {
|
|
4037
|
+
/**
|
|
4038
|
+
* 用户 id
|
|
4039
|
+
*/
|
|
4040
|
+
userId: string;
|
|
4041
|
+
/**
|
|
4042
|
+
* 本次变更的动作类型
|
|
4043
|
+
*/
|
|
4044
|
+
event: PullRoomStatusEvent;
|
|
4045
|
+
/**
|
|
4046
|
+
* 本次变更的版本号
|
|
4047
|
+
*/
|
|
4048
|
+
time: number;
|
|
4049
|
+
/**
|
|
4050
|
+
* 用户变更的资源,event 为人员加入或资源变动时有值
|
|
4051
|
+
* key 包含 uris、cdn_uris、mcu_uris
|
|
4052
|
+
* value 为字符串数组
|
|
4053
|
+
*/
|
|
4054
|
+
userData: {
|
|
4055
|
+
key: string;
|
|
4056
|
+
value: string;
|
|
4057
|
+
}[];
|
|
4058
|
+
/**
|
|
4059
|
+
* 切换角色,0 代表非切换身份发生的加入、退出房间行为
|
|
4060
|
+
*/
|
|
4061
|
+
switchRoleType: RCRTCLiveRole | 0;
|
|
4062
|
+
/**
|
|
4063
|
+
* 额外的信息
|
|
4064
|
+
*/
|
|
4065
|
+
extra: string;
|
|
4066
|
+
}
|
|
4067
|
+
/**
|
|
4068
|
+
* 通知拉取到的房间全量数据
|
|
4069
|
+
*/
|
|
4070
|
+
interface IPullRTCRoomUsersData {
|
|
4071
|
+
/**
|
|
4072
|
+
* 用户 id
|
|
4073
|
+
*/
|
|
4074
|
+
userId: string;
|
|
4075
|
+
/**
|
|
4076
|
+
* 房间内所有资源数据
|
|
4077
|
+
* key 包含 uris、cdn_uris、mcu_uris
|
|
4078
|
+
* value 为字符串数组
|
|
4079
|
+
*/
|
|
4080
|
+
userData: {
|
|
4081
|
+
key: string;
|
|
4082
|
+
value: string;
|
|
4083
|
+
}[];
|
|
4084
|
+
}
|
|
3550
4085
|
|
|
3551
4086
|
/**
|
|
3552
4087
|
* 自定义合流布局时,背景图片填充方式
|
|
@@ -3775,6 +4310,19 @@ declare class RCLivingRoom extends RCAbstractRoom {
|
|
|
3775
4310
|
* 跨房间连麦管理器
|
|
3776
4311
|
*/
|
|
3777
4312
|
private _roomPKHandler;
|
|
4313
|
+
/**
|
|
4314
|
+
* 一个构造函数。
|
|
4315
|
+
* @param {RTCContext} context - RTC上下文,
|
|
4316
|
+
* @param {IRuntime} runtime - 运行时
|
|
4317
|
+
* @param {string} roomId - 房间号
|
|
4318
|
+
* @param {RCMediaService} service - RCMediaService
|
|
4319
|
+
* @param {IRCRTCInitOptions} initOptions - IRCRTCInitOptions
|
|
4320
|
+
* @param {RCLivingType} _livingType - RCLivingType.LIVE_ROOM,
|
|
4321
|
+
* @param {boolean} [isUpgrade] - 是否升级房间,如果为真,则表示房间从会议室升级到直播间,会议室关闭。
|
|
4322
|
+
* @param {boolean} [isMainRoom] - 无论是主房间,主房间都是发起呼叫的房间,子房间是接收呼叫的房间。
|
|
4323
|
+
* @param {boolean} [useMutilPeerC] - 是否使用多个 peerConnections
|
|
4324
|
+
* @param {string} [_clientSessionId] - 当前用户的会话 ID。
|
|
4325
|
+
*/
|
|
3778
4326
|
constructor(context: RTCContext, runtime: IRuntime, roomId: string, service: RCMediaService, initOptions: IRCRTCInitOptions, _livingType: RCLivingType, isUpgrade?: boolean, isMainRoom?: boolean,
|
|
3779
4327
|
/**
|
|
3780
4328
|
* 是否使用多 peerConnection
|
|
@@ -3784,11 +4332,11 @@ declare class RCLivingRoom extends RCAbstractRoom {
|
|
|
3784
4332
|
/**
|
|
3785
4333
|
* @override
|
|
3786
4334
|
*/
|
|
3787
|
-
__innerInit(mode: RTCMode, joinType?: RTCJoinType, livingType?: RCLivingType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): Promise<{
|
|
4335
|
+
__innerInit(mode: RTCMode, joinType?: RTCJoinType, livingType?: RCLivingType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData, traceId?: string): Promise<{
|
|
3788
4336
|
code: RCRTCCode | ErrorCode;
|
|
3789
4337
|
data?: IJoinRTCRoomData;
|
|
3790
4338
|
}>;
|
|
3791
|
-
__innerInitByIdentityChange(): Promise<ErrorCode>;
|
|
4339
|
+
__innerInitByIdentityChange(traceId: string): Promise<ErrorCode>;
|
|
3792
4340
|
/**
|
|
3793
4341
|
* 增量发布资源,若发布的资源 tag 及媒体类型重复,后者将覆盖前者进行发布。
|
|
3794
4342
|
* @param tracks 待发布的 RCLocalTrack 实例
|
|
@@ -3820,11 +4368,11 @@ declare class RCLivingRoom extends RCAbstractRoom {
|
|
|
3820
4368
|
*/
|
|
3821
4369
|
protected _resourceHandle(content: ResourceMsgContent & {
|
|
3822
4370
|
cdn_uris?: ICDNUris[];
|
|
3823
|
-
}, messageType: RCRTCMessageType.PUBLISH | RCRTCMessageType.UNPUBLISH | RCRTCMessageType.MODIFY | RCRTCMessageType.TOTAL_CONTENT_RESOURCE, userId: string): Promise<void>;
|
|
4371
|
+
}, messageType: RCRTCMessageType.PUBLISH | RCRTCMessageType.UNPUBLISH | RCRTCMessageType.MODIFY | RCRTCMessageType.TOTAL_CONTENT_RESOURCE, userId: string, traceId: string): Promise<void>;
|
|
3824
4372
|
/**
|
|
3825
4373
|
* 观众切换为主播后直接处理人员变更及资源变更
|
|
3826
4374
|
*/
|
|
3827
|
-
protected _afterChangedRole(data: IJoinRTCRoomData): void;
|
|
4375
|
+
protected _afterChangedRole(data: IJoinRTCRoomData, traceId: string): void;
|
|
3828
4376
|
/**
|
|
3829
4377
|
* 返回 CDN 是否可用
|
|
3830
4378
|
* @returns boolean
|
|
@@ -3865,11 +4413,25 @@ declare class RCLivingRoom extends RCAbstractRoom {
|
|
|
3865
4413
|
* 普通音视频房间
|
|
3866
4414
|
*/
|
|
3867
4415
|
declare class RCRTCRoom extends RCAbstractRoom {
|
|
4416
|
+
/**
|
|
4417
|
+
* 类的构造函数。
|
|
4418
|
+
* @param {RTCContext} context - RTC上下文
|
|
4419
|
+
* @param {IRuntime} runtime - 运行时
|
|
4420
|
+
* @param {string} roomId - 房间号
|
|
4421
|
+
* @param {RCMediaService} service - RCMediaService
|
|
4422
|
+
* @param {IRCRTCInitOptions} initOptions - IRCRTCInitOptions
|
|
4423
|
+
* @param {boolean} [isUpgrade] - 是否升级房间,默认为false
|
|
4424
|
+
* @param {boolean} [isMainRoom] - 无论是主房间,主房间是用户进入的房间,子房间是用户进入主房间后进入的房间。
|
|
4425
|
+
* @param {boolean} [useMutilPeerC] - 是否使用多个 peerConnections
|
|
4426
|
+
* @param {string} [_clientSessionId] - 当前房间的clientSessionId,用于区分当前房间和其他房间。
|
|
4427
|
+
* @param {RTCMode} roomType - RTCMode = RTCMode.RTC,
|
|
4428
|
+
* @param {number} signalRetryTime - 重新连接信令服务器的时间间隔。
|
|
4429
|
+
*/
|
|
3868
4430
|
constructor(context: RTCContext, runtime: IRuntime, roomId: string, service: RCMediaService, initOptions: IRCRTCInitOptions, isUpgrade?: boolean, isMainRoom?: boolean,
|
|
3869
4431
|
/**
|
|
3870
4432
|
* 是否使用多 peerConnection
|
|
3871
4433
|
*/
|
|
3872
|
-
useMutilPeerC?: boolean, _clientSessionId?: string, roomType?: RTCMode);
|
|
4434
|
+
useMutilPeerC?: boolean, _clientSessionId?: string, roomType?: RTCMode, signalRetryTime?: number);
|
|
3873
4435
|
}
|
|
3874
4436
|
|
|
3875
4437
|
/**
|
|
@@ -3960,6 +4522,7 @@ declare class RCMediaStreamCapture {
|
|
|
3960
4522
|
constructor(_context: RTCContext);
|
|
3961
4523
|
private _isElectron;
|
|
3962
4524
|
private _getMediaStream;
|
|
4525
|
+
private _getMediaStreamErrorReason;
|
|
3963
4526
|
/**
|
|
3964
4527
|
* 如果用户设置了音频约束为true,那么我们将音频约束设置为一个空对象,
|
|
3965
4528
|
* 然后我们将检查浏览器是否支持noiseSuppression、autoGainControl和echoCancellation约束,
|
|
@@ -4082,7 +4645,7 @@ declare class RCMediaStreamCapture {
|
|
|
4082
4645
|
declare class RCRTCClient extends RCMediaStreamCapture {
|
|
4083
4646
|
protected readonly _context: RTCContext;
|
|
4084
4647
|
private readonly _runtime;
|
|
4085
|
-
private
|
|
4648
|
+
private _options;
|
|
4086
4649
|
private readonly _service;
|
|
4087
4650
|
constructor(_context: RTCContext, _runtime: IRuntime, _options: IRCRTCInitOptions);
|
|
4088
4651
|
private _handleMessage;
|
|
@@ -4101,14 +4664,15 @@ declare class RCRTCClient extends RCMediaStreamCapture {
|
|
|
4101
4664
|
getCurrentId(): string;
|
|
4102
4665
|
private _crtRoom;
|
|
4103
4666
|
/**
|
|
4104
|
-
*
|
|
4105
|
-
* @param roomId
|
|
4106
|
-
* @param joinType
|
|
4107
|
-
* @param outerUserDatas
|
|
4108
|
-
* @param useMutilPeerC
|
|
4109
|
-
* @param roomType
|
|
4667
|
+
* > 加入普通音视频房间,返回房间对象、code、userIds、tracks
|
|
4668
|
+
* @param {string} roomId - 房间号
|
|
4669
|
+
* @param {RTCJoinType} [joinType] - 要加入的房间类型。
|
|
4670
|
+
* @param {IRTCUserData} [outerUserDatas] - 加入房间的用户的用户数据。
|
|
4671
|
+
* @param {boolean} [useMutilPeerC] - 是否使用多点连接,默认为false,即使用单点连接。
|
|
4672
|
+
* @param {RTCMode} roomType - RTCMode = RTCMode.RTC,
|
|
4673
|
+
* @param {number} signalRetryTime - 重新连接信令服务器的时间间隔。
|
|
4110
4674
|
*/
|
|
4111
|
-
joinRTCRoom(roomId: string, joinType?: RTCJoinType, outerUserDatas?: IRTCUserData, useMutilPeerC?: boolean, roomType?: RTCMode): Promise<{
|
|
4675
|
+
joinRTCRoom(roomId: string, joinType?: RTCJoinType, outerUserDatas?: IRTCUserData, useMutilPeerC?: boolean, roomType?: RTCMode, signalRetryTime?: number): Promise<{
|
|
4112
4676
|
room?: RCRTCRoom;
|
|
4113
4677
|
code: RCRTCCode;
|
|
4114
4678
|
userIds?: string[];
|
|
@@ -4148,7 +4712,13 @@ declare class RCRTCClient extends RCMediaStreamCapture {
|
|
|
4148
4712
|
*/
|
|
4149
4713
|
getAudienceClient(useMutilPeerC?: boolean): RCAudienceClient;
|
|
4150
4714
|
private _onIMStatusChange;
|
|
4715
|
+
/**
|
|
4716
|
+
* 用户主动断开 IM 连接
|
|
4717
|
+
*/
|
|
4151
4718
|
private _onIMDisconnect;
|
|
4719
|
+
/**
|
|
4720
|
+
* 用户销毁 IM 客户端,IM 客户端需重新初始化
|
|
4721
|
+
*/
|
|
4152
4722
|
private _onIMUninit;
|
|
4153
4723
|
/**
|
|
4154
4724
|
* 退出并销毁当前房间实例,退出后该房间的所有方法将不可用
|
|
@@ -4206,6 +4776,7 @@ declare class RCRTCClient extends RCMediaStreamCapture {
|
|
|
4206
4776
|
code: RCRTCCode | ErrorCode;
|
|
4207
4777
|
data?: IRTCJoinedInfo[];
|
|
4208
4778
|
}>;
|
|
4779
|
+
reportSDKInfo(): void;
|
|
4209
4780
|
}
|
|
4210
4781
|
|
|
4211
4782
|
/**
|