@rongcloud/plugin-rtc 5.5.5-beem-alpha.4 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * RCRTC - v5.5.5-beem-alpha.4
3
- * CommitId - 0c078c138d99c8962f00f41c7d9a82e1d0f13b5a
4
- * Thu Oct 20 2022 17:51:40 GMT+0800 (China Standard Time)
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;
@@ -2194,10 +2195,6 @@ declare class RCLivingPKHandler {
2194
2195
  inviteSessionId: string;
2195
2196
  inviterRoomId: string;
2196
2197
  inviterUserId: string;
2197
- /**
2198
- * 加入副直播房间
2199
- * @roomId 副房间的 roomId
2200
- */
2201
2198
  inviterUserAutoMix?: boolean | undefined;
2202
2199
  inviteeRoomId: string;
2203
2200
  inviteeUserAutoMix?: boolean | undefined;
@@ -2270,7 +2267,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
2270
2267
  * @param roomId 房间 id
2271
2268
  */
2272
2269
  private _startPullRTCRoomStatus;
2273
- __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<{
2274
2271
  code: RCRTCCode | ErrorCode;
2275
2272
  data?: IJoinRTCRoomData;
2276
2273
  }>;
@@ -2290,7 +2287,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
2290
2287
  private _onTrackReady;
2291
2288
  protected _callAppListener(eventType: keyof IRoomEventListener, ...attrs: any[]): void;
2292
2289
  private _onTrackUnpublish;
2293
- __parseInnerMessage(message: IReceivedMessage): boolean;
2290
+ __parseInnerMessage(message: IReceivedMessage, traceId: string): boolean;
2294
2291
  /**
2295
2292
  * 被踢出房间通知
2296
2293
  * @param byServer
@@ -2305,7 +2302,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
2305
2302
  * @param messageType 消息类型
2306
2303
  * @param userId 消息发送者
2307
2304
  */
2308
- 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>;
2309
2306
  private _onTrackPublish;
2310
2307
  /**
2311
2308
  * 处理 `RCRTCMessageType.STATE` 消息
@@ -2950,6 +2947,8 @@ declare class PolarisHttpReporter {
2950
2947
  private readonly _userRole;
2951
2948
  protected _polarisSignalReporter: PolarisReporter | null;
2952
2949
  private _useHttp;
2950
+ static logServer: string | undefined;
2951
+ static dc: string | undefined;
2953
2952
  constructor(_context: RTCContext, _runtime: IRuntime, _roomId: string, _crtRTCRoom: RCAbstractRoom | RCAudienceLivingRoom, _userRole?: PolarisRole);
2954
2953
  private _send;
2955
2954
  private _refetchNaviInfo;
@@ -4283,11 +4282,11 @@ declare class RCLivingRoom extends RCAbstractRoom {
4283
4282
  /**
4284
4283
  * @override
4285
4284
  */
4286
- __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<{
4287
4286
  code: RCRTCCode | ErrorCode;
4288
4287
  data?: IJoinRTCRoomData;
4289
4288
  }>;
4290
- __innerInitByIdentityChange(): Promise<ErrorCode>;
4289
+ __innerInitByIdentityChange(traceId: string): Promise<ErrorCode>;
4291
4290
  /**
4292
4291
  * 增量发布资源,若发布的资源 tag 及媒体类型重复,后者将覆盖前者进行发布。
4293
4292
  * @param tracks 待发布的 RCLocalTrack 实例
@@ -4319,11 +4318,11 @@ declare class RCLivingRoom extends RCAbstractRoom {
4319
4318
  */
4320
4319
  protected _resourceHandle(content: ResourceMsgContent & {
4321
4320
  cdn_uris?: ICDNUris[];
4322
- }, 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>;
4323
4322
  /**
4324
4323
  * 观众切换为主播后直接处理人员变更及资源变更
4325
4324
  */
4326
- protected _afterChangedRole(data: IJoinRTCRoomData): void;
4325
+ protected _afterChangedRole(data: IJoinRTCRoomData, traceId: string): void;
4327
4326
  /**
4328
4327
  * 返回 CDN 是否可用
4329
4328
  * @returns boolean
@@ -4459,6 +4458,7 @@ declare class RCMediaStreamCapture {
4459
4458
  constructor(_context: RTCContext);
4460
4459
  private _isElectron;
4461
4460
  private _getMediaStream;
4461
+ private _getMediaStreamErrorReason;
4462
4462
  /**
4463
4463
  * 如果用户设置了音频约束为true,那么我们将音频约束设置为一个空对象,
4464
4464
  * 然后我们将检查浏览器是否支持noiseSuppression、autoGainControl和echoCancellation约束,
@@ -4648,7 +4648,13 @@ declare class RCRTCClient extends RCMediaStreamCapture {
4648
4648
  */
4649
4649
  getAudienceClient(useMutilPeerC?: boolean): RCAudienceClient;
4650
4650
  private _onIMStatusChange;
4651
+ /**
4652
+ * 用户主动断开 IM 连接
4653
+ */
4651
4654
  private _onIMDisconnect;
4655
+ /**
4656
+ * 用户销毁 IM 客户端,IM 客户端需重新初始化
4657
+ */
4652
4658
  private _onIMUninit;
4653
4659
  /**
4654
4660
  * 退出并销毁当前房间实例,退出后该房间的所有方法将不可用