@rongcloud/plugin-rtc 5.5.5-beem.1 → 5.5.5-beem.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +34 -12
- package/dist/index.esm.js +1901 -2182
- package/dist/index.js +1900 -2181
- package/dist/index.umd.js +1900 -2181
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.5.5-beem.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.5.5-beem.2
|
|
3
|
+
* CommitId - fb1da8eadeb0d8d9871ed026c4ccb09a9f570b77
|
|
4
|
+
* Thu Oct 27 2022 20:08:26 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
import { EventEmitter, BasicLogger, INaviInfo, RTCPluginContext, AbsCodec, IPromiseResult, ErrorCode, KVString, IRuntime, IAsyncRes, ConnectionStatus, ConversationType, ISendMsgOptions, IReceivedMessage, EnableLogL, IPluginGenerator } from '@rongcloud/engine';
|
|
@@ -174,6 +174,7 @@ declare abstract class RCTrack extends EventEmitter {
|
|
|
174
174
|
protected _msTrack?: MediaStreamTrack;
|
|
175
175
|
private _msStream;
|
|
176
176
|
protected _logger: BasicLogger | null;
|
|
177
|
+
protected readonly DataTrackId: string;
|
|
177
178
|
constructor(_tag: string, _userId: string, _kind: 'audio' | 'video', _isLocalTrack: boolean, _roomId?: string | undefined);
|
|
178
179
|
/**
|
|
179
180
|
* 获取音视轨所属的 streamId,streamId 相同的音轨和视轨可认为属于统一道流
|
|
@@ -1676,7 +1677,7 @@ declare class RCMediaService {
|
|
|
1676
1677
|
* @param header
|
|
1677
1678
|
* @param body
|
|
1678
1679
|
*/
|
|
1679
|
-
exchange(headers: IRTCReqHeader, body: IExchangeReqBody): Promise<{
|
|
1680
|
+
exchange(headers: IRTCReqHeader, body: IExchangeReqBody, traceId: string): Promise<{
|
|
1680
1681
|
code: RCRTCCode;
|
|
1681
1682
|
data?: IExchangeResponse | undefined;
|
|
1682
1683
|
}>;
|
|
@@ -1962,7 +1963,7 @@ declare abstract class ReadableStore {
|
|
|
1962
1963
|
}
|
|
1963
1964
|
declare class Store extends ReadableStore {
|
|
1964
1965
|
private _initRemoteTracks;
|
|
1965
|
-
initWithRoomData(data: IJoinRTCRoomData): void;
|
|
1966
|
+
initWithRoomData(data: IJoinRTCRoomData, traceId: string): void;
|
|
1966
1967
|
assignRoomData(data: RoomData): void;
|
|
1967
1968
|
setResourcesByUserId(userId: string, arr: IPublishedResource[]): void;
|
|
1968
1969
|
removeRemoteTrack(trackId: string): void;
|
|
@@ -2266,7 +2267,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2266
2267
|
* @param roomId 房间 id
|
|
2267
2268
|
*/
|
|
2268
2269
|
private _startPullRTCRoomStatus;
|
|
2269
|
-
__innerInit(mode: RTCMode, joinType?: RTCJoinType, livingType?: RCLivingType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): Promise<{
|
|
2270
|
+
__innerInit(mode: RTCMode, joinType?: RTCJoinType, livingType?: RCLivingType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData, traceId?: string): Promise<{
|
|
2270
2271
|
code: RCRTCCode | ErrorCode;
|
|
2271
2272
|
data?: IJoinRTCRoomData;
|
|
2272
2273
|
}>;
|
|
@@ -2286,7 +2287,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2286
2287
|
private _onTrackReady;
|
|
2287
2288
|
protected _callAppListener(eventType: keyof IRoomEventListener, ...attrs: any[]): void;
|
|
2288
2289
|
private _onTrackUnpublish;
|
|
2289
|
-
__parseInnerMessage(message: IReceivedMessage): boolean;
|
|
2290
|
+
__parseInnerMessage(message: IReceivedMessage, traceId: string): boolean;
|
|
2290
2291
|
/**
|
|
2291
2292
|
* 被踢出房间通知
|
|
2292
2293
|
* @param byServer
|
|
@@ -2301,13 +2302,17 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2301
2302
|
* @param messageType 消息类型
|
|
2302
2303
|
* @param userId 消息发送者
|
|
2303
2304
|
*/
|
|
2304
|
-
protected _resourceHandle(content: ResourceMsgContent, messageType: RCRTCMessageType.PUBLISH | RCRTCMessageType.UNPUBLISH | RCRTCMessageType.MODIFY | RCRTCMessageType.TOTAL_CONTENT_RESOURCE, userId: string): Promise<void>;
|
|
2305
|
+
protected _resourceHandle(content: ResourceMsgContent, messageType: RCRTCMessageType.PUBLISH | RCRTCMessageType.UNPUBLISH | RCRTCMessageType.MODIFY | RCRTCMessageType.TOTAL_CONTENT_RESOURCE, userId: string, traceId: string): Promise<void>;
|
|
2305
2306
|
private _onTrackPublish;
|
|
2306
2307
|
/**
|
|
2307
2308
|
* 处理 `RCRTCMessageType.STATE` 消息
|
|
2308
2309
|
* @param content
|
|
2309
2310
|
*/
|
|
2310
2311
|
private _stateHandle;
|
|
2312
|
+
/**
|
|
2313
|
+
* 处理人员应用层事件
|
|
2314
|
+
*/
|
|
2315
|
+
private _dealUserAppListener;
|
|
2311
2316
|
/**
|
|
2312
2317
|
* 获取房间 Id
|
|
2313
2318
|
*/
|
|
@@ -2942,6 +2947,8 @@ declare class PolarisHttpReporter {
|
|
|
2942
2947
|
private readonly _userRole;
|
|
2943
2948
|
protected _polarisSignalReporter: PolarisReporter | null;
|
|
2944
2949
|
private _useHttp;
|
|
2950
|
+
static logServer: string | undefined;
|
|
2951
|
+
static dc: string | undefined;
|
|
2945
2952
|
constructor(_context: RTCContext, _runtime: IRuntime, _roomId: string, _crtRTCRoom: RCAbstractRoom | RCAudienceLivingRoom, _userRole?: PolarisRole);
|
|
2946
2953
|
private _send;
|
|
2947
2954
|
private _refetchNaviInfo;
|
|
@@ -3490,6 +3497,10 @@ interface IR1Info {
|
|
|
3490
3497
|
* 浏览器版本, 没有用 -1 表示
|
|
3491
3498
|
*/
|
|
3492
3499
|
browserVersion?: string;
|
|
3500
|
+
/**
|
|
3501
|
+
* 发送数据的时间
|
|
3502
|
+
*/
|
|
3503
|
+
receiveTime?: number;
|
|
3493
3504
|
}
|
|
3494
3505
|
/**
|
|
3495
3506
|
* http3 北极星上报 R2 数据
|
|
@@ -3512,6 +3523,10 @@ interface IR2Info {
|
|
|
3512
3523
|
*/
|
|
3513
3524
|
rtcActionStatus: string;
|
|
3514
3525
|
trackId: string[];
|
|
3526
|
+
/**
|
|
3527
|
+
* 发送数据的时间
|
|
3528
|
+
*/
|
|
3529
|
+
receiveTime?: number;
|
|
3515
3530
|
}
|
|
3516
3531
|
/**
|
|
3517
3532
|
* http3 北极星上报 R3 数据
|
|
@@ -4267,11 +4282,11 @@ declare class RCLivingRoom extends RCAbstractRoom {
|
|
|
4267
4282
|
/**
|
|
4268
4283
|
* @override
|
|
4269
4284
|
*/
|
|
4270
|
-
__innerInit(mode: RTCMode, joinType?: RTCJoinType, livingType?: RCLivingType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): Promise<{
|
|
4285
|
+
__innerInit(mode: RTCMode, joinType?: RTCJoinType, livingType?: RCLivingType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData, traceId?: string): Promise<{
|
|
4271
4286
|
code: RCRTCCode | ErrorCode;
|
|
4272
4287
|
data?: IJoinRTCRoomData;
|
|
4273
4288
|
}>;
|
|
4274
|
-
__innerInitByIdentityChange(): Promise<ErrorCode>;
|
|
4289
|
+
__innerInitByIdentityChange(traceId: string): Promise<ErrorCode>;
|
|
4275
4290
|
/**
|
|
4276
4291
|
* 增量发布资源,若发布的资源 tag 及媒体类型重复,后者将覆盖前者进行发布。
|
|
4277
4292
|
* @param tracks 待发布的 RCLocalTrack 实例
|
|
@@ -4303,11 +4318,11 @@ declare class RCLivingRoom extends RCAbstractRoom {
|
|
|
4303
4318
|
*/
|
|
4304
4319
|
protected _resourceHandle(content: ResourceMsgContent & {
|
|
4305
4320
|
cdn_uris?: ICDNUris[];
|
|
4306
|
-
}, messageType: RCRTCMessageType.PUBLISH | RCRTCMessageType.UNPUBLISH | RCRTCMessageType.MODIFY | RCRTCMessageType.TOTAL_CONTENT_RESOURCE, userId: string): Promise<void>;
|
|
4321
|
+
}, messageType: RCRTCMessageType.PUBLISH | RCRTCMessageType.UNPUBLISH | RCRTCMessageType.MODIFY | RCRTCMessageType.TOTAL_CONTENT_RESOURCE, userId: string, traceId: string): Promise<void>;
|
|
4307
4322
|
/**
|
|
4308
4323
|
* 观众切换为主播后直接处理人员变更及资源变更
|
|
4309
4324
|
*/
|
|
4310
|
-
protected _afterChangedRole(data: IJoinRTCRoomData): void;
|
|
4325
|
+
protected _afterChangedRole(data: IJoinRTCRoomData, traceId: string): void;
|
|
4311
4326
|
/**
|
|
4312
4327
|
* 返回 CDN 是否可用
|
|
4313
4328
|
* @returns boolean
|
|
@@ -4443,6 +4458,7 @@ declare class RCMediaStreamCapture {
|
|
|
4443
4458
|
constructor(_context: RTCContext);
|
|
4444
4459
|
private _isElectron;
|
|
4445
4460
|
private _getMediaStream;
|
|
4461
|
+
private _getMediaStreamErrorReason;
|
|
4446
4462
|
/**
|
|
4447
4463
|
* 如果用户设置了音频约束为true,那么我们将音频约束设置为一个空对象,
|
|
4448
4464
|
* 然后我们将检查浏览器是否支持noiseSuppression、autoGainControl和echoCancellation约束,
|
|
@@ -4632,7 +4648,13 @@ declare class RCRTCClient extends RCMediaStreamCapture {
|
|
|
4632
4648
|
*/
|
|
4633
4649
|
getAudienceClient(useMutilPeerC?: boolean): RCAudienceClient;
|
|
4634
4650
|
private _onIMStatusChange;
|
|
4651
|
+
/**
|
|
4652
|
+
* 用户主动断开 IM 连接
|
|
4653
|
+
*/
|
|
4635
4654
|
private _onIMDisconnect;
|
|
4655
|
+
/**
|
|
4656
|
+
* 用户销毁 IM 客户端,IM 客户端需重新初始化
|
|
4657
|
+
*/
|
|
4636
4658
|
private _onIMUninit;
|
|
4637
4659
|
/**
|
|
4638
4660
|
* 退出并销毁当前房间实例,退出后该房间的所有方法将不可用
|