@rongcloud/plugin-rtc 5.2.3 → 5.2.4-beem.11

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.2.3
3
- * CommitId - 57253d26ef6bbe89a514bbfc302e62c92d54886c
4
- * Thu Dec 30 2021 17:49:48 GMT+0800 (China Standard Time)
2
+ * RCRTC - v5.2.4-beem.11
3
+ * CommitId - dbfe1dbe0b6627aa62beb6c3d31f6b2894ccadcb
4
+ * Wed Jun 29 2022 19:23:04 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  import { EventEmitter, LogLevel, RTCMode, IRuntime, RTCPluginContext, IServerRTCRoomEntry, IJoinRTCRoomData, IReceivedMessage, KVString, RTCJoinType, IRTCJoinedInfo, IPluginGenerator } from '@rongcloud/engine';
@@ -770,7 +770,7 @@ interface IRoomEventListener extends IRCRTCTrackEventListener {
770
770
  * 另一种可能是己方 rtcPing 失败次数超出上限
771
771
  * @param byServer 当值为 `false` 时,说明本端 rtcPing 超时;当值为 `true` 时,说明本端收到被踢出房间通知
772
772
  */
773
- onKickOff?(byServer: boolean, state?: RCKickReason): void;
773
+ onKickOff?(byServer: boolean, state?: RCKickReason, kickExtra?: any): void;
774
774
  /**
775
775
  * 接收到房间信令时回调,用户可通过房间实例的 sendMessage 接口发送信令
776
776
  * @param name 信令名
@@ -1941,7 +1941,7 @@ declare class PolarisReporter {
1941
1941
  * @param resourceId userId_11_1_tiny 改为 userId_11_tiny_video
1942
1942
  */
1943
1943
  private _getPolarisTrackId;
1944
- sendR3R4Data(data: IInnerRCRTCStateReport): void;
1944
+ sendR3R4Data(data: IInnerRCRTCStateReport): Promise<boolean>;
1945
1945
  /**
1946
1946
  * 加入房间
1947
1947
  */
@@ -1972,6 +1972,7 @@ declare class RCRTCPeerConnection extends EventEmitter {
1972
1972
  private pubLocalTracks;
1973
1973
  private _reTryExchangeTimer;
1974
1974
  private _reportStatsTimer;
1975
+ private _reportR3R4ToPolarisTimer;
1975
1976
  constructor(
1976
1977
  /**
1977
1978
  * _reTryExchange 方法
@@ -2022,6 +2023,14 @@ declare class RCRTCPeerConnection extends EventEmitter {
2022
2023
  * @todo
2023
2024
  */
2024
2025
  private _reportHandle;
2026
+ /**
2027
+ * 北极星上报 R3、R4 数据
2028
+ */
2029
+ private _sendR3R4Data;
2030
+ /**
2031
+ * 2s 给北极星上报一次 R3、R4
2032
+ */
2033
+ __reportR3R4ToPolaris(): Promise<void>;
2025
2034
  getRTCPeerConn(): RTCPeerConnection;
2026
2035
  destroy(): void;
2027
2036
  clearReTryExchangeTimer(): void;
@@ -2226,6 +2235,11 @@ declare abstract class RCAbstractRoom {
2226
2235
  * 退出并销毁当前房间实例,退出后该房间的所有方法将不可用
2227
2236
  */
2228
2237
  __destroy(quitRoom: boolean): Promise<void>;
2238
+ /**
2239
+ * 退出房间之前禁用所有远端资源,避免退出动作耗时过长,
2240
+ * 导致在未完全退出的过程中仍能听到房间内的声音问题
2241
+ */
2242
+ private _muteRemoteTracksBeforeQuit;
2229
2243
  private _leaveHandle;
2230
2244
  private _onLocalTrackDestroied;
2231
2245
  /**
@@ -2717,8 +2731,12 @@ declare class RCRTCClient {
2717
2731
  /**
2718
2732
  * 加入普通音视频房间
2719
2733
  * @param roomId
2734
+ * @param joinType 多端处理方式
2735
+ * @param outerUserDatas 业务层设置人员属性
2736
+ * @param useMutilPeerC
2737
+ * @param roomType 加入房间的类型 默认参数 RTCMode.RTC
2720
2738
  */
2721
- joinRTCRoom(roomId: string, joinType?: RTCJoinType): Promise<{
2739
+ joinRTCRoom(roomId: string, joinType?: RTCJoinType, outerUserDatas?: unknown, useMutilPeerC?: boolean, roomType?: RTCMode): Promise<{
2722
2740
  room?: RCRTCRoom;
2723
2741
  code: RCRTCCode;
2724
2742
  userIds?: string[];