@rongcloud/plugin-rtc 5.2.2-alpha.1 → 5.3.0

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,10 +1,10 @@
1
1
  /*
2
- * RCRTC - v5.2.2-alpha.1
3
- * CommitId - de4f9bc28bbee35d2d5f206a68144c89c098573f
4
- * Mon Nov 22 2021 10:51:42 GMT+0800 (China Standard Time)
2
+ * RCRTC - v5.3.0
3
+ * CommitId - 0fcc19dd9364cd4effa9d9ad18172b0519bb4419
4
+ * Fri Jan 07 2022 16:25:27 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
- import { EventEmitter, LogLevel, RTCMode, IRuntime, RTCPluginContext, IServerRTCRoomEntry, IJoinRTCRoomData, IReceivedMessage, KVString, RTCJoinType, IRTCJoinedInfo, IPluginGenerator } from '@rongcloud/engine';
7
+ import { EventEmitter, LogLevel, RTCMode, IRuntime, RTCPluginContext, IServerRTCRoomEntry, IReceivedMessage, ErrorCode, IJoinRTCRoomData, KVString, RTCJoinType, IRTCJoinedInfo, IPluginGenerator } from '@rongcloud/engine';
8
8
  export { RTCJoinType } from '@rongcloud/engine';
9
9
 
10
10
  /**
@@ -84,7 +84,9 @@ declare enum RCRTCCode {
84
84
  /** 加入 RTC 房间 joinTYype 为 1 时,当前有其他端在房间时的应答码 */
85
85
  SIGNAL_JOIN_RTC_ROOM_REFUSED = 53028,
86
86
  /** 设置音频输出设备时,无权限使用请求的设备 */
87
- NO_PERMISSION_TO_USE_REQUESTED_DEVICE = 53029
87
+ NO_PERMISSION_TO_USE_REQUESTED_DEVICE = 53029,
88
+ /** 方法在 PK 房间上不可用 */
89
+ THE_FUNCTION_IS_DISABLED_IN_PKROOM = 53030
88
90
  }
89
91
 
90
92
  /**
@@ -910,6 +912,76 @@ interface IAudioLevelChangeHandler {
910
912
  declare type RoomData = {
911
913
  [userId: string]: IPublishedResource[];
912
914
  };
915
+ /**
916
+ * 业务层发起连麦、响应连麦可选参数定义
917
+ */
918
+ interface IReqResPKOptions {
919
+ autoMix?: boolean;
920
+ extra?: string;
921
+ }
922
+ interface IPKInviterBaseInfo {
923
+ /**
924
+ * 邀请者房间 ID
925
+ */
926
+ inviterRoomId: string;
927
+ /**
928
+ * 邀请者用户 ID
929
+ */
930
+ inviterUserId: string;
931
+ }
932
+ interface IPKInviteeBaseInfo {
933
+ /**
934
+ * 被邀请者房间 ID
935
+ */
936
+ inviteeRoomId: string;
937
+ /**
938
+ * 被邀请者用户 ID
939
+ */
940
+ inviteeUserId: string;
941
+ }
942
+ /**
943
+ * 业务层监听收到连麦邀请、取消连麦的字段
944
+ */
945
+ interface IPKInviteInfo extends IPKInviterBaseInfo {
946
+ /**
947
+ * 邀请额外信息
948
+ */
949
+ extra?: string;
950
+ }
951
+ /**
952
+ * 业务层监听收到连麦应答的字段
953
+ */
954
+ interface IPKInviteAnswerInfo extends IPKInviterBaseInfo, IPKInviteeBaseInfo {
955
+ /**
956
+ * 是否同意邀请
957
+ */
958
+ agree: boolean;
959
+ /**
960
+ * 响应额外信息
961
+ */
962
+ extra?: string;
963
+ }
964
+ /**
965
+ * 业务层监听收到连麦结束的字段
966
+ */
967
+ interface IPKEndInfo {
968
+ /**
969
+ * 发起结束的房间 ID
970
+ */
971
+ endRoomId: string;
972
+ /**
973
+ * 发起结束的用户 ID
974
+ */
975
+ endUserId: string;
976
+ }
977
+ /**
978
+ * 观众加房间返回给客户的 CDN 信息
979
+ */
980
+ interface IJoinResCDNInfo {
981
+ resolution?: RCResolution;
982
+ fps?: RCFrameRate;
983
+ CDNEnable?: boolean;
984
+ }
913
985
 
