@rongcloud/plugin-rtc 5.5.5-beem → 5.5.5
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/async-task-queue.d.ts +9 -0
- package/dist/core/Invoker.d.ts +55 -0
- package/dist/core/PolarisReporter.d.ts +36 -0
- package/dist/core/RCAudienceClient.d.ts +90 -0
- package/dist/core/RCMediaStreamCapture.d.ts +124 -0
- package/dist/core/RCRTCClient.d.ts +148 -0
- package/dist/core/Store.d.ts +86 -0
- package/dist/core/codec/RTCContext.d.ts +76 -0
- package/dist/core/codec/interface.d.ts +168 -0
- package/dist/core/codec/proto.d.ts +94 -0
- package/dist/core/codec/rtc-helper.d.ts +17 -0
- package/dist/core/command/AsyncCommand.d.ts +55 -0
- package/dist/core/command/AsyncSubscribeCommand.d.ts +28 -0
- package/dist/core/command/AsyncUnsubscribeCommand.d.ts +28 -0
- package/dist/core/command/AsyncUpdateSubscribeListCommand.d.ts +25 -0
- package/dist/core/command/BaseCommand.d.ts +31 -0
- package/dist/core/command/EnabelInnerCDNCommand.d.ts +16 -0
- package/dist/core/command/ExchangeCommand.d.ts +18 -0
- package/dist/core/command/ExchangeWithPushOtherRoomCommand.d.ts +22 -0
- package/dist/core/command/JoinRoomCommand.d.ts +31 -0
- package/dist/core/command/LeaveOtherRoomCommand.d.ts +32 -0
- package/dist/core/command/LocalTrackMuteCommand.d.ts +18 -0
- package/dist/core/command/MCUConfigFlushCommand.d.ts +18 -0
- package/dist/core/command/OnRemoteUserUnpubCommand.d.ts +13 -0
- package/dist/core/command/OnSignalReconnectedCommand.d.ts +38 -0
- package/dist/core/command/ParseRemoteResCommand.d.ts +38 -0
- package/dist/core/command/ParseUserStateCommand.d.ts +57 -0
- package/dist/core/command/PubCommand.d.ts +34 -0
- package/dist/core/command/PublishCommand.d.ts +36 -0
- package/dist/core/command/RTCIdentityChangeCommand.d.ts +18 -0
- package/dist/core/command/RetryExchangeCommand.d.ts +18 -0
- package/dist/core/command/SubscribeCommand.d.ts +21 -0
- package/dist/core/command/UnpublishCommand.d.ts +22 -0
- package/dist/core/command/UnpublishPrevCommand.d.ts +11 -0
- package/dist/core/command/UnsubscribeCommand.d.ts +20 -0
- package/dist/core/command/UpdateSubscribeListCommand.d.ts +28 -0
- package/dist/core/command/helper.d.ts +20 -0
- package/dist/core/constants.d.ts +4 -0
- package/dist/core/enums/BackgroundPictureFillMode.d.ts +14 -0
- package/dist/core/enums/MixLayoutMode.d.ts +18 -0
- package/dist/core/enums/MixVideoRenderMode.d.ts +14 -0
- package/dist/core/enums/RCBitrate.d.ts +48 -0
- package/dist/core/enums/RCCommandKind.d.ts +12 -0
- package/dist/core/enums/RCFrameRate.d.ts +7 -0
- package/dist/core/enums/RCInnerCDNBroadcast.d.ts +5 -0
- package/dist/core/enums/RCInnerCDNModel.d.ts +5 -0
- package/dist/core/enums/RCInnerCDNPullIsHttps.d.ts +5 -0
- package/dist/core/enums/RCInnerCDNPullKind.d.ts +6 -0
- package/dist/core/enums/RCInnerCDNPushMode.d.ts +5 -0
- package/dist/core/enums/RCKickType.d.ts +11 -0
- package/dist/core/enums/RCLinkedListPoint.d.ts +6 -0
- package/dist/core/enums/RCLivingType.d.ts +14 -0
- package/dist/core/enums/RCLoggerTag.d.ts +649 -0
- package/dist/core/enums/RCMediaType.d.ts +18 -0
- package/dist/core/enums/RCMixInputFilterMode.d.ts +35 -0
- package/dist/core/enums/RCRTCCode.d.ts +93 -0
- package/dist/core/enums/RCRTCLiveRole.d.ts +14 -0
- package/dist/core/enums/RCRTCPingResult.d.ts +5 -0
- package/dist/core/enums/RCRTCResolution.d.ts +132 -0
- package/dist/core/enums/RCResolution.d.ts +21 -0
- package/dist/core/enums/RTCJoinType.d.ts +18 -0
- package/dist/core/enums/RTCMode.d.ts +22 -0
- package/dist/core/enums/inner/LiveRole.d.ts +11 -0
- package/dist/core/enums/inner/LiveType.d.ts +14 -0
- package/dist/core/enums/inner/PolarisRole.d.ts +14 -0
- package/dist/core/enums/inner/R2Action.d.ts +14 -0
- package/dist/core/enums/inner/R2Status.d.ts +11 -0
- package/dist/core/enums/inner/RCRTCMessageType.d.ts +70 -0
- package/dist/core/enums/inner/RCStreamType.d.ts +14 -0
- package/dist/core/enums/inner/RTCApiType.d.ts +5 -0
- package/dist/core/enums/inner/RTCIdentityChangeType.d.ts +5 -0
- package/dist/core/enums/inner/TrackState.d.ts +14 -0
- package/dist/core/interfaces.d.ts +942 -0
- package/dist/core/room/Pinger.d.ts +36 -0
- package/dist/core/room/RCAbstractRoom.d.ts +354 -0
- package/dist/core/room/RCAudienceLivingRoom.d.ts +334 -0
- package/dist/core/room/RCAudioLevelReport.d.ts +16 -0
- package/dist/core/room/RCLivingPKHandler.d.ts +165 -0
- package/dist/core/room/RCLivingRoom.d.ts +112 -0
- package/dist/core/room/RCLocalMediaStream.d.ts +8 -0
- package/dist/core/room/RCMCUConfigBuilder.d.ts +211 -0
- package/dist/core/room/RCRTCRoom.d.ts +17 -0
- package/dist/core/service/RCMediaService.d.ts +121 -0
- package/dist/core/service/helper.d.ts +18 -0
- package/dist/core/service/index.d.ts +6 -0
- package/dist/core/service/interface.d.ts +328 -0
- package/dist/core/service/mcu-interface.d.ts +293 -0
- package/dist/core/tracks/RC3AnoiseTrack.d.ts +27 -0
- package/dist/core/tracks/RCLocalTrack.d.ts +143 -0
- package/dist/core/tracks/RCRemoteTrack.d.ts +29 -0
- package/dist/core/tracks/RCTrack.d.ts +95 -0
- package/dist/core/webrtc/RCRTCPeerCManager.d.ts +161 -0
- package/dist/core/webrtc/RCRTCPeerConnection.d.ts +112 -0
- package/dist/core/webrtc/helper.d.ts +26 -0
- package/dist/core/webrtc/sdp/ASdpBuilder.d.ts +120 -0
- package/dist/core/webrtc/sdp/ASdpStrategy.d.ts +53 -0
- package/dist/core/webrtc/sdp/PlanBSdpBuilder.d.ts +20 -0
- package/dist/core/webrtc/sdp/PlanBStrategy.d.ts +26 -0
- package/dist/core/webrtc/sdp/SDPUtils.d.ts +60 -0
- package/dist/core/webrtc/sdp/UnifiedPlanSdpBuilder.d.ts +11 -0
- package/dist/core/webrtc/sdp/UnifiedPlanStrategy.d.ts +25 -0
- package/dist/core/webrtc/stat-parser/AbstractStatParser.d.ts +117 -0
- package/dist/core/webrtc/stat-parser/ChromeStatParser.d.ts +14 -0
- package/dist/core/webrtc/stat-parser/FirefoxStatParser.d.ts +14 -0
- package/dist/core/webrtc/stat-parser/IStatParser.d.ts +24 -0
- package/dist/core/webrtc/stat-parser/SafariStatParser.d.ts +14 -0
- package/dist/device.d.ts +6 -0
- package/dist/helper.d.ts +195 -0
- package/dist/index.d.ts +39 -524
- package/dist/index.esm.js +15 -28854
- package/dist/index.js +15 -28883
- package/dist/index.umd.js +15 -28887
- package/dist/logger.d.ts +4 -0
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.5.5
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.5.5
|
|
3
|
+
* CommitId - 30c864afb13d4825887598776eea3d4b2521e304
|
|
4
|
+
* Mon Oct 17 2022 16:03:04 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import * as _rongcloud_engine from '@rongcloud/engine';
|
|
8
|
+
import { EventEmitter, RTCPluginContext, AbsCodec, IPromiseResult, ErrorCode, KVString, IAsyncRes, ConnectionStatus, ConversationType, ISendMsgOptions, IReceivedMessage, IRuntime, LogLevel, IPluginGenerator } from '@rongcloud/engine';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* 错误码,与移动端对齐
|
|
@@ -19,8 +20,6 @@ import { EventEmitter, BasicLogger, INaviInfo, RTCPluginContext, AbsCodec, IProm
|
|
|
19
20
|
declare enum RCRTCCode {
|
|
20
21
|
/** 成功 */
|
|
21
22
|
SUCCESS = 10000,
|
|
22
|
-
/** PB 错误 */
|
|
23
|
-
PB_ERROR = 40001,
|
|
24
23
|
/** IM 服务未连接 */
|
|
25
24
|
SIGNAL_DISCONNECTED = 50000,
|
|
26
25
|
/** 参数错误 */
|
|
@@ -173,7 +172,6 @@ declare abstract class RCTrack extends EventEmitter {
|
|
|
173
172
|
protected readonly _streamId: string;
|
|
174
173
|
protected _msTrack?: MediaStreamTrack;
|
|
175
174
|
private _msStream;
|
|
176
|
-
protected _logger: BasicLogger | null;
|
|
177
175
|
constructor(_tag: string, _userId: string, _kind: 'audio' | 'video', _isLocalTrack: boolean, _roomId?: string | undefined);
|
|
178
176
|
/**
|
|
179
177
|
* 获取音视轨所属的 streamId,streamId 相同的音轨和视轨可认为属于统一道流
|
|
@@ -540,11 +538,11 @@ declare enum RCRTCPingResult {
|
|
|
540
538
|
*/
|
|
541
539
|
declare enum RCRTCLiveRole {
|
|
542
540
|
/**
|
|
543
|
-
*
|
|
541
|
+
* 主播
|
|
544
542
|
*/
|
|
545
543
|
ANCHOR = 1,
|
|
546
544
|
/**
|
|
547
|
-
*
|
|
545
|
+
* 观众
|
|
548
546
|
*/
|
|
549
547
|
AUDIENCE = 2
|
|
550
548
|
}
|
|
@@ -648,19 +646,7 @@ declare enum RTCMode {
|
|
|
648
646
|
/**
|
|
649
647
|
* 跨应用直播
|
|
650
648
|
*/
|
|
651
|
-
CROSS_LIVE = 8
|
|
652
|
-
/**
|
|
653
|
-
* sip呼叫
|
|
654
|
-
*/
|
|
655
|
-
SIP = 4,
|
|
656
|
-
/**
|
|
657
|
-
* 呼叫模式.包括单呼和群呼
|
|
658
|
-
*/
|
|
659
|
-
CALL = 5,
|
|
660
|
-
/**
|
|
661
|
-
* 会议
|
|
662
|
-
*/
|
|
663
|
-
MEETING = 6
|
|
649
|
+
CROSS_LIVE = 8
|
|
664
650
|
}
|
|
665
651
|
|
|
666
652
|
/**
|
|
@@ -1255,9 +1241,8 @@ declare enum RTCIdentityChangeType {
|
|
|
1255
1241
|
}
|
|
1256
1242
|
|
|
1257
1243
|
declare const keymaps: {
|
|
1258
|
-
readonly RtcInput: readonly ["roomType", "broadcastType", "extraInnerData", "needSysChatroom", "identityChangeType", "joinType", "innerDatas", "outerDatas"
|
|
1259
|
-
readonly
|
|
1260
|
-
readonly RtcUserListOutput: readonly ["users", "token", "sessionId", "roomInfo", "version"];
|
|
1244
|
+
readonly RtcInput: readonly ["roomType", "broadcastType", "extraInnerData", "needSysChatroom", "identityChangeType", "joinType", "innerDatas", "outerDatas"];
|
|
1245
|
+
readonly RtcUserListOutput: readonly ["users", "token", "sessionId", "roomInfo"];
|
|
1261
1246
|
readonly SetUserStatusInput: readonly ["status"];
|
|
1262
1247
|
readonly RtcSetDataInput: readonly ["interior", "target", "key", "value", "objectName", "content"];
|
|
1263
1248
|
readonly RtcUserSetDataInput: readonly ["valueInfo", "objectName", "content"];
|
|
@@ -1281,16 +1266,6 @@ declare const keymaps: {
|
|
|
1281
1266
|
readonly RtcCancelInviteInput: readonly ["invitedUserId", "invitedRoomId", "inviteInfo", "inviteSessionId"];
|
|
1282
1267
|
readonly RtcInviteAnswerInput: readonly ["inviteUserId", "answerCode", "inviteRoomId", "inviteSessionId", "content", "key", "value"];
|
|
1283
1268
|
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"];
|
|
1294
1269
|
};
|
|
1295
1270
|
declare type RTCKeyMaps = typeof keymaps;
|
|
1296
1271
|
|
|
@@ -1356,10 +1331,6 @@ interface IJoinRTCRoomData extends IRTCUsers {
|
|
|
1356
1331
|
}[];
|
|
1357
1332
|
kvEntries: IServerRTCRoomEntry[];
|
|
1358
1333
|
offlineKickTime: number;
|
|
1359
|
-
codeFormat?: string;
|
|
1360
|
-
roomCreateTime?: number;
|
|
1361
|
-
userJoinTime?: number;
|
|
1362
|
-
version: number;
|
|
1363
1334
|
}
|
|
1364
1335
|
interface IReqRoomPKOptions {
|
|
1365
1336
|
/**
|
|
@@ -1465,42 +1436,11 @@ interface IEndRoomPKOptions {
|
|
|
1465
1436
|
*/
|
|
1466
1437
|
keys: string[];
|
|
1467
1438
|
}
|
|
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
|
-
}
|
|
1496
1439
|
|
|
1497
1440
|
declare class RTCContext {
|
|
1498
1441
|
private context;
|
|
1499
1442
|
private codec;
|
|
1500
|
-
roomCreateTime: number | undefined;
|
|
1501
|
-
userJoinTime: number | undefined;
|
|
1502
1443
|
constructor(context: RTCPluginContext, codec: AbsCodec<RTCKeyMaps>);
|
|
1503
|
-
logger: BasicLogger | null;
|
|
1504
1444
|
joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): IPromiseResult<IJoinRTCRoomData>;
|
|
1505
1445
|
quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
1506
1446
|
getRTCRoomInfo(roomId: string): IPromiseResult<IRTCRoomInfo>;
|
|
@@ -1532,10 +1472,6 @@ declare class RTCContext {
|
|
|
1532
1472
|
getRTCOutData(roomId: string, userIds: string[]): IPromiseResult<unknown>;
|
|
1533
1473
|
getRTCToken(roomId: string, mode: number, broadcastType?: number): IPromiseResult<IRtcTokenData>;
|
|
1534
1474
|
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>;
|
|
1539
1475
|
getRTCUserList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
1540
1476
|
joinLivingRoomAsAudience(roomId: string, mode: RTCMode, broadcastType?: number): Promise<IAsyncRes<{
|
|
1541
1477
|
token: string;
|
|
@@ -1549,41 +1485,16 @@ declare class RTCContext {
|
|
|
1549
1485
|
endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
|
|
1550
1486
|
getRTCJoinedUserInfo(userId: string): Promise<IAsyncRes<IRTCJoinedInfo[]>>;
|
|
1551
1487
|
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
|
-
}>;
|
|
1561
1488
|
decodeRtcNotify(buffer: Uint8Array): {
|
|
1562
|
-
time:
|
|
1489
|
+
time: any;
|
|
1563
1490
|
type: any;
|
|
1564
1491
|
roomId: any;
|
|
1565
1492
|
};
|
|
1566
1493
|
getCurrentId(): string;
|
|
1567
|
-
getNaviInfo():
|
|
1494
|
+
getNaviInfo(): _rongcloud_engine.INaviInfo | null;
|
|
1568
1495
|
getConnectionStatus(): ConnectionStatus;
|
|
1569
1496
|
getAppkey(): string;
|
|
1570
|
-
|
|
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>>;
|
|
1497
|
+
rtcPing(roomId: string, roomMode: number, broadcastType?: number): Promise<ErrorCode>;
|
|
1587
1498
|
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions): IPromiseResult<IReceivedMessage>;
|
|
1588
1499
|
registerRTCSignalListener(listener?: ((buffer: Uint8Array) => void) | undefined): void;
|
|
1589
1500
|
registerConnectionStateChangeListener(listener: (status: ConnectionStatus) => void): void;
|
|
@@ -1592,9 +1503,6 @@ declare class RTCContext {
|
|
|
1592
1503
|
registerMessageListener(listener: (message: IReceivedMessage) => boolean): void;
|
|
1593
1504
|
getCoreVersion(): string;
|
|
1594
1505
|
getPluginContext(): RTCPluginContext;
|
|
1595
|
-
reportSDKInfo(versionInfo: {
|
|
1596
|
-
[name: string]: string;
|
|
1597
|
-
}): void;
|
|
1598
1506
|
}
|
|
1599
1507
|
|
|
1600
1508
|
declare class RCMediaService {
|
|
@@ -1638,7 +1546,7 @@ declare class RCMediaService {
|
|
|
1638
1546
|
private static msInDetector;
|
|
1639
1547
|
private static detectorTime;
|
|
1640
1548
|
private static detectValidMinute;
|
|
1641
|
-
static
|
|
1549
|
+
private static naviRefetchCount;
|
|
1642
1550
|
private _msList;
|
|
1643
1551
|
constructor(_runtime: IRuntime, _context: RTCContext,
|
|
1644
1552
|
/**
|
|
@@ -1764,7 +1672,6 @@ declare class RCRTCPeerCManager {
|
|
|
1764
1672
|
* 存储创建的所有 peerC,key 为 pcName,/exchange 请求中 request header 中的 Peer-Connection-Id 值
|
|
1765
1673
|
*/
|
|
1766
1674
|
private _mutilPeerC;
|
|
1767
|
-
onTrackTrouble?: Function;
|
|
1768
1675
|
constructor(
|
|
1769
1676
|
/**
|
|
1770
1677
|
* 是否使用多 peerConnection
|
|
@@ -1785,7 +1692,7 @@ declare class RCRTCPeerCManager {
|
|
|
1785
1692
|
/**
|
|
1786
1693
|
* 北极星上报模块
|
|
1787
1694
|
*/
|
|
1788
|
-
_polarisReport?:
|
|
1695
|
+
_polarisReport?: PolarisReporter | undefined);
|
|
1789
1696
|
get useMutilPeerC(): boolean;
|
|
1790
1697
|
/**
|
|
1791
1698
|
* 根据 track 判断是否为上行
|
|
@@ -1905,7 +1812,7 @@ declare abstract class ReadableStore {
|
|
|
1905
1812
|
readonly roomId: string;
|
|
1906
1813
|
readonly crtUserId: string;
|
|
1907
1814
|
readonly roomMode: RTCMode;
|
|
1908
|
-
readonly polarisReport:
|
|
1815
|
+
readonly polarisReport: PolarisReporter;
|
|
1909
1816
|
readonly isUpgrade?: boolean | undefined;
|
|
1910
1817
|
readonly isMainRoom?: boolean | undefined;
|
|
1911
1818
|
/**
|
|
@@ -1937,8 +1844,7 @@ declare abstract class ReadableStore {
|
|
|
1937
1844
|
protected _CDNUris: ICDNUris | null;
|
|
1938
1845
|
protected _CDNEnable: boolean;
|
|
1939
1846
|
protected _destroyed: boolean;
|
|
1940
|
-
|
|
1941
|
-
constructor(context: RTCContext, service: RCMediaService, peerMgr: RCRTCPeerCManager, roomId: string, crtUserId: string, roomMode: RTCMode, polarisReport: PolarisHttpReporter, isUpgrade?: boolean | undefined, isMainRoom?: boolean | undefined);
|
|
1847
|
+
constructor(context: RTCContext, service: RCMediaService, peerMgr: RCRTCPeerCManager, roomId: string, crtUserId: string, roomMode: RTCMode, polarisReport: PolarisReporter, isUpgrade?: boolean | undefined, isMainRoom?: boolean | undefined);
|
|
1942
1848
|
get useMutilPeerC(): boolean;
|
|
1943
1849
|
getResourcesByUserId(userId: string): IPublishedResource[] | undefined;
|
|
1944
1850
|
getRemoteTrack(trackId: string): RCRemoteTrack | undefined;
|
|
@@ -1958,7 +1864,6 @@ declare abstract class ReadableStore {
|
|
|
1958
1864
|
getTrackState(trackId: string): 0 | 1;
|
|
1959
1865
|
getCDNEnable(): boolean;
|
|
1960
1866
|
getCDNUris(): ICDNUris | null;
|
|
1961
|
-
getRoomStatusVersion(): number;
|
|
1962
1867
|
}
|
|
1963
1868
|
declare class Store extends ReadableStore {
|
|
1964
1869
|
private _initRemoteTracks;
|
|
@@ -1973,7 +1878,6 @@ declare class Store extends ReadableStore {
|
|
|
1973
1878
|
setCDNUris(uris: ICDNUris | null): void;
|
|
1974
1879
|
resetSubscribedList(subscribeList: ISubscribeAttr[]): void;
|
|
1975
1880
|
resetCollectSubscribeList(collectSubscribeList: ISubscribeAttr[]): void;
|
|
1976
|
-
setRoomStatusVersion(version: number): void;
|
|
1977
1881
|
}
|
|
1978
1882
|
|
|
1979
1883
|
declare enum CommandPriority {
|
|
@@ -2040,7 +1944,7 @@ declare class BaseInvoker<STORE> {
|
|
|
2040
1944
|
* 房间任务队列管理
|
|
2041
1945
|
*/
|
|
2042
1946
|
declare class Invoker extends BaseInvoker<Store> {
|
|
2043
|
-
constructor(context: RTCContext, service: RCMediaService, peerMrg: RCRTCPeerCManager, roomId: string, crtUserId: string, mode: RTCMode, reporter:
|
|
1947
|
+
constructor(context: RTCContext, service: RCMediaService, peerMrg: RCRTCPeerCManager, roomId: string, crtUserId: string, mode: RTCMode, reporter: PolarisReporter, isUpgrade?: boolean, isMainRoom?: boolean);
|
|
2044
1948
|
/**
|
|
2045
1949
|
* 获取 store 存储实例,返回值类型 `ReadableStore`,避免非 command 定义中修改内存
|
|
2046
1950
|
*/
|
|
@@ -2245,7 +2149,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2245
2149
|
/**
|
|
2246
2150
|
* 北极星上报实例
|
|
2247
2151
|
*/
|
|
2248
|
-
protected _polarisReport:
|
|
2152
|
+
protected _polarisReport: PolarisReporter | null;
|
|
2249
2153
|
/**
|
|
2250
2154
|
* 音量上报实例
|
|
2251
2155
|
*/
|
|
@@ -2261,11 +2165,6 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2261
2165
|
* 是否使用多 peerConnection
|
|
2262
2166
|
*/
|
|
2263
2167
|
_useMutilPeerC?: boolean | undefined, _clientSessionId?: string);
|
|
2264
|
-
/**
|
|
2265
|
-
* 拉取房间数据
|
|
2266
|
-
* @param roomId 房间 id
|
|
2267
|
-
*/
|
|
2268
|
-
private _startPullRTCRoomStatus;
|
|
2269
2168
|
__innerInit(mode: RTCMode, joinType?: RTCJoinType, livingType?: RCLivingType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): Promise<{
|
|
2270
2169
|
code: RCRTCCode | ErrorCode;
|
|
2271
2170
|
data?: IJoinRTCRoomData;
|
|
@@ -2674,7 +2573,7 @@ declare class RCAudienceLivingRoom {
|
|
|
2674
2573
|
/**
|
|
2675
2574
|
* 北极星上报实例
|
|
2676
2575
|
*/
|
|
2677
|
-
protected _polarisReport:
|
|
2576
|
+
protected _polarisReport: PolarisReporter | null;
|
|
2678
2577
|
/**
|
|
2679
2578
|
* 音量上报实例
|
|
2680
2579
|
*/
|
|
@@ -2922,7 +2821,7 @@ declare class PolarisReporter {
|
|
|
2922
2821
|
* @param resourceId userId_11_1_tiny 改为 userId_11_tiny_video
|
|
2923
2822
|
*/
|
|
2924
2823
|
private _getPolarisTrackId;
|
|
2925
|
-
sendR3R4Data(data: IInnerRCRTCStateReport): Promise<
|
|
2824
|
+
sendR3R4Data(data: IInnerRCRTCStateReport): Promise<boolean>;
|
|
2926
2825
|
/**
|
|
2927
2826
|
* 加入房间
|
|
2928
2827
|
*/
|
|
@@ -2934,49 +2833,6 @@ declare class PolarisReporter {
|
|
|
2934
2833
|
sendR2(action: string, status: string, trackIds: string[]): void;
|
|
2935
2834
|
}
|
|
2936
2835
|
|
|
2937
|
-
declare class PolarisHttpReporter {
|
|
2938
|
-
private readonly _context;
|
|
2939
|
-
private readonly _runtime;
|
|
2940
|
-
private readonly _roomId;
|
|
2941
|
-
private readonly _crtRTCRoom;
|
|
2942
|
-
private readonly _userRole;
|
|
2943
|
-
protected _polarisSignalReporter: PolarisReporter | null;
|
|
2944
|
-
private _useHttp;
|
|
2945
|
-
constructor(_context: RTCContext, _runtime: IRuntime, _roomId: string, _crtRTCRoom: RCAbstractRoom | RCAudienceLivingRoom, _userRole?: PolarisRole);
|
|
2946
|
-
private _send;
|
|
2947
|
-
private _refetchNaviInfo;
|
|
2948
|
-
/**
|
|
2949
|
-
* 小流需去掉 _tiny,小流 resourceId 为 userId_tag_mediaType_tiny
|
|
2950
|
-
*/
|
|
2951
|
-
private _getRealResourceId;
|
|
2952
|
-
/**
|
|
2953
|
-
* 生成北极星上报的 trackId
|
|
2954
|
-
* @param resourceId userId_11_1_tiny 改为 userId_11_tiny_video
|
|
2955
|
-
*/
|
|
2956
|
-
private _getPolarisTrackId;
|
|
2957
|
-
private _formatReportBaseData;
|
|
2958
|
-
private _formatReportData;
|
|
2959
|
-
private _formatR1Data;
|
|
2960
|
-
private _formatR2Data;
|
|
2961
|
-
private _formatR3R4Data;
|
|
2962
|
-
sendR3R4Data(data: IInnerRCRTCStateReport): Promise<RCSendCode>;
|
|
2963
|
-
/**
|
|
2964
|
-
* 加入房间
|
|
2965
|
-
*/
|
|
2966
|
-
sendR1(): Promise<void>;
|
|
2967
|
-
/**
|
|
2968
|
-
* RTC 和 LIVE 发布、取消发布
|
|
2969
|
-
* RTC 订阅、取消订阅
|
|
2970
|
-
*/
|
|
2971
|
-
sendR2(action: string, status: string, trackIds: string[]): Promise<void>;
|
|
2972
|
-
}
|
|
2973
|
-
|
|
2974
|
-
declare enum RCEncoder {
|
|
2975
|
-
VP8 = "VP8",
|
|
2976
|
-
VP9 = "VP9",
|
|
2977
|
-
H264 = "H264"
|
|
2978
|
-
}
|
|
2979
|
-
|
|
2980
2836
|
/**
|
|
2981
2837
|
* PC 实例管理类
|
|
2982
2838
|
*/
|
|
@@ -2997,7 +2853,6 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
2997
2853
|
* 北极星上传实例
|
|
2998
2854
|
*/
|
|
2999
2855
|
private readonly _polarisReport?;
|
|
3000
|
-
private readonly onTrackTrouble?;
|
|
3001
2856
|
static __INNER_EVENT_TRACK_READY__: string;
|
|
3002
2857
|
private readonly _rtcPeerConn;
|
|
3003
2858
|
private readonly _sdpStrategy;
|
|
@@ -3007,9 +2862,6 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
3007
2862
|
private _reportStatsTimer;
|
|
3008
2863
|
private _reportR3R4ToPolarisTimer;
|
|
3009
2864
|
private _isDestroyed;
|
|
3010
|
-
private _reportStatsData?;
|
|
3011
|
-
private _originReportStatsData?;
|
|
3012
|
-
private _logger;
|
|
3013
2865
|
constructor(
|
|
3014
2866
|
/**
|
|
3015
2867
|
* peerConnection 对应名称
|
|
@@ -3026,12 +2878,10 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
3026
2878
|
/**
|
|
3027
2879
|
* 北极星上传实例
|
|
3028
2880
|
*/
|
|
3029
|
-
_polarisReport?:
|
|
2881
|
+
_polarisReport?: PolarisReporter | undefined);
|
|
3030
2882
|
getName(): string;
|
|
3031
2883
|
getLocalTracks(): RCLocalTrack[];
|
|
3032
2884
|
private _onConnectionStateChange;
|
|
3033
|
-
private startAutoExecute;
|
|
3034
|
-
private stopAutoExecute;
|
|
3035
2885
|
private _onICEConnectionStateChange;
|
|
3036
2886
|
private _onTrackReady;
|
|
3037
2887
|
/**
|
|
@@ -3066,7 +2916,7 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
3066
2916
|
* @returns 返回格式化后的数据
|
|
3067
2917
|
*/
|
|
3068
2918
|
private _getStatsData;
|
|
3069
|
-
getAudioLevelReportData(
|
|
2919
|
+
getAudioLevelReportData(): Promise<{
|
|
3070
2920
|
trackId: string;
|
|
3071
2921
|
audioLevel: number | null;
|
|
3072
2922
|
}[] | undefined>;
|
|
@@ -3075,10 +2925,6 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
3075
2925
|
* @todo
|
|
3076
2926
|
*/
|
|
3077
2927
|
private _reportHandle;
|
|
3078
|
-
/**
|
|
3079
|
-
* 获取缓存的本地质量数据
|
|
3080
|
-
*/
|
|
3081
|
-
_getCacheStatsData(): IInnerRCRTCStateReport | null | undefined;
|
|
3082
2928
|
/**
|
|
3083
2929
|
* 北极星上报 R3、R4 数据
|
|
3084
2930
|
*/
|
|
@@ -3088,47 +2934,9 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
3088
2934
|
*/
|
|
3089
2935
|
__reportR3R4ToPolaris(): Promise<void>;
|
|
3090
2936
|
getRTCPeerConn(): RTCPeerConnection;
|
|
3091
|
-
/**
|
|
3092
|
-
* 它返回一个 RTCRtpCodecCapability 对象数组,第一个元素是与传入的编码器类型匹配的元素
|
|
3093
|
-
* @param {RCEncoder} encoder - RCEncoder.H264
|
|
3094
|
-
* @returns 正在返回 RTCRtpCodecCapability[] 数组。
|
|
3095
|
-
*/
|
|
3096
|
-
private getCapabilitiesCodes;
|
|
3097
|
-
/**
|
|
3098
|
-
* 它为视频流设置编码器首选项。
|
|
3099
|
-
* @param {RCEncoder} [encoder] - RC编码器
|
|
3100
|
-
*/
|
|
3101
|
-
setEncoderPreferences(encoder?: RCEncoder): Promise<void>;
|
|
3102
2937
|
destroy(): void;
|
|
3103
2938
|
clearReTryExchangeTimer(): void;
|
|
3104
2939
|
isDestroyed(): boolean;
|
|
3105
|
-
/**
|
|
3106
|
-
* 视频不可使用的收集器
|
|
3107
|
-
*/
|
|
3108
|
-
private troubleTracksCollection;
|
|
3109
|
-
private setTroubleTrack;
|
|
3110
|
-
}
|
|
3111
|
-
|
|
3112
|
-
/**
|
|
3113
|
-
* 通知拉取到的房间增量数据列表中每一项数据的动作
|
|
3114
|
-
*/
|
|
3115
|
-
declare enum PullRoomStatusEvent {
|
|
3116
|
-
/**
|
|
3117
|
-
* 人员加入
|
|
3118
|
-
*/
|
|
3119
|
-
JOIN = 0,
|
|
3120
|
-
/**
|
|
3121
|
-
* 人员离开
|
|
3122
|
-
*/
|
|
3123
|
-
LEAVE = 1,
|
|
3124
|
-
/**
|
|
3125
|
-
* 人员离线
|
|
3126
|
-
*/
|
|
3127
|
-
OFFLINE = 2,
|
|
3128
|
-
/**
|
|
3129
|
-
* 资源变动
|
|
3130
|
-
*/
|
|
3131
|
-
RESOURCECHANGE = 3
|
|
3132
2940
|
}
|
|
3133
2941
|
|
|
3134
2942
|
interface IRCTrackBitrate {
|
|
@@ -3166,8 +2974,10 @@ interface IResource {
|
|
|
3166
2974
|
uri: string;
|
|
3167
2975
|
/**
|
|
3168
2976
|
* 资源特征,simulcast 代表这道流支持大小流
|
|
2977
|
+
* @description 此参数存疑,MediaServer 似乎并未下发此字段,Web 端暂不启用
|
|
2978
|
+
* @deprecated
|
|
3169
2979
|
*/
|
|
3170
|
-
simulcast
|
|
2980
|
+
features?: ['simulcast'] | [];
|
|
3171
2981
|
}
|
|
3172
2982
|
/**
|
|
3173
2983
|
* 向房间内发布的媒体数据
|
|
@@ -3428,220 +3238,6 @@ interface IRCRTCStateReport {
|
|
|
3428
3238
|
*/
|
|
3429
3239
|
receivers: IRCTrackStat[];
|
|
3430
3240
|
}
|
|
3431
|
-
/**
|
|
3432
|
-
* http3 北极星上报基础数据
|
|
3433
|
-
*/
|
|
3434
|
-
interface IRCRTCReportBaseData {
|
|
3435
|
-
/**
|
|
3436
|
-
* 上报数据类型 R1-R4
|
|
3437
|
-
*/
|
|
3438
|
-
type: string;
|
|
3439
|
-
appKey: string;
|
|
3440
|
-
/**
|
|
3441
|
-
* 房间通话id
|
|
3442
|
-
*/
|
|
3443
|
-
sessionId: string;
|
|
3444
|
-
roomId: string;
|
|
3445
|
-
/**
|
|
3446
|
-
* 房间创建时间
|
|
3447
|
-
*/
|
|
3448
|
-
roomCreateTime: number;
|
|
3449
|
-
userId: string;
|
|
3450
|
-
userRole: number;
|
|
3451
|
-
joinTime: number;
|
|
3452
|
-
/**
|
|
3453
|
-
* signal 数据中心
|
|
3454
|
-
* */
|
|
3455
|
-
signalDataCenter: string;
|
|
3456
|
-
}
|
|
3457
|
-
/**
|
|
3458
|
-
* http3 北极星上报 R1 数据
|
|
3459
|
-
*/
|
|
3460
|
-
interface IR1Info {
|
|
3461
|
-
/**
|
|
3462
|
-
* 用户加入房间的时间
|
|
3463
|
-
*/
|
|
3464
|
-
joinTime: number;
|
|
3465
|
-
/**
|
|
3466
|
-
* RTC 版本号
|
|
3467
|
-
*/
|
|
3468
|
-
rtcVersion: string;
|
|
3469
|
-
/**
|
|
3470
|
-
* IM SDK 版本
|
|
3471
|
-
*/
|
|
3472
|
-
imVersion: string;
|
|
3473
|
-
/**
|
|
3474
|
-
* 平台(如:Android、iOS、Web)
|
|
3475
|
-
*/
|
|
3476
|
-
platform: string;
|
|
3477
|
-
/**
|
|
3478
|
-
* 设备信息(手机名称+型号)
|
|
3479
|
-
*/
|
|
3480
|
-
device: string;
|
|
3481
|
-
/**
|
|
3482
|
-
* 系统版本(手机系统版本)
|
|
3483
|
-
*/
|
|
3484
|
-
os: string;
|
|
3485
|
-
/**
|
|
3486
|
-
* 浏览器名称, 没有用 -1 表示
|
|
3487
|
-
*/
|
|
3488
|
-
browserName?: string;
|
|
3489
|
-
/**
|
|
3490
|
-
* 浏览器版本, 没有用 -1 表示
|
|
3491
|
-
*/
|
|
3492
|
-
browserVersion?: string;
|
|
3493
|
-
}
|
|
3494
|
-
/**
|
|
3495
|
-
* http3 北极星上报 R2 数据
|
|
3496
|
-
*/
|
|
3497
|
-
interface IR2Info {
|
|
3498
|
-
/**
|
|
3499
|
-
* 用户加入房间的时间
|
|
3500
|
-
*/
|
|
3501
|
-
joinTime: number;
|
|
3502
|
-
/**
|
|
3503
|
-
* 客户端 发布/取消发布 订阅/取消订阅 资源的时间
|
|
3504
|
-
*/
|
|
3505
|
-
sendTime: number;
|
|
3506
|
-
/**
|
|
3507
|
-
* 发布类型 subscribe : 订阅 publish : 发布
|
|
3508
|
-
*/
|
|
3509
|
-
rtcActionType: string;
|
|
3510
|
-
/**
|
|
3511
|
-
* 发布状态 begin : 开始 tend : 结束
|
|
3512
|
-
*/
|
|
3513
|
-
rtcActionStatus: string;
|
|
3514
|
-
trackId: string[];
|
|
3515
|
-
}
|
|
3516
|
-
/**
|
|
3517
|
-
* http3 北极星上报 R3 数据
|
|
3518
|
-
*/
|
|
3519
|
-
interface IR3R4Info {
|
|
3520
|
-
info: IR3R4CommonInfo;
|
|
3521
|
-
}
|
|
3522
|
-
interface IR3R4CommonInfo {
|
|
3523
|
-
/**
|
|
3524
|
-
* 用户加入房间的时间
|
|
3525
|
-
*/
|
|
3526
|
-
joinTime?: number;
|
|
3527
|
-
/**
|
|
3528
|
-
* 用户发布数据流的时间(毫秒),暂时由客户端生成,后期如果有问题服务端做兜底处理
|
|
3529
|
-
*/
|
|
3530
|
-
receiveTime?: number;
|
|
3531
|
-
/**
|
|
3532
|
-
* 总码率
|
|
3533
|
-
*/
|
|
3534
|
-
totalBitRate?: number;
|
|
3535
|
-
/**
|
|
3536
|
-
* APP CPU占用率
|
|
3537
|
-
*/
|
|
3538
|
-
appCPUUsage?: number;
|
|
3539
|
-
/**
|
|
3540
|
-
* 系统 CPU占用率
|
|
3541
|
-
*/
|
|
3542
|
-
systemCPUUsage?: number;
|
|
3543
|
-
/**
|
|
3544
|
-
* 系统CPU频率 (安卓8.0以上)
|
|
3545
|
-
*/
|
|
3546
|
-
systemCPUFrequency?: number;
|
|
3547
|
-
/**
|
|
3548
|
-
* 实时网络状态(2g、3g、4g、wifi)
|
|
3549
|
-
*/
|
|
3550
|
-
networkStatus?: string;
|
|
3551
|
-
/**
|
|
3552
|
-
* Goog rtt 网络延迟
|
|
3553
|
-
*/
|
|
3554
|
-
googleRTTNetwork?: number;
|
|
3555
|
-
/**
|
|
3556
|
-
* ip地址
|
|
3557
|
-
*/
|
|
3558
|
-
ipAddress?: string;
|
|
3559
|
-
/**
|
|
3560
|
-
* 可接收带宽(单位: bit)
|
|
3561
|
-
*/
|
|
3562
|
-
useReceiveBroadBand?: string;
|
|
3563
|
-
/**
|
|
3564
|
-
* 可用发送带宽(单位: bit)
|
|
3565
|
-
*/
|
|
3566
|
-
useSendBroadBand?: string;
|
|
3567
|
-
/**
|
|
3568
|
-
* 丢包数
|
|
3569
|
-
*/
|
|
3570
|
-
packetLossCount?: string;
|
|
3571
|
-
streams?: IR3R4StreamInfo[];
|
|
3572
|
-
}
|
|
3573
|
-
/**
|
|
3574
|
-
* http3 北极星上报 R3、R4 streamInfo 数据
|
|
3575
|
-
*/
|
|
3576
|
-
interface IR3R4StreamInfo {
|
|
3577
|
-
trackId: string;
|
|
3578
|
-
/**
|
|
3579
|
-
* 编解码名称
|
|
3580
|
-
*/
|
|
3581
|
-
codeName?: string;
|
|
3582
|
-
/**
|
|
3583
|
-
* 音频播放音量
|
|
3584
|
-
*/
|
|
3585
|
-
volume?: string;
|
|
3586
|
-
/**
|
|
3587
|
-
* 音频采样率
|
|
3588
|
-
*/
|
|
3589
|
-
samplingRate: number;
|
|
3590
|
-
/**
|
|
3591
|
-
* 下行码率
|
|
3592
|
-
*/
|
|
3593
|
-
bitRate?: number;
|
|
3594
|
-
packetLossRate?: number;
|
|
3595
|
-
/**
|
|
3596
|
-
* 视频接收帧率(单位:fps)
|
|
3597
|
-
*/
|
|
3598
|
-
frameRate?: number;
|
|
3599
|
-
/**
|
|
3600
|
-
* 视频分辨率(格式:640*480)
|
|
3601
|
-
*/
|
|
3602
|
-
resolution?: string;
|
|
3603
|
-
/**
|
|
3604
|
-
* 接收卡顿(间隔时间, 单位: ms)
|
|
3605
|
-
*/
|
|
3606
|
-
blockTime?: number;
|
|
3607
|
-
/**
|
|
3608
|
-
* jitter数据抖动
|
|
3609
|
-
*/
|
|
3610
|
-
jitterData?: number;
|
|
3611
|
-
/**
|
|
3612
|
-
* nack数量
|
|
3613
|
-
*/
|
|
3614
|
-
nAckCount?: string;
|
|
3615
|
-
/**
|
|
3616
|
-
* PLI请求数
|
|
3617
|
-
*/
|
|
3618
|
-
pliCount?: string;
|
|
3619
|
-
/**
|
|
3620
|
-
* googRtt往返时长
|
|
3621
|
-
*/
|
|
3622
|
-
googleRTTTotalTime?: number;
|
|
3623
|
-
/**
|
|
3624
|
-
* 第一个关键帧是否正常收到
|
|
3625
|
-
*/
|
|
3626
|
-
isReceiveFirstFrameRate?: number;
|
|
3627
|
-
/**
|
|
3628
|
-
* 编码方式
|
|
3629
|
-
*/
|
|
3630
|
-
codeType?: string;
|
|
3631
|
-
/**
|
|
3632
|
-
* 当前流的状态是否可用
|
|
3633
|
-
*/
|
|
3634
|
-
isEnabled?: number;
|
|
3635
|
-
}
|
|
3636
|
-
/**
|
|
3637
|
-
* http3 北极星上报总数据
|
|
3638
|
-
*/
|
|
3639
|
-
interface IRCRTCReportData extends IRCRTCReportBaseData {
|
|
3640
|
-
r1Info?: IR1Info;
|
|
3641
|
-
r2Info?: IR2Info;
|
|
3642
|
-
r3Info?: IR3R4Info;
|
|
3643
|
-
r4Info?: IR3R4Info;
|
|
3644
|
-
}
|
|
3645
3241
|
interface IRCRTCReportListener {
|
|
3646
3242
|
/**
|
|
3647
3243
|
* RTCPeerConnection 的详细状态数据
|
|
@@ -3745,11 +3341,6 @@ interface IRoomEventListener extends IRCRTCTrackEventListener {
|
|
|
3745
3341
|
* @param failedList 订阅失败的列表
|
|
3746
3342
|
*/
|
|
3747
3343
|
onTaskCompleted?(code: RCRTCCode, subscribe: ISubscribeAttr[], unsubscribe: ISubscribeAttr[], failedList: ISubscribeAttr[]): void;
|
|
3748
|
-
/**
|
|
3749
|
-
* 当房间内资源(音频视频)异常时给出处理
|
|
3750
|
-
*
|
|
3751
|
-
*/
|
|
3752
|
-
onTrackTrouble?(tracks: RCLocalTrack[]): void;
|
|
3753
3344
|
}
|
|
3754
3345
|
/**
|
|
3755
3346
|
* RTCClient 初始化配置
|
|
@@ -3766,16 +3357,16 @@ interface IRCRTCInitOptions {
|
|
|
3766
3357
|
/**
|
|
3767
3358
|
* 输出日志等级,生产环境默认使用 WARN,开发环境默认为 DEBUG
|
|
3768
3359
|
* @description
|
|
3769
|
-
* *
|
|
3770
|
-
* *
|
|
3360
|
+
* * 0 - DEBUG
|
|
3361
|
+
* * 1 - INFO
|
|
3771
3362
|
* * 2 - WARN
|
|
3772
|
-
* *
|
|
3363
|
+
* * 3 - ERROR
|
|
3773
3364
|
*/
|
|
3774
|
-
logLevel?:
|
|
3365
|
+
logLevel?: LogLevel;
|
|
3775
3366
|
/**
|
|
3776
3367
|
* 修改默认的 log 输出函数
|
|
3777
3368
|
*/
|
|
3778
|
-
logStdout?: (logLevel:
|
|
3369
|
+
logStdout?: (logLevel: LogLevel, content: string) => void;
|
|
3779
3370
|
/**
|
|
3780
3371
|
* 与 MediaServer 的 http 请求超时时间,单位为毫秒,默认值为 `5000`,有效值 `5000-30000`。
|
|
3781
3372
|
* 优先级:用户配置 > 导航配置 > 默认时间。
|
|
@@ -3797,7 +3388,6 @@ interface IRCRTCInitOptions {
|
|
|
3797
3388
|
* 观众拉内置 CDN 资源时是否使用 https,默认为 RCInnerCDNPullIsHttps.HTTPS
|
|
3798
3389
|
*/
|
|
3799
3390
|
pullInnerCDNUseHttps?: RCInnerCDNPullIsHttps;
|
|
3800
|
-
signalRetryTime?: number;
|
|
3801
3391
|
/**
|
|
3802
3392
|
* 音频降噪处理
|
|
3803
3393
|
* - workletModule 默认值为 https://cdn.ronghub.com/plugin-rtc/wasm/5.0.0-alpha.1/process-worklet.js
|
|
@@ -3957,79 +3547,6 @@ interface IChrmKVPullData {
|
|
|
3957
3547
|
isFullUpdate?: boolean;
|
|
3958
3548
|
syncTime?: number;
|
|
3959
3549
|
}
|
|
3960
|
-
/**
|
|
3961
|
-
* 通知拉取到的房间数据
|
|
3962
|
-
*/
|
|
3963
|
-
interface IPullRTCRoomStatus {
|
|
3964
|
-
/**
|
|
3965
|
-
* 是否是全量数据
|
|
3966
|
-
*/
|
|
3967
|
-
bFullStatus: boolean;
|
|
3968
|
-
/**
|
|
3969
|
-
* 当前房间的最大版本号
|
|
3970
|
-
*/
|
|
3971
|
-
version: number;
|
|
3972
|
-
/**
|
|
3973
|
-
* 如果是全量数据,usersData 不为空,给的是房间全部的人以及发布的资源
|
|
3974
|
-
*/
|
|
3975
|
-
usersData: IPullRTCRoomUsersData[];
|
|
3976
|
-
/**
|
|
3977
|
-
* 房间增量数据
|
|
3978
|
-
*/
|
|
3979
|
-
roomStatus: IRoomStatus[];
|
|
3980
|
-
}
|
|
3981
|
-
/**
|
|
3982
|
-
* 通知拉取到的房间增量数据
|
|
3983
|
-
*/
|
|
3984
|
-
interface IRoomStatus {
|
|
3985
|
-
/**
|
|
3986
|
-
* 用户 id
|
|
3987
|
-
*/
|
|
3988
|
-
userId: string;
|
|
3989
|
-
/**
|
|
3990
|
-
* 本次变更的动作类型
|
|
3991
|
-
*/
|
|
3992
|
-
event: PullRoomStatusEvent;
|
|
3993
|
-
/**
|
|
3994
|
-
* 本次变更的版本号
|
|
3995
|
-
*/
|
|
3996
|
-
time: number;
|
|
3997
|
-
/**
|
|
3998
|
-
* 用户变更的资源,event 为人员加入或资源变动时有值
|
|
3999
|
-
* key 包含 uris、cdn_uris、mcu_uris
|
|
4000
|
-
* value 为字符串数组
|
|
4001
|
-
*/
|
|
4002
|
-
userData: {
|
|
4003
|
-
key: string;
|
|
4004
|
-
value: string;
|
|
4005
|
-
}[];
|
|
4006
|
-
/**
|
|
4007
|
-
* 切换角色,0 代表非切换身份发生的加入、退出房间行为
|
|
4008
|
-
*/
|
|
4009
|
-
switchRoleType: RCRTCLiveRole | 0;
|
|
4010
|
-
/**
|
|
4011
|
-
* 额外的信息
|
|
4012
|
-
*/
|
|
4013
|
-
extra: string;
|
|
4014
|
-
}
|
|
4015
|
-
/**
|
|
4016
|
-
* 通知拉取到的房间全量数据
|
|
4017
|
-
*/
|
|
4018
|
-
interface IPullRTCRoomUsersData {
|
|
4019
|
-
/**
|
|
4020
|
-
* 用户 id
|
|
4021
|
-
*/
|
|
4022
|
-
userId: string;
|
|
4023
|
-
/**
|
|
4024
|
-
* 房间内所有资源数据
|
|
4025
|
-
* key 包含 uris、cdn_uris、mcu_uris
|
|
4026
|
-
* value 为字符串数组
|
|
4027
|
-
*/
|
|
4028
|
-
userData: {
|
|
4029
|
-
key: string;
|
|
4030
|
-
value: string;
|
|
4031
|
-
}[];
|
|
4032
|
-
}
|
|
4033
3550
|
|
|
4034
3551
|
/**
|
|
4035
3552
|
* 自定义合流布局时,背景图片填充方式
|
|
@@ -4565,7 +4082,7 @@ declare class RCMediaStreamCapture {
|
|
|
4565
4082
|
declare class RCRTCClient extends RCMediaStreamCapture {
|
|
4566
4083
|
protected readonly _context: RTCContext;
|
|
4567
4084
|
private readonly _runtime;
|
|
4568
|
-
private _options;
|
|
4085
|
+
private readonly _options;
|
|
4569
4086
|
private readonly _service;
|
|
4570
4087
|
constructor(_context: RTCContext, _runtime: IRuntime, _options: IRCRTCInitOptions);
|
|
4571
4088
|
private _handleMessage;
|
|
@@ -4584,15 +4101,14 @@ declare class RCRTCClient extends RCMediaStreamCapture {
|
|
|
4584
4101
|
getCurrentId(): string;
|
|
4585
4102
|
private _crtRoom;
|
|
4586
4103
|
/**
|
|
4587
|
-
*
|
|
4588
|
-
* @param
|
|
4589
|
-
* @param
|
|
4590
|
-
* @param
|
|
4591
|
-
* @param
|
|
4592
|
-
* @param
|
|
4593
|
-
* @param {number} signalRetryTime - 重新连接信令服务器的时间间隔。
|
|
4104
|
+
* 加入普通音视频房间
|
|
4105
|
+
* @param roomId
|
|
4106
|
+
* @param joinType 多端处理方式
|
|
4107
|
+
* @param outerUserDatas 业务层设置人员属性
|
|
4108
|
+
* @param useMutilPeerC 是否使用多 peerConnection 发布资源
|
|
4109
|
+
* @param roomType 加入房间的类型 默认参数 RTCMode.RTC
|
|
4594
4110
|
*/
|
|
4595
|
-
joinRTCRoom(roomId: string, joinType?: RTCJoinType, outerUserDatas?: IRTCUserData, useMutilPeerC?: boolean, roomType?: RTCMode
|
|
4111
|
+
joinRTCRoom(roomId: string, joinType?: RTCJoinType, outerUserDatas?: IRTCUserData, useMutilPeerC?: boolean, roomType?: RTCMode): Promise<{
|
|
4596
4112
|
room?: RCRTCRoom;
|
|
4597
4113
|
code: RCRTCCode;
|
|
4598
4114
|
userIds?: string[];
|
|
@@ -4690,7 +4206,6 @@ declare class RCRTCClient extends RCMediaStreamCapture {
|
|
|
4690
4206
|
code: RCRTCCode | ErrorCode;
|
|
4691
4207
|
data?: IRTCJoinedInfo[];
|
|
4692
4208
|
}>;
|
|
4693
|
-
reportSDKInfo(): void;
|
|
4694
4209
|
}
|
|
4695
4210
|
|
|
4696
4211
|
/**
|