@rongcloud/plugin-rtc 5.2.0 → 5.3.0-rtc-roompk.1
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 +319 -17
- package/dist/index.esm.js +13275 -15
- package/dist/index.js +13305 -15
- package/dist/index.umd.js +13309 -15
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.3.0-rtc-roompk.1
|
|
3
|
+
* CommitId - 381b45b74bd1cee88cf1e6e79108809734bb17ea
|
|
4
|
+
* Sat Dec 25 2021 01:21:26 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
|
-
import { EventEmitter, LogLevel, RTCMode, IRuntime, RTCPluginContext, IServerRTCRoomEntry,
|
|
7
|
+
import { EventEmitter, LogLevel, RTCMode, IRuntime, RTCPluginContext, IServerRTCRoomEntry, IReceivedMessage, 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,70 @@ interface IAudioLevelChangeHandler {
|
|
|
910
912
|
declare type RoomData = {
|
|
911
913
|
[userId: string]: IPublishedResource[];
|
|
912
914
|
};
|
|
915
|
+
interface IReqRoomPKOptions {
|
|
916
|
+
autoMix?: boolean;
|
|
917
|
+
extra?: string;
|
|
918
|
+
}
|
|
919
|
+
interface IPKInviterBaseInfo {
|
|
920
|
+
/**
|
|
921
|
+
* 邀请者房间 ID
|
|
922
|
+
*/
|
|
923
|
+
inviterRoomId: string;
|
|
924
|
+
/**
|
|
925
|
+
* 邀请者用户 ID
|
|
926
|
+
*/
|
|
927
|
+
inviterUserId: string;
|
|
928
|
+
}
|
|
929
|
+
interface IPKInviteeBaseInfo {
|
|
930
|
+
/**
|
|
931
|
+
* 被邀请者房间 ID
|
|
932
|
+
*/
|
|
933
|
+
inviteeRoomId: string;
|
|
934
|
+
/**
|
|
935
|
+
* 被邀请者用户 ID
|
|
936
|
+
*/
|
|
937
|
+
inviteeUserId: string;
|
|
938
|
+
}
|
|
939
|
+
interface IPKInviteInfo extends IPKInviterBaseInfo {
|
|
940
|
+
/**
|
|
941
|
+
* 邀请额外信息
|
|
942
|
+
*/
|
|
943
|
+
extra?: string;
|
|
944
|
+
}
|
|
945
|
+
interface IPKInviteAnswerInfo extends IPKInviterBaseInfo, IPKInviteeBaseInfo {
|
|
946
|
+
/**
|
|
947
|
+
* 是否同意邀请
|
|
948
|
+
*/
|
|
949
|
+
agree: boolean;
|
|
950
|
+
/**
|
|
951
|
+
* 响应额外信息
|
|
952
|
+
*/
|
|
953
|
+
extra?: string;
|
|
954
|
+
}
|
|
955
|
+
interface IPKEndInfo {
|
|
956
|
+
/**
|
|
957
|
+
* 发起结束的房间 ID
|
|
958
|
+
*/
|
|
959
|
+
endRoomId: string;
|
|
960
|
+
/**
|
|
961
|
+
* 发起结束的用户 ID
|
|
962
|
+
*/
|
|
963
|
+
endUserId: string;
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* 观众加房间返回给客户的数据
|
|
967
|
+
*/
|
|
968
|
+
interface IAudienceJoinRoomResInfo {
|
|
969
|
+
remoteUserIds: string[];
|
|
970
|
+
remoteRTCTracks: RCRemoteTrack[];
|
|
971
|
+
remoteMCUTracks: RCRemoteTrack[];
|
|
972
|
+
remoteTracks: RCRemoteTrack[];
|
|
973
|
+
CDNUris: {
|
|
974
|
+
resolution?: RCResolution;
|
|
975
|
+
fps?: RCFrameRate;
|
|
976
|
+
CDNEnable?: boolean;
|
|
977
|
+
};
|
|
978
|
+
}
|
|
913
979
|
|
|
914
980
|
declare enum RCInnerCDNPushMode {
|
|
915
981
|
AUTOMATIC = 0,
|
|
@@ -999,7 +1065,7 @@ interface IExchangeReqBody {
|
|
|
999
1065
|
/**
|
|
1000
1066
|
* 是否默认合流
|
|
1001
1067
|
*/
|
|
1002
|
-
|
|
1068
|
+
autoMix: boolean;
|
|
1003
1069
|
/**
|
|
1004
1070
|
* 房间 Id 对应的 SessionId
|
|
1005
1071
|
*/
|
|
@@ -1076,6 +1142,15 @@ interface IExchangeResponse extends IRTCResponse {
|
|
|
1076
1142
|
* 主播发布为具体资源,会议模式为空数组
|
|
1077
1143
|
*/
|
|
1078
1144
|
mcuPublishList?: IResource[];
|
|
1145
|
+
/**
|
|
1146
|
+
* 订阅成功的资源
|
|
1147
|
+
*/
|
|
1148
|
+
subscribedList?: {
|
|
1149
|
+
mediaType: RCMediaType.AUDIO_ONLY | RCMediaType.VIDEO_ONLY;
|
|
1150
|
+
msid: string;
|
|
1151
|
+
userId: string;
|
|
1152
|
+
simulcast?: RCStreamType;
|
|
1153
|
+
}[];
|
|
1079
1154
|
}
|
|
1080
1155
|
interface IBroadcastSubReqBody {
|
|
1081
1156
|
/**
|
|
@@ -1677,9 +1752,21 @@ declare class RCAudienceLivingRoom {
|
|
|
1677
1752
|
private readonly _joinResData;
|
|
1678
1753
|
readonly _livingType: RCLivingType;
|
|
1679
1754
|
private readonly _service;
|
|
1755
|
+
/**
|
|
1756
|
+
* 主播列表
|
|
1757
|
+
*/
|
|
1680
1758
|
private _roomAnchorList;
|
|
1759
|
+
/**
|
|
1760
|
+
* 合流、分流资源
|
|
1761
|
+
*/
|
|
1681
1762
|
private _roomRes;
|
|
1763
|
+
/**
|
|
1764
|
+
* 主播分流资源
|
|
1765
|
+
*/
|
|
1682
1766
|
private _roomAnchorRes;
|
|
1767
|
+
/**
|
|
1768
|
+
* 合流、分流 remoteTracks
|
|
1769
|
+
*/
|
|
1683
1770
|
private _remoteTracks;
|
|
1684
1771
|
private _appListener;
|
|
1685
1772
|
private _pc;
|
|
@@ -1700,8 +1787,12 @@ declare class RCAudienceLivingRoom {
|
|
|
1700
1787
|
private _CDNUris;
|
|
1701
1788
|
constructor(_context: RTCPluginContext, _runtime: IRuntime, _initOptions: IRCRTCInitOptions, _roomId: string, _joinResData: {
|
|
1702
1789
|
token: string;
|
|
1703
|
-
kvEntries
|
|
1790
|
+
kvEntries: IServerRTCRoomEntry[];
|
|
1704
1791
|
}, _livingType: RCLivingType);
|
|
1792
|
+
/**
|
|
1793
|
+
* 解析服务端返回的 KV 数据,赋值 room 内数据
|
|
1794
|
+
*/
|
|
1795
|
+
private _setInitData;
|
|
1705
1796
|
protected _assertRoomDestroyed(): RCRTCCode | undefined;
|
|
1706
1797
|
/**
|
|
1707
1798
|
* @description 信令数据处理
|
|
@@ -1760,8 +1851,7 @@ declare class RCAudienceLivingRoom {
|
|
|
1760
1851
|
private _diffCDNUris;
|
|
1761
1852
|
/**
|
|
1762
1853
|
* 获取 CDN 资源对应的拉流地址
|
|
1763
|
-
*
|
|
1764
|
-
* 业务层调用时使用内存中 _CDNUris 的 url,无 _CDNUris 时说明观众端未赋值过 _CDNUris
|
|
1854
|
+
* _CDNUris 无 url 时,说明未开启 CDN 推送
|
|
1765
1855
|
* @returns CDNPlayUrl
|
|
1766
1856
|
*/
|
|
1767
1857
|
private _getCDNPlayUrl;
|
|
@@ -1779,6 +1869,7 @@ declare class RCAudienceLivingRoom {
|
|
|
1779
1869
|
*/
|
|
1780
1870
|
subscribe(tracks: (RCRemoteTrack | ISubscribeAttr)[]): Promise<{
|
|
1781
1871
|
code: RCRTCCode;
|
|
1872
|
+
failedList?: ISubscribeAttr[];
|
|
1782
1873
|
}>;
|
|
1783
1874
|
private __unsubscribe;
|
|
1784
1875
|
/**
|
|
@@ -1787,6 +1878,7 @@ declare class RCAudienceLivingRoom {
|
|
|
1787
1878
|
*/
|
|
1788
1879
|
unsubscribe(tracks: RCRemoteTrack[]): Promise<{
|
|
1789
1880
|
code: RCRTCCode;
|
|
1881
|
+
failedList?: ISubscribeAttr[];
|
|
1790
1882
|
}>;
|
|
1791
1883
|
/**
|
|
1792
1884
|
* 退出房间并销毁当前房间实例,退出后该房间的所有方法将不可用
|
|
@@ -1853,6 +1945,26 @@ declare class RCAudienceLivingRoom {
|
|
|
1853
1945
|
* @returns
|
|
1854
1946
|
*/
|
|
1855
1947
|
getRemoteTracks(): RCRemoteTrack[];
|
|
1948
|
+
/**
|
|
1949
|
+
* 获取远端 RTC tracks
|
|
1950
|
+
*/
|
|
1951
|
+
getRemoteRTCTracks(): RCRemoteTrack[];
|
|
1952
|
+
/**
|
|
1953
|
+
* 获取远端 MCU tracks
|
|
1954
|
+
*/
|
|
1955
|
+
getRemoteMCUTracks(): RCRemoteTrack[];
|
|
1956
|
+
/**
|
|
1957
|
+
* 获取房间内 CDN 信息
|
|
1958
|
+
*/
|
|
1959
|
+
getCDNInfo(): {
|
|
1960
|
+
resolution: RCResolution;
|
|
1961
|
+
fps: RCFrameRate;
|
|
1962
|
+
CDNEnable: boolean | undefined;
|
|
1963
|
+
} | {
|
|
1964
|
+
CDNEnable: boolean;
|
|
1965
|
+
resolution?: undefined;
|
|
1966
|
+
fps?: undefined;
|
|
1967
|
+
};
|
|
1856
1968
|
}
|
|
1857
1969
|
|
|
1858
1970
|
/**
|
|
@@ -1973,6 +2085,149 @@ declare class RCRTCPeerConnection extends EventEmitter {
|
|
|
1973
2085
|
clearReTryExchangeTimer(): void;
|
|
1974
2086
|
}
|
|
1975
2087
|
|
|
2088
|
+
declare type IOnRecvPKMsg = (msg: IReceivedMessage) => void;
|
|
2089
|
+
interface IRoomPKEventListener {
|
|
2090
|
+
/**
|
|
2091
|
+
* 收到连麦 PK 邀请
|
|
2092
|
+
*/
|
|
2093
|
+
onRequestJoinOtherRoom: (info: IPKInviteInfo) => {};
|
|
2094
|
+
/**
|
|
2095
|
+
* 收到连麦 PK 邀请取消
|
|
2096
|
+
*/
|
|
2097
|
+
onCancelRequestOtherRoom: (info: IPKInviteInfo) => {};
|
|
2098
|
+
/**
|
|
2099
|
+
* 收到连麦 PK 请求响应结果
|
|
2100
|
+
*/
|
|
2101
|
+
onResponseJoinOtherRoom: (info: IPKInviteAnswerInfo) => {};
|
|
2102
|
+
/**
|
|
2103
|
+
* 收到 PK 结束
|
|
2104
|
+
*/
|
|
2105
|
+
onFinishOtherRoom: (info: IPKEndInfo) => {};
|
|
2106
|
+
}
|
|
2107
|
+
declare class RCLivingPKHandler {
|
|
2108
|
+
private readonly _context;
|
|
2109
|
+
private readonly _runtime;
|
|
2110
|
+
private readonly _service;
|
|
2111
|
+
private readonly _initOptions;
|
|
2112
|
+
/**
|
|
2113
|
+
* 主直播房间
|
|
2114
|
+
*/
|
|
2115
|
+
private readonly _mainLivingRoom;
|
|
2116
|
+
private readonly _registerPKMsgListener;
|
|
2117
|
+
/**
|
|
2118
|
+
* 加入 PK 房间回调
|
|
2119
|
+
*/
|
|
2120
|
+
private readonly _onJoinedPKRoom;
|
|
2121
|
+
/**
|
|
2122
|
+
* 退出 PK 房间回调
|
|
2123
|
+
*/
|
|
2124
|
+
private readonly _onLeavePKRoom;
|
|
2125
|
+
/**
|
|
2126
|
+
* PK 邀请超时时间
|
|
2127
|
+
*/
|
|
2128
|
+
private readonly _inviteTimeout;
|
|
2129
|
+
/**
|
|
2130
|
+
* PK 房间信息
|
|
2131
|
+
*/
|
|
2132
|
+
private _PKInfo;
|
|
2133
|
+
private _appListener;
|
|
2134
|
+
private _mainRoomId;
|
|
2135
|
+
/**
|
|
2136
|
+
* 跨房间连麦加入的 PK 房间
|
|
2137
|
+
*/
|
|
2138
|
+
private _joinedPKRooms;
|
|
2139
|
+
constructor(_context: RTCPluginContext, _runtime: IRuntime, _service: RCMediaService, _initOptions: IRCRTCInitOptions,
|
|
2140
|
+
/**
|
|
2141
|
+
* 主直播房间
|
|
2142
|
+
*/
|
|
2143
|
+
_mainLivingRoom: RCLivingRoom, _registerPKMsgListener: (listener: IOnRecvPKMsg) => void,
|
|
2144
|
+
/**
|
|
2145
|
+
* 加入 PK 房间回调
|
|
2146
|
+
*/
|
|
2147
|
+
_onJoinedPKRoom: (roomId: string, room: RCLivingRoom) => void,
|
|
2148
|
+
/**
|
|
2149
|
+
* 退出 PK 房间回调
|
|
2150
|
+
*/
|
|
2151
|
+
_onLeavePKRoom: (roomId: string) => void);
|
|
2152
|
+
private _callAppListener;
|
|
2153
|
+
private _onInvite;
|
|
2154
|
+
private _onCancelInvite;
|
|
2155
|
+
private _onInviteTimeout;
|
|
2156
|
+
private _onInviteAnswer;
|
|
2157
|
+
private _onPKEnd;
|
|
2158
|
+
/**
|
|
2159
|
+
* 处理跨房间连麦相关消息
|
|
2160
|
+
*/
|
|
2161
|
+
private _onRecvPKMsg;
|
|
2162
|
+
/**
|
|
2163
|
+
* 跨房间连麦 PK 事件注册
|
|
2164
|
+
*/
|
|
2165
|
+
registerRoomPKEventListener(listener: IRoomPKEventListener): void;
|
|
2166
|
+
/**
|
|
2167
|
+
* 发起跨房间连麦请求
|
|
2168
|
+
* @param inviteeRoomId 被邀请者所处的房间 ID
|
|
2169
|
+
* @param inviteeUserId 被邀请者 ID
|
|
2170
|
+
* @param options.autoMix 被邀请者的发布的资源在服务侧是否自动合流
|
|
2171
|
+
* @param options.extra 拓展字段,用于邀请数据透传
|
|
2172
|
+
*/
|
|
2173
|
+
requestJoinOtherRoom(inviteeRoomId: string, inviteeUserId: string, options?: IReqRoomPKOptions): Promise<{
|
|
2174
|
+
code: RCRTCCode;
|
|
2175
|
+
}>;
|
|
2176
|
+
/**
|
|
2177
|
+
* 取消跨房间连麦 PK 请求
|
|
2178
|
+
*/
|
|
2179
|
+
cancelRequestJoinOtherRoom(inviteeRoomId: string, inviteeUserId: string, extra?: string): Promise<{
|
|
2180
|
+
code: RCRTCCode;
|
|
2181
|
+
}>;
|
|
2182
|
+
/**
|
|
2183
|
+
* 跨房间连麦 PK 响应
|
|
2184
|
+
*/
|
|
2185
|
+
responseJoinOtherRoom(inviterRoomId: string, inviterUserId: string, agree: boolean, options?: IReqRoomPKOptions): Promise<{
|
|
2186
|
+
code: RCRTCCode;
|
|
2187
|
+
}>;
|
|
2188
|
+
/**
|
|
2189
|
+
* 结束跨房间连麦 PK
|
|
2190
|
+
* @param roomId 需要退出 PK 的房间 ID
|
|
2191
|
+
*/
|
|
2192
|
+
private _quitRoomPK;
|
|
2193
|
+
private _relaseCrtRoom;
|
|
2194
|
+
/**
|
|
2195
|
+
* 加入 PK 直播房间
|
|
2196
|
+
* @roomId PK 房间 ID
|
|
2197
|
+
*/
|
|
2198
|
+
joinOtherRoom(roomId: string): Promise<{
|
|
2199
|
+
code: RCRTCCode;
|
|
2200
|
+
room?: RCLivingRoom;
|
|
2201
|
+
userIds?: string[];
|
|
2202
|
+
tracks?: RCRemoteTrack[];
|
|
2203
|
+
CDNEnable?: boolean;
|
|
2204
|
+
}>;
|
|
2205
|
+
/**
|
|
2206
|
+
* 退出 PK 直播房间房间
|
|
2207
|
+
* @param room 要离开的 PK 房间 room 实例
|
|
2208
|
+
*/
|
|
2209
|
+
leaveOtherRoom(room: RCLivingRoom, isQuitPK?: boolean): Promise<{
|
|
2210
|
+
code: RCRTCCode;
|
|
2211
|
+
}>;
|
|
2212
|
+
/**
|
|
2213
|
+
* 获取 _PKInfo
|
|
2214
|
+
*/
|
|
2215
|
+
getPKInfo(roomId: string): {
|
|
2216
|
+
inviteSessionId: string;
|
|
2217
|
+
inviterRoomId: string;
|
|
2218
|
+
inviterUserId: string;
|
|
2219
|
+
inviterUserAutoMix?: boolean | undefined;
|
|
2220
|
+
inviteeRoomId: string;
|
|
2221
|
+
inviteeUserAutoMix?: boolean | undefined;
|
|
2222
|
+
};
|
|
2223
|
+
/**
|
|
2224
|
+
* 获取已加入的 PK 房间
|
|
2225
|
+
*/
|
|
2226
|
+
getJoinedPKRooms(): {
|
|
2227
|
+
[roomId: string]: RCLivingRoom;
|
|
2228
|
+
};
|
|
2229
|
+
}
|
|
2230
|
+
|
|
1976
2231
|
/**
|
|
1977
2232
|
* 房间抽象基类
|
|
1978
2233
|
*/
|
|
@@ -1984,6 +2239,7 @@ declare abstract class RCAbstractRoom {
|
|
|
1984
2239
|
protected readonly _service: RCMediaService;
|
|
1985
2240
|
protected readonly _initOptions: IRCRTCInitOptions;
|
|
1986
2241
|
private readonly _ntfClearRoomItem;
|
|
2242
|
+
protected _isMainRoom?: boolean | undefined;
|
|
1987
2243
|
/**
|
|
1988
2244
|
* 房间资源数据
|
|
1989
2245
|
*/
|
|
@@ -1995,7 +2251,7 @@ declare abstract class RCAbstractRoom {
|
|
|
1995
2251
|
/**
|
|
1996
2252
|
* 已订阅参数
|
|
1997
2253
|
*/
|
|
1998
|
-
|
|
2254
|
+
protected readonly _subscribedList: ISubscribeAttr[];
|
|
1999
2255
|
/**
|
|
2000
2256
|
* 房间保活 rtcPing
|
|
2001
2257
|
*/
|
|
@@ -2011,7 +2267,7 @@ declare abstract class RCAbstractRoom {
|
|
|
2011
2267
|
/**
|
|
2012
2268
|
* PeerConnection 连接实例
|
|
2013
2269
|
*/
|
|
2014
|
-
|
|
2270
|
+
protected readonly _pc: RCRTCPeerConnection;
|
|
2015
2271
|
private _destroyed;
|
|
2016
2272
|
/**
|
|
2017
2273
|
* 北极星上报实例
|
|
@@ -2021,7 +2277,7 @@ declare abstract class RCAbstractRoom {
|
|
|
2021
2277
|
* 音量上报实例
|
|
2022
2278
|
*/
|
|
2023
2279
|
private _audioLevelReport;
|
|
2024
|
-
constructor(_context: RTCPluginContext, _runtime: IRuntime, _roomId: string, data: IJoinRTCRoomData, _roomMode: RTCMode, _service: RCMediaService, _initOptions: IRCRTCInitOptions, _ntfClearRoomItem: Function, isUpgrade?: boolean);
|
|
2280
|
+
constructor(_context: RTCPluginContext, _runtime: IRuntime, _roomId: string, data: IJoinRTCRoomData, _roomMode: RTCMode, _service: RCMediaService, _initOptions: IRCRTCInitOptions, _ntfClearRoomItem: Function, isUpgrade?: boolean, _isMainRoom?: boolean | undefined);
|
|
2025
2281
|
private _initRemoteTracks;
|
|
2026
2282
|
private _handlePingResult;
|
|
2027
2283
|
/**
|
|
@@ -2241,6 +2497,7 @@ declare abstract class RCAbstractRoom {
|
|
|
2241
2497
|
*/
|
|
2242
2498
|
subscribe(tracks: (RCRemoteTrack | ISubscribeAttr)[]): Promise<{
|
|
2243
2499
|
code: RCRTCCode;
|
|
2500
|
+
failedList?: ISubscribeAttr[];
|
|
2244
2501
|
}>;
|
|
2245
2502
|
private __subscribe;
|
|
2246
2503
|
/**
|
|
@@ -2249,6 +2506,7 @@ declare abstract class RCAbstractRoom {
|
|
|
2249
2506
|
*/
|
|
2250
2507
|
unsubscribe(tracks: RCRemoteTrack[]): Promise<{
|
|
2251
2508
|
code: RCRTCCode;
|
|
2509
|
+
failedList?: ISubscribeAttr[];
|
|
2252
2510
|
}>;
|
|
2253
2511
|
private __unsubscribe;
|
|
2254
2512
|
protected _assertRoomDestroyed(): RCRTCCode | undefined;
|
|
@@ -2311,6 +2569,15 @@ declare abstract class RCAbstractRoom {
|
|
|
2311
2569
|
* 销毁远端资源
|
|
2312
2570
|
*/
|
|
2313
2571
|
private _removeRemoteTracks;
|
|
2572
|
+
private _onRecvPKMsg;
|
|
2573
|
+
/**
|
|
2574
|
+
* 注册 PK 业务监听方法
|
|
2575
|
+
*/
|
|
2576
|
+
protected _registerPKMsgListener(listener: IOnRecvPKMsg): void;
|
|
2577
|
+
/**
|
|
2578
|
+
* 退出 PK 房间
|
|
2579
|
+
*/
|
|
2580
|
+
protected _quitPKRoom(): void;
|
|
2314
2581
|
}
|
|
2315
2582
|
|
|
2316
2583
|
/**
|
|
@@ -2488,13 +2755,25 @@ declare class RCMCUConfigBuilder {
|
|
|
2488
2755
|
*/
|
|
2489
2756
|
declare class RCLivingRoom extends RCAbstractRoom {
|
|
2490
2757
|
private _livingType;
|
|
2758
|
+
/**
|
|
2759
|
+
* 是否是主房间
|
|
2760
|
+
*/
|
|
2761
|
+
protected _isMainRoom: boolean;
|
|
2491
2762
|
readonly _mcuConfigBuilder: RCMCUConfigBuilder;
|
|
2492
2763
|
/**
|
|
2493
2764
|
* cdn_uris 信令扩散数据
|
|
2494
2765
|
*/
|
|
2495
2766
|
private _CDNUris;
|
|
2496
2767
|
private _CDNEnable;
|
|
2497
|
-
|
|
2768
|
+
/**
|
|
2769
|
+
* 跨房间连麦管理器
|
|
2770
|
+
*/
|
|
2771
|
+
private readonly _roomPKHandler;
|
|
2772
|
+
constructor(context: RTCPluginContext, runtime: IRuntime, roomId: string, data: IJoinRTCRoomData, service: RCMediaService, initOptions: IRCRTCInitOptions, clientEvent: Function, _livingType: RCLivingType, isUpgrage: boolean | undefined,
|
|
2773
|
+
/**
|
|
2774
|
+
* 是否是主房间
|
|
2775
|
+
*/
|
|
2776
|
+
_isMainRoom: boolean);
|
|
2498
2777
|
getLivingType(): RCLivingType;
|
|
2499
2778
|
/**
|
|
2500
2779
|
* 获取 MCU 配置构建对象
|
|
@@ -2566,6 +2845,27 @@ declare class RCLivingRoom extends RCAbstractRoom {
|
|
|
2566
2845
|
* @returns boolean
|
|
2567
2846
|
*/
|
|
2568
2847
|
__getCDNPushMode(): RCInnerCDNPushMode | undefined;
|
|
2848
|
+
/**
|
|
2849
|
+
* 加入 PK 房间回调
|
|
2850
|
+
*/
|
|
2851
|
+
private _onJoinedPKRoom;
|
|
2852
|
+
private _onLeavePKRoom;
|
|
2853
|
+
/**
|
|
2854
|
+
* 携带 pushOtherRooms 与 mediaServer 重新交互
|
|
2855
|
+
* @param roomId 副房间 roomId
|
|
2856
|
+
*/
|
|
2857
|
+
private _exchangeWithPushOtherRoom;
|
|
2858
|
+
/**
|
|
2859
|
+
* 获取 PK 业务处理器
|
|
2860
|
+
*/
|
|
2861
|
+
getRoomPKHandler(): {
|
|
2862
|
+
code: RCRTCCode;
|
|
2863
|
+
roomPKHandler?: RCLivingPKHandler;
|
|
2864
|
+
};
|
|
2865
|
+
/**
|
|
2866
|
+
* 退出 PK 房间
|
|
2867
|
+
*/
|
|
2868
|
+
protected _quitPKRoom(): void;
|
|
2569
2869
|
}
|
|
2570
2870
|
|
|
2571
2871
|
/**
|
|
@@ -2687,6 +2987,7 @@ declare class RCRTCClient {
|
|
|
2687
2987
|
* 获取直播观众客户端
|
|
2688
2988
|
*/
|
|
2689
2989
|
getAudienceClient(): RCAudienceClient;
|
|
2990
|
+
private _getJoinedPKRooms;
|
|
2690
2991
|
private _onIMStatusChange;
|
|
2691
2992
|
private _onIMDisconnect;
|
|
2692
2993
|
private _onIMUninit;
|
|
@@ -2797,6 +3098,7 @@ declare class RCRTCClient {
|
|
|
2797
3098
|
joinLivingRoomAsAudience(roomId: string, livingType: RCLivingType): Promise<{
|
|
2798
3099
|
room?: RCAudienceLivingRoom;
|
|
2799
3100
|
code: RCRTCCode;
|
|
3101
|
+
remoteInfo?: IAudienceJoinRoomResInfo;
|
|
2800
3102
|
}>;
|
|
2801
3103
|
/**
|
|
2802
3104
|
* 观众退出并销毁当前房间实例,退出后该房间的所有方法将不可用
|
|
@@ -2819,13 +3121,13 @@ declare class RCRTCClient {
|
|
|
2819
3121
|
downgradeToAudienceRoom(room: RCLivingRoom): Promise<{
|
|
2820
3122
|
room?: RCAudienceLivingRoom;
|
|
2821
3123
|
code: RCRTCCode;
|
|
3124
|
+
remoteInfo?: IAudienceJoinRoomResInfo;
|
|
2822
3125
|
}>;
|
|
2823
3126
|
/**
|
|
2824
3127
|
* 获取在房间内用户信息
|
|
2825
|
-
*
|
|
2826
|
-
* @since version 5.1.5
|
|
3128
|
+
* @since version 5.2.1
|
|
2827
3129
|
*/
|
|
2828
|
-
|
|
3130
|
+
getJoinedRoomInfo(): Promise<{
|
|
2829
3131
|
code: RCRTCCode;
|
|
2830
3132
|
data?: IRTCJoinedInfo[];
|
|
2831
3133
|
}>;
|
|
@@ -2878,4 +3180,4 @@ declare const helper: {
|
|
|
2878
3180
|
ifSupportScreenShare: typeof ifSupportScreenShare;
|
|
2879
3181
|
};
|
|
2880
3182
|
|
|
2881
|
-
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 };
|
|
3183
|
+
export { BackgroundPictureFillMode, ICameraVideoProfile, IMCUOutputConfig, IMCUOutputVideoConfig, IMicphoneAudioProfile, IPKEndInfo, IPKInviteAnswerInfo, IPKInviteInfo, IPublishAttrs, IPublishedResource, IRCCandidatePairStat, IRCRTCInitOptions, IRCRTCReportListener, IRCRTCStateReport, IRCTrackStat, 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 };
|