914
986
  declare enum RCInnerCDNPushMode {
915
987
  AUTOMATIC = 0,
@@ -999,7 +1071,7 @@ interface IExchangeReqBody {
999
1071
  /**
1000
1072
  * 是否默认合流
1001
1073
  */
1002
- automix: boolean;
1074
+ autoMix: boolean;
1003
1075
  /**
1004
1076
  * 房间 Id 对应的 SessionId
1005
1077
  */
@@ -1076,6 +1148,15 @@ interface IExchangeResponse extends IRTCResponse {
1076
1148
  * 主播发布为具体资源,会议模式为空数组
1077
1149
  */
1078
1150
  mcuPublishList?: IResource[];
1151
+ /**
1152
+ * 订阅成功的资源
1153
+ */
1154
+ subscribedList?: {
1155
+ mediaType: RCMediaType.AUDIO_ONLY | RCMediaType.VIDEO_ONLY;
1156
+ msid: string;
1157
+ userId: string;
1158
+ simulcast?: RCStreamType;
1159
+ }[];
1079
1160
  }
1080
1161
  interface IBroadcastSubReqBody {
1081
1162
  /**
@@ -1677,9 +1758,21 @@ declare class RCAudienceLivingRoom {
1677
1758
  private readonly _joinResData;
1678
1759
  readonly _livingType: RCLivingType;
1679
1760
  private readonly _service;
1761
+ /**
1762
+ * 主播列表
1763
+ */
1680
1764
  private _roomAnchorList;
1765
+ /**
1766
+ * 合流、分流资源
1767
+ */
1681
1768
  private _roomRes;
1769
+ /**
1770
+ * 主播分流资源
1771
+ */
1682
1772
  private _roomAnchorRes;
1773
+ /**
1774
+ * 合流、分流 remoteTracks
1775
+ */
1683
1776
  private _remoteTracks;
1684
1777
  private _appListener;
1685
1778
  private _pc;
@@ -1700,8 +1793,12 @@ declare class RCAudienceLivingRoom {
1700
1793
  private _CDNUris;
1701
1794
  constructor(_context: RTCPluginContext, _runtime: IRuntime, _initOptions: IRCRTCInitOptions, _roomId: string, _joinResData: {
1702
1795
  token: string;
1703
- kvEntries?: IServerRTCRoomEntry[];
1796
+ kvEntries: IServerRTCRoomEntry[];
1704
1797
  }, _livingType: RCLivingType);
1798
+ /**
1799
+ * 解析服务端返回的 KV 数据,赋值 room 内数据
1800
+ */
1801
+ private _setInitData;
1705
1802
  protected _assertRoomDestroyed(): RCRTCCode | undefined;
1706
1803
  /**
1707
1804
  * @description 信令数据处理
@@ -1760,8 +1857,7 @@ declare class RCAudienceLivingRoom {
1760
1857
  private _diffCDNUris;
1761
1858
  /**
1762
1859
  * 获取 CDN 资源对应的拉流地址
1763
- * 首次获取 CDNPlayUrl 时,需传入 url,
1764
- * 业务层调用时使用内存中 _CDNUris 的 url,无 _CDNUris 时说明观众端未赋值过 _CDNUris
1860
+ * _CDNUris url 时,说明未开启 CDN 推送
1765
1861
  * @returns CDNPlayUrl
1766
1862
  */
1767
1863
  private _getCDNPlayUrl;
@@ -1779,6 +1875,7 @@ declare class RCAudienceLivingRoom {
1779
1875
  */
1780
1876
  subscribe(tracks: (RCRemoteTrack | ISubscribeAttr)[]): Promise<{
1781
1877
  code: RCRTCCode;
1878
+ failedList?: ISubscribeAttr[];
1782
1879
  }>;
1783
1880
  private __unsubscribe;
1784
1881
  /**
@@ -1787,6 +1884,7 @@ declare class RCAudienceLivingRoom {
1787
1884
  */
1788
1885
  unsubscribe(tracks: RCRemoteTrack[]): Promise<{
1789
1886
  code: RCRTCCode;
1887
+ failedList?: ISubscribeAttr[];
1790
1888
  }>;
1791
1889
  /**
1792
1890
  * 退出房间并销毁当前房间实例,退出后该房间的所有方法将不可用
@@ -1853,6 +1951,26 @@ declare class RCAudienceLivingRoom {
1853
1951
  * @returns
1854
1952
  */
1855
1953
  getRemoteTracks(): RCRemoteTrack[];
1954
+ /**
1955
+ * 获取远端 RTC tracks
1956
+ */
1957
+ getRemoteRTCTracks(): RCRemoteTrack[];
1958
+ /**
1959
+ * 获取远端 MCU tracks
1960
+ */
1961
+ getRemoteMCUTracks(): RCRemoteTrack[];
1962
+ /**
1963
+ * 获取房间内 CDN 信息
1964
+ */
1965
+ getCDNInfo(): {
1966
+ resolution: RCResolution;
1967
+ fps: RCFrameRate;
1968
+ CDNEnable: boolean | undefined;
1969
+ } | {
1970
+ CDNEnable: boolean;
1971
+ resolution?: undefined;
1972
+ fps?: undefined;
1973
+ };
1856
1974
  }
1857
1975
 
1858
1976
  /**
@@ -1973,6 +2091,171 @@ declare class RCRTCPeerConnection extends EventEmitter {
1973
2091
  clearReTryExchangeTimer(): void;
1974
2092
  }
1975
2093
 
2094
+ declare type IOnRecvPKMsg = (msg: IReceivedMessage) => void;
2095
+ interface IRoomPKEventListener {
2096
+ /**
2097
+ * 收到连麦邀请
2098
+ */
2099
+ onRequestJoinOtherRoom: (info: IPKInviteInfo) => {};
2100
+ /**
2101
+ * 收到取消连麦邀请
2102
+ */
2103
+ onCancelRequestOtherRoom: (info: IPKInviteInfo) => {};
2104
+ /**
2105
+ * 收到连麦 PK 请求响应结果
2106
+ */
2107
+ onResponseJoinOtherRoom: (info: IPKInviteAnswerInfo) => {};
2108
+ /**
2109
+ * 收到 PK 结束
2110
+ */
2111
+ onFinishOtherRoom: (info: IPKEndInfo) => {};
2112
+ }
2113
+ declare class RCLivingPKHandler {
2114
+ private readonly _context;
2115
+ private readonly _runtime;
2116
+ private readonly _service;
2117
+ private readonly _initOptions;
2118
+ /**
2119
+ * 主直播房间
2120
+ */
2121
+ private readonly _mainLivingRoom;
2122
+ private readonly _registerPKMsgListener;
2123
+ /**
2124
+ * 加入 PK 房间回调
2125
+ */
2126
+ private readonly _onJoinedPKRoom;
2127
+ /**
2128
+ * 退出 PK 房间回调
2129
+ */
2130
+ private readonly _onLeavePKRoom;
2131
+ /**
2132
+ * PK 邀请超时时间
2133
+ */
2134
+ private readonly _inviteTimeout;
2135
+ /**
2136
+ * PK 房间信息
2137
+ */
2138
+ private _PKInfo;
2139
+ private _appListener;
2140
+ private _mainRoomId;
2141
+ /**
2142
+ * 跨房间连麦加入的 PK 房间
2143
+ */
2144
+ private _joinedPKRooms;
2145
+ constructor(_context: RTCPluginContext, _runtime: IRuntime, _service: RCMediaService, _initOptions: IRCRTCInitOptions,
2146
+ /**
2147
+ * 主直播房间
2148
+ */
2149
+ _mainLivingRoom: RCLivingRoom, _registerPKMsgListener: (listener: IOnRecvPKMsg) => void,
2150
+ /**
2151
+ * 加入 PK 房间回调
2152
+ */
2153
+ _onJoinedPKRoom: (roomId: string, room: RCLivingRoom) => void,
2154
+ /**
2155
+ * 退出 PK 房间回调
2156
+ */
2157
+ _onLeavePKRoom: (roomId: string) => void);
2158
+ private _callAppListener;
2159
+ /**
2160
+ * 收到连麦邀请
2161
+ */
2162
+ private _onInvite;
2163
+ /**
2164
+ * 收到取消连麦
2165
+ */
2166
+ private _onCancelInvite;
2167
+ private _onInviteTimeout;
2168
+ /**
2169
+ * 收到响应连麦
2170
+ */
2171
+ private _onInviteAnswer;
2172
+ /**
2173
+ * 收到连麦结束
2174
+ */
2175
+ private _onPKEnd;
2176
+ /**
2177
+ * 处理跨房间连麦相关消息
2178
+ */
2179
+ private _onRecvPKMsg;
2180
+ /**
2181
+ * 注册跨房间连麦监听事件
2182
+ */
2183
+ registerRoomPKEventListener(listener: IRoomPKEventListener): void;
2184
+ /**
2185
+ * 发起跨房间连麦请求
2186
+ * @param inviteeRoomId 被邀请者所处的房间 roomId
2187
+ * @param inviteeUserId 被邀请者 userId
2188
+ * @param options.autoMix 是否要把邀请者发布的资源,合并到被邀请者房间内的 MCU 流中
2189
+ * @param options.extra 拓展字段,可随邀请连麦消息透传给被邀请者
2190
+ */
2191
+ requestJoinOtherRoom(inviteeRoomId: string, inviteeUserId: string, options?: IReqResPKOptions): Promise<{
2192
+ code: RCRTCCode | ErrorCode;
2193
+ }>;
2194
+ /**
2195
+ * 取消跨房间连麦请求
2196
+ * @param inviteeRoomId 被邀请者所处的房间 roomId
2197
+ * @param inviteeUserId 被邀请者 userId
2198
+ * @param extra 附加信息,可随取消邀请连麦消息透传给被邀请者
2199
+ */
2200
+ cancelRequestJoinOtherRoom(inviteeRoomId: string, inviteeUserId: string, extra?: string): Promise<{
2201
+ code: RCRTCCode | ErrorCode;
2202
+ }>;
2203
+ /**
2204
+ * 响应跨房间连麦请求
2205
+ * @param inviterRoomId 邀请者所处的房间 roomId
2206
+ * @param inviterUserId 邀请者 userId
2207
+ * @param agree 是否同意连麦
2208
+ * @param options.autoMix 是否要把被邀请者发布的资源,合并到邀请者房间内的 MCU 流中
2209
+ * @param options.extra 附加信息,可随响应连麦消息透传给邀请者
2210
+ */
2211
+ responseJoinOtherRoom(inviterRoomId: string, inviterUserId: string, agree: boolean, options?: IReqResPKOptions): Promise<{
2212
+ code: RCRTCCode | ErrorCode;
2213
+ }>;
2214
+ /**
2215
+ * 结束跨房间连麦
2216
+ * @param roomId 需要结束连麦的房间 roomId
2217
+ */
2218
+ private _quitRoomPK;
2219
+ private _relaseCrtRoom;
2220
+ /**
2221
+ * 加入副直播房间
2222
+ * @roomId 副房间的 roomId
2223
+ */
2224
+ joinOtherRoom(roomId: string): Promise<{
2225
+ code: RCRTCCode;
2226
+ room?: RCLivingRoom;
2227
+ userIds?: string[];
2228
+ tracks?: RCRemoteTrack[];
2229
+ CDNEnable?: boolean;
2230
+ }>;
2231
+ /**
2232
+ * 退出副房间
2233
+ * @param room 要退出的副房间的 room 实例
2234
+ * @param isQuitPK 是否要结束连麦
2235
+ */
2236
+ leaveOtherRoom(room: RCLivingRoom, isQuitPK?: boolean): Promise<{
2237
+ code: RCRTCCode;
2238
+ }>;
2239
+ /**
2240
+ * 获取连麦信息
2241
+ * @param roomId 连麦房间的 roomId
2242
+ */
2243
+ getPKInfo(roomId: string): {
2244
+ inviteSessionId: string;
2245
+ inviterRoomId: string;
2246
+ inviterUserId: string;
2247
+ inviterUserAutoMix?: boolean | undefined;
2248
+ inviteeRoomId: string;
2249
+ inviteeUserAutoMix?: boolean | undefined;
2250
+ };
2251
+ /**
2252
+ * 获取已加入的副房间
2253
+ */
2254
+ getJoinedPKRooms(): {
2255
+ [roomId: string]: RCLivingRoom;
2256
+ };
2257
+ }
2258
+
1976
2259
  /**
1977
2260
  * 房间抽象基类
1978
2261
  */
@@ -1984,6 +2267,7 @@ declare abstract class RCAbstractRoom {
1984
2267
  protected readonly _service: RCMediaService;
1985
2268
  protected readonly _initOptions: IRCRTCInitOptions;
1986
2269
  private readonly _ntfClearRoomItem;
2270
+ protected _isMainRoom?: boolean | undefined;
1987
2271
  /**
1988
2272
  * 房间资源数据
1989
2273
  */
@@ -1995,7 +2279,7 @@ declare abstract class RCAbstractRoom {
1995
2279
  /**
1996
2280
  * 已订阅参数
1997
2281
  */
1998
- private readonly _subscribedList;
2282
+ protected readonly _subscribedList: ISubscribeAttr[];
1999
2283
  /**
2000
2284
  * 房间保活 rtcPing
2001
2285
  */
@@ -2011,7 +2295,7 @@ declare abstract class RCAbstractRoom {
2011
2295
  /**
2012
2296
  * PeerConnection 连接实例
2013
2297
  */
2014
- private readonly _pc;
2298
+ protected readonly _pc: RCRTCPeerConnection;
2015
2299
  private _destroyed;
2016
2300
  /**
2017
2301
  * 北极星上报实例
@@ -2021,7 +2305,7 @@ declare abstract class RCAbstractRoom {
2021
2305
  * 音量上报实例
2022
2306
  */
2023
2307
  private _audioLevelReport;
2024
- constructor(_context: RTCPluginContext, _runtime: IRuntime, _roomId: string, data: IJoinRTCRoomData, _roomMode: RTCMode, _service: RCMediaService, _initOptions: IRCRTCInitOptions, _ntfClearRoomItem: Function, isUpgrade?: boolean);
2308
+ constructor(_context: RTCPluginContext, _runtime: IRuntime, _roomId: string, data: IJoinRTCRoomData, _roomMode: RTCMode, _service: RCMediaService, _initOptions: IRCRTCInitOptions, _ntfClearRoomItem: Function, isUpgrade?: boolean, _isMainRoom?: boolean | undefined);
2025
2309
  private _initRemoteTracks;
2026
2310
  private _handlePingResult;
2027
2311
  /**
@@ -2197,6 +2481,14 @@ declare abstract class RCAbstractRoom {
2197
2481
  liveUrl?: string;
2198
2482
  }>;
2199
2483
  private __publish;
2484
+ /**
2485
+ * 获取跨房间连麦需携带参数 pushOtherRooms 的值
2486
+ */
2487
+ protected _getPushOtherRoomsParams(): {
2488
+ roomId: string;
2489
+ sessionId: string;
2490
+ autoMix: boolean;
2491
+ }[] | undefined;
2200
2492
  /**
2201
2493
  * ice 断线后,尝试重新走 exchange
2202
2494
  */
@@ -2241,6 +2533,7 @@ declare abstract class RCAbstractRoom {
2241
2533
  */
2242
2534
  subscribe(tracks: (RCRemoteTrack | ISubscribeAttr)[]): Promise<{
2243
2535
  code: RCRTCCode;
2536
+ failedList?: ISubscribeAttr[];
2244
2537
  }>;
2245
2538
  private __subscribe;
2246
2539
  /**
@@ -2249,6 +2542,7 @@ declare abstract class RCAbstractRoom {
2249
2542
  */
2250
2543
  unsubscribe(tracks: RCRemoteTrack[]): Promise<{
2251
2544
  code: RCRTCCode;
2545
+ failedList?: ISubscribeAttr[];
2252
2546
  }>;
2253
2547
  private __unsubscribe;
2254
2548
  protected _assertRoomDestroyed(): RCRTCCode | undefined;
@@ -2311,6 +2605,18 @@ declare abstract class RCAbstractRoom {
2311
2605
  * 销毁远端资源
2312
2606
  */
2313
2607
  private _removeRemoteTracks;
2608
+ /**
2609
+ * 存储连麦监听事件
2610
+ */
2611
+ private _onRecvPKMsg;
2612
+ /**
2613
+ * 注册 PK 业务监听方法
2614
+ */
2615
+ protected _registerPKMsgListener(listener: IOnRecvPKMsg | null): void;
2616
+ /**
2617
+ * 退出 PK 房间
2618
+ */
2619
+ protected _quitAllPKRoom(): void;
2314
2620
  }
2315
2621
 
2316
2622
  /**
@@ -2488,18 +2794,32 @@ declare class RCMCUConfigBuilder {
2488
2794
  */
2489
2795
  declare class RCLivingRoom extends RCAbstractRoom {
2490
2796
  private _livingType;
2797
+ /**
2798
+ * 是否是主房间
2799
+ */
2800
+ protected _isMainRoom: boolean;
2491
2801
  readonly _mcuConfigBuilder: RCMCUConfigBuilder;
2492
2802
  /**
2493
2803
  * cdn_uris 信令扩散数据
2494
2804
  */
2495
2805
  private _CDNUris;
2496
2806
  private _CDNEnable;
2497
- constructor(context: RTCPluginContext, runtime: IRuntime, roomId: string, data: IJoinRTCRoomData, service: RCMediaService, initOptions: IRCRTCInitOptions, clientEvent: Function, _livingType: RCLivingType, isUpgrage?: boolean);
2807
+ /**
2808
+ * 跨房间连麦管理器
2809
+ */
2810
+ private readonly _roomPKHandler;
2811
+ constructor(context: RTCPluginContext, runtime: IRuntime, roomId: string, data: IJoinRTCRoomData, service: RCMediaService, initOptions: IRCRTCInitOptions, clientEvent: Function, _livingType: RCLivingType, isUpgrage: boolean | undefined,
2812
+ /**
2813
+ * 是否是主房间
2814
+ */
2815
+ _isMainRoom: boolean);
2498
2816
  getLivingType(): RCLivingType;
2499
2817
  /**
2500
2818
  * 获取 MCU 配置构建对象
2501
2819
  */
2502
- getMCUConfigBuilder(): RCMCUConfigBuilder;
2820
+ getMCUConfigBuilder(): RCMCUConfigBuilder | {
2821
+ code: RCRTCCode;
2822
+ };
2503
2823
  /**
2504
2824
  * 接收 MCU 配置并向 MediaServer 提交
2505
2825
  * @param data
@@ -2566,6 +2886,30 @@ declare class RCLivingRoom extends RCAbstractRoom {
2566
2886
  * @returns boolean
2567
2887
  */
2568
2888
  __getCDNPushMode(): RCInnerCDNPushMode | undefined;
2889
+ /**
2890
+ * 加入 PK 房间回调
2891
+ */
2892
+ private _onJoinedPKRoom;
2893
+ /**
2894
+ * 离开 PK 房间后,如果参与过连麦,pushOtherRooms 需去掉退出的连麦房间配置,重新和 mediaServer 交互
2895
+ */
2896
+ private _onLeavePKRoom;
2897
+ /**
2898
+ * 携带 pushOtherRooms 与 mediaServer 重新交互
2899
+ */
2900
+ private _exchangeWithPushOtherRoom;
2901
+ /**
2902
+ * 获取 PK 业务处理器
2903
+ * @since version 5.3.0
2904
+ */
2905
+ getRoomPKHandler(): {
2906
+ code: RCRTCCode;
2907
+ roomPKHandler?: RCLivingPKHandler;
2908
+ };
2909
+ /**
2910
+ * 退出所有连麦房间
2911
+ */
2912
+ protected _quitAllPKRoom(): void;
2569
2913
  }
2570
2914
 
2571
2915
  /**
@@ -2652,6 +2996,10 @@ declare class RCRTCClient {
2652
2996
  private readonly _service;
2653
2997
  constructor(_context: RTCPluginContext, _runtime: IRuntime, _options: IRCRTCInitOptions);
2654
2998
  private _handleMessage;
2999
+ /**
3000
+ * 获取加入的连麦房间
3001
+ */
3002
+ private _getJoinedPKRoomList;
2655
3003
  /**
2656
3004
  * 获取当前用户 Id,若 IM 未连接,这返回 `''`
2657
3005
  * @returns
@@ -2797,6 +3145,10 @@ declare class RCRTCClient {
2797
3145
  joinLivingRoomAsAudience(roomId: string, livingType: RCLivingType): Promise<{
2798
3146
  room?: RCAudienceLivingRoom;
2799
3147
  code: RCRTCCode;
3148
+ userIds?: string[];
3149
+ RTCTracks?: RCRemoteTrack[];
3150
+ MCUTracks?: RCRemoteTrack[];
3151
+ CDNUris?: IJoinResCDNInfo;
2800
3152
  }>;
2801
3153
  /**
2802
3154
  * 观众退出并销毁当前房间实例,退出后该房间的所有方法将不可用
@@ -2811,6 +3163,8 @@ declare class RCRTCClient {
2811
3163
  upgradeToAnchorRoom(room: RCAudienceLivingRoom): Promise<{
2812
3164
  room?: RCLivingRoom;
2813
3165
  code: RCRTCCode;
3166
+ userIds?: string[];
3167
+ tracks?: RCRemoteTrack[];
2814
3168
  }>;
2815
3169
  /**
2816
3170
  * 降级为观众房间
@@ -2819,6 +3173,10 @@ declare class RCRTCClient {
2819
3173
  downgradeToAudienceRoom(room: RCLivingRoom): Promise<{
2820
3174
  room?: RCAudienceLivingRoom;
2821
3175
  code: RCRTCCode;
3176
+ userIds?: string[];
3177
+ RTCTracks?: RCRemoteTrack[];
3178
+ MCUTracks?: RCRemoteTrack[];
3179
+ CDNUris?: IJoinResCDNInfo;
2822
3180
  }>;
2823
3181
  /**
2824
3182
  * 获取在房间内用户信息
@@ -2877,4 +3235,4 @@ declare const helper: {
2877
3235
  ifSupportScreenShare: typeof ifSupportScreenShare;
2878
3236
  };
2879
3237
 
2880
- export { BackgroundPictureFillMode, ICameraVideoProfile, IMCUOutputConfig, IMCUOutputVideoConfig, IMicphoneAudioProfile, IPublishAttrs, IPublishedResource, IRCCandidatePairStat, IRCRTCInitOptions, IRCRTCReportListener, IRCRTCStateReport, IRCTrackStat, IRoomEventListener, ISubscribeAttr, IVideoProfile, MixLayoutMode, MixVideoRenderMode, RCAbstractRoom, RCAudienceClient, RCAudienceLivingRoom, RCCameraVideoTrack, RCFrameRate, RCInnerCDNPullIsHttps, RCInnerCDNPullKind, RCKickReason, RCLivingRoom, RCLivingType, RCLocalAudioTrack, RCLocalFileAudioTrack, RCLocalFileTrack, RCLocalFileVideoTrack, RCLocalTrack, RCLocalVideoTrack, RCMCUConfigBuilder, RCMediaType, RCMicphoneAudioTrack, RCRTCClient, RCRTCCode, RCRTCLiveRole, RCRTCPingResult, RCRTCRoom, RCRemoteAudioTrack, RCRemoteTrack, RCRemoteVideoTrack, RCResolution, RCScreenVideoTrack, RCTag, RCTrack, device, helper, installer };
3238
+ export { BackgroundPictureFillMode, ICameraVideoProfile, IMCUOutputConfig, IMCUOutputVideoConfig, IMicphoneAudioProfile, IPKEndInfo, IPKInviteAnswerInfo, IPKInviteInfo, IPublishAttrs, IPublishedResource, IRCCandidatePairStat, IRCRTCInitOptions, IRCRTCReportListener, IRCRTCStateReport, IRCTrackStat, IReqResPKOptions, IRoomEventListener, IRoomPKEventListener, ISubscribeAttr, IVideoProfile, MixLayoutMode, MixVideoRenderMode, RCAbstractRoom, RCAudienceClient, RCAudienceLivingRoom, RCCameraVideoTrack, RCFrameRate, RCInnerCDNPullIsHttps, RCInnerCDNPullKind, RCKickReason, RCLivingRoom, RCLivingType, RCLocalAudioTrack, RCLocalFileAudioTrack, RCLocalFileTrack, RCLocalFileVideoTrack, RCLocalTrack, RCLocalVideoTrack, RCMCUConfigBuilder, RCMediaType, RCMicphoneAudioTrack, RCRTCClient, RCRTCCode, RCRTCLiveRole, RCRTCPingResult, RCRTCRoom, RCRemoteAudioTrack, RCRemoteTrack, RCRemoteVideoTrack, RCResolution, RCScreenVideoTrack, RCTag, RCTrack, device, helper, installer };