@rongcloud/plugin-rtc 5.3.1-alpha.1 → 5.3.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 -8
- package/dist/index.esm.js +15 -13405
- package/dist/index.js +15 -13435
- package/dist/index.umd.js +15 -13439
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.3.
|
|
3
|
-
* CommitId -
|
|
4
|
-
* Thu
|
|
2
|
+
* RCRTC - v5.3.2
|
|
3
|
+
* CommitId - f6a1d352339c5cf1f9d56f7e73f887fe69b6198a
|
|
4
|
+
* Thu Feb 24 2022 17:58:08 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
|
-
import { EventEmitter, LogLevel, RTCMode, IRuntime, RTCPluginContext, IServerRTCRoomEntry, IReceivedMessage, ErrorCode, IJoinRTCRoomData, KVString, RTCJoinType, IRTCJoinedInfo, IPluginGenerator } from '@rongcloud/engine';
|
|
7
|
+
import { EventEmitter, LogLevel, RTCMode, IRuntime, RTCPluginContext, IServerRTCRoomEntry, IReceivedMessage, ErrorCode, IJoinRTCRoomData, KVString, RTCJoinType, IRTCUserData, IRTCJoinedInfo, IPluginGenerator } from '@rongcloud/engine';
|
|
8
8
|
export { RTCJoinType } from '@rongcloud/engine';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -912,6 +912,19 @@ interface IAudioLevelChangeHandler {
|
|
|
912
912
|
declare type RoomData = {
|
|
913
913
|
[userId: string]: IPublishedResource[];
|
|
914
914
|
};
|
|
915
|
+
/**
|
|
916
|
+
* pkInfo 接口
|
|
917
|
+
*/
|
|
918
|
+
interface IPKInfo {
|
|
919
|
+
[roomId: string]: {
|
|
920
|
+
inviteSessionId: string;
|
|
921
|
+
inviterRoomId: string;
|
|
922
|
+
inviterUserId: string;
|
|
923
|
+
inviterUserAutoMix?: boolean;
|
|
924
|
+
inviteeRoomId: string;
|
|
925
|
+
inviteeUserAutoMix?: boolean;
|
|
926
|
+
};
|
|
927
|
+
}
|
|
915
928
|
/**
|
|
916
929
|
* 业务层发起连麦、响应连麦可选参数定义
|
|
917
930
|
*/
|
|
@@ -2111,6 +2124,7 @@ interface IRoomPKEventListener {
|
|
|
2111
2124
|
onFinishOtherRoom: (info: IPKEndInfo) => {};
|
|
2112
2125
|
}
|
|
2113
2126
|
declare class RCLivingPKHandler {
|
|
2127
|
+
private _PKInfo;
|
|
2114
2128
|
private readonly _context;
|
|
2115
2129
|
private readonly _runtime;
|
|
2116
2130
|
private readonly _service;
|
|
@@ -2135,14 +2149,13 @@ declare class RCLivingPKHandler {
|
|
|
2135
2149
|
/**
|
|
2136
2150
|
* PK 房间信息
|
|
2137
2151
|
*/
|
|
2138
|
-
private _PKInfo;
|
|
2139
2152
|
private _appListener;
|
|
2140
2153
|
private _mainRoomId;
|
|
2141
2154
|
/**
|
|
2142
2155
|
* 跨房间连麦加入的 PK 房间
|
|
2143
2156
|
*/
|
|
2144
2157
|
private _joinedPKRooms;
|
|
2145
|
-
constructor(_context: RTCPluginContext, _runtime: IRuntime, _service: RCMediaService, _initOptions: IRCRTCInitOptions,
|
|
2158
|
+
constructor(_PKInfo: IPKInfo, _context: RTCPluginContext, _runtime: IRuntime, _service: RCMediaService, _initOptions: IRCRTCInitOptions,
|
|
2146
2159
|
/**
|
|
2147
2160
|
* 主直播房间
|
|
2148
2161
|
*/
|
|
@@ -2248,6 +2261,10 @@ declare class RCLivingPKHandler {
|
|
|
2248
2261
|
inviteeRoomId: string;
|
|
2249
2262
|
inviteeUserAutoMix?: boolean | undefined;
|
|
2250
2263
|
};
|
|
2264
|
+
/**
|
|
2265
|
+
* 获取所有连麦信息
|
|
2266
|
+
*/
|
|
2267
|
+
getAllPKInfo(): IPKInfo;
|
|
2251
2268
|
/**
|
|
2252
2269
|
* 获取已加入的副房间
|
|
2253
2270
|
*/
|
|
@@ -2915,6 +2932,10 @@ declare class RCLivingRoom extends RCAbstractRoom {
|
|
|
2915
2932
|
* 退出所有连麦房间
|
|
2916
2933
|
*/
|
|
2917
2934
|
protected _quitAllPKRoom(): void;
|
|
2935
|
+
/**
|
|
2936
|
+
* 是否是主房间
|
|
2937
|
+
*/
|
|
2938
|
+
isMainRoom(): boolean;
|
|
2918
2939
|
}
|
|
2919
2940
|
|
|
2920
2941
|
/**
|
|
@@ -3005,6 +3026,7 @@ declare class RCRTCClient {
|
|
|
3005
3026
|
* 获取加入的连麦房间
|
|
3006
3027
|
*/
|
|
3007
3028
|
private _getJoinedPKRoomList;
|
|
3029
|
+
private _getPKRoomIds;
|
|
3008
3030
|
/**
|
|
3009
3031
|
* 获取当前用户 Id,若 IM 未连接,这返回 `''`
|
|
3010
3032
|
* @returns
|
|
@@ -3014,8 +3036,10 @@ declare class RCRTCClient {
|
|
|
3014
3036
|
/**
|
|
3015
3037
|
* 加入普通音视频房间
|
|
3016
3038
|
* @param roomId
|
|
3039
|
+
* @param joinType 多端处理方式
|
|
3040
|
+
* @param outerUserDatas 业务层设置人员属性
|
|
3017
3041
|
*/
|
|
3018
|
-
joinRTCRoom(roomId: string, joinType?: RTCJoinType): Promise<{
|
|
3042
|
+
joinRTCRoom(roomId: string, joinType?: RTCJoinType, outerUserDatas?: IRTCUserData): Promise<{
|
|
3019
3043
|
room?: RCRTCRoom;
|
|
3020
3044
|
code: RCRTCCode;
|
|
3021
3045
|
userIds?: string[];
|
|
@@ -3026,8 +3050,10 @@ declare class RCRTCClient {
|
|
|
3026
3050
|
* 主播加入直播房间或观众上麦场景调用,观众上麦之前需先取消已订阅的直播间资源
|
|
3027
3051
|
* @param roomId 房间 Id
|
|
3028
3052
|
* @param livingType 直播间类型,`RCLivingType.AUDIO` 为音频直播,`RCLivingType.VIDEO` 为音视频直播
|
|
3053
|
+
* @param joinType 多端处理方式
|
|
3054
|
+
* @param outerUserDatas 业务层设置人员属性
|
|
3029
3055
|
*/
|
|
3030
|
-
joinLivingRoom(roomId: string, livingType: RCLivingType): Promise<{
|
|
3056
|
+
joinLivingRoom(roomId: string, livingType: RCLivingType, joinType?: RTCJoinType, outerUserDatas?: IRTCUserData): Promise<{
|
|
3031
3057
|
room?: RCLivingRoom;
|
|
3032
3058
|
code: RCRTCCode;
|
|
3033
3059
|
userIds?: string[];
|