@rongcloud/plugin-rtc 5.6.11 → 5.6.12
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 +16 -10
- package/dist/index.esm.js +23 -14
- package/dist/index.umd.js +35 -35
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -236,7 +236,7 @@ declare abstract class RCTrack extends EventEmitter {
|
|
|
236
236
|
* 发布者是否已禁用该轨道数据,在 RCLocalTrack 实例中,则其值始终等于 `isLocalMuted()`
|
|
237
237
|
*/
|
|
238
238
|
isOwnerMuted(): boolean;
|
|
239
|
-
|
|
239
|
+
protected _element?: HTMLMediaElement;
|
|
240
240
|
/**
|
|
241
241
|
* 播放
|
|
242
242
|
* @param element 用于承载媒体流的元素标签,音频流可传空
|
|
@@ -441,7 +441,7 @@ declare class RCScreenVideoTrack extends RCLocalVideoTrack {
|
|
|
441
441
|
declare class RCScreenAudioTrack extends RCLocalAudioTrack {
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
-
declare class RCRemoteTrack extends RCTrack {
|
|
444
|
+
declare abstract class RCRemoteTrack extends RCTrack {
|
|
445
445
|
constructor(logger: BasicLogger, tag: string, userId: string, kind: 'audio' | 'video', roomId?: string);
|
|
446
446
|
/**
|
|
447
447
|
* 根据房间数据更新状态
|
|
@@ -458,6 +458,12 @@ declare class RCRemoteTrack extends RCTrack {
|
|
|
458
458
|
}
|
|
459
459
|
declare class RCRemoteAudioTrack extends RCRemoteTrack {
|
|
460
460
|
constructor(logger: BasicLogger, tag: string, userId: string, roomId?: string);
|
|
461
|
+
/**
|
|
462
|
+
* 获取播放时指定的输出音量。若当前未播放,则返回 0。
|
|
463
|
+
* 注意:该音量为对媒体输出设备设定的输出音量,与当前音频内容的 audioLevel 是不同概念。
|
|
464
|
+
* @since - v5.6.12
|
|
465
|
+
*/
|
|
466
|
+
getVolume(): number;
|
|
461
467
|
}
|
|
462
468
|
declare class RCRemoteVideoTrack extends RCRemoteTrack {
|
|
463
469
|
constructor(logger: BasicLogger, tag: string, userId: string, roomId?: string);
|
|
@@ -1065,8 +1071,8 @@ declare abstract class ReadableStore {
|
|
|
1065
1071
|
protected _roomStatusVersion: number;
|
|
1066
1072
|
constructor(_logger: BasicLogger, clientSessionId: string, appkey: string, roomId: string, crtUserId: string, roomMode: RTCMode, isUpgrade?: boolean | undefined, isMainRoom?: boolean | undefined);
|
|
1067
1073
|
getResourcesByUserId(userId: string): IPublishedResource[] | undefined;
|
|
1068
|
-
getRemoteTrack(trackId: string):
|
|
1069
|
-
getRemoteTracksByUserId(userId: string):
|
|
1074
|
+
getRemoteTrack(trackId: string): RCRemoteAudioTrack | RCRemoteVideoTrack | undefined;
|
|
1075
|
+
getRemoteTracksByUserId(userId: string): (RCRemoteAudioTrack | RCRemoteVideoTrack)[];
|
|
1070
1076
|
getRemoteTracks(): {
|
|
1071
1077
|
[trackId: string]: RCRemoteAudioTrack | RCRemoteVideoTrack;
|
|
1072
1078
|
};
|
|
@@ -1095,7 +1101,7 @@ declare class Store extends ReadableStore {
|
|
|
1095
1101
|
setResourcesByUserId(userId: string, arr: IPublishedResource[]): void;
|
|
1096
1102
|
removeRemoteTrack(trackId: string): void;
|
|
1097
1103
|
removeResourcesByUserId(userId: string): void;
|
|
1098
|
-
addRemoteTrack(track:
|
|
1104
|
+
addRemoteTrack(track: RCRemoteAudioTrack | RCRemoteVideoTrack): void;
|
|
1099
1105
|
removeRemoteTracks(): void;
|
|
1100
1106
|
setCDNEnabel(bool: boolean): void;
|
|
1101
1107
|
setCDNUris(uris: ICDNUris | null): void;
|
|
@@ -3697,7 +3703,7 @@ declare class RCLivingPKHandler {
|
|
|
3697
3703
|
* 发起跨房间连麦请求
|
|
3698
3704
|
* @param inviteeRoomId 被邀请者所处的房间 roomId
|
|
3699
3705
|
* @param inviteeUserId 被邀请者 userId
|
|
3700
|
-
* @param options.autoMix
|
|
3706
|
+
* @param options.autoMix 是否将本房间资源合并到被邀请者所处房间的 MCU 合流中
|
|
3701
3707
|
* @param options.extra 拓展字段,可随邀请连麦消息透传给被邀请者
|
|
3702
3708
|
*/
|
|
3703
3709
|
requestJoinOtherRoom(inviteeRoomId: string, inviteeUserId: string, options?: IReqResPKOptions): Promise<{
|
|
@@ -3717,7 +3723,7 @@ declare class RCLivingPKHandler {
|
|
|
3717
3723
|
* @param inviterRoomId 邀请者所处的房间 roomId
|
|
3718
3724
|
* @param inviterUserId 邀请者 userId
|
|
3719
3725
|
* @param agree 是否同意连麦
|
|
3720
|
-
* @param options.autoMix
|
|
3726
|
+
* @param options.autoMix 是否将本房间资源合并到邀请者所处房间的 MCU 合流中
|
|
3721
3727
|
* @param options.extra 附加信息,可随响应连麦消息透传给邀请者
|
|
3722
3728
|
*/
|
|
3723
3729
|
responseJoinOtherRoom(inviterRoomId: string, inviterUserId: string, agree: boolean, options?: IReqResPKOptions): Promise<{
|
|
@@ -4053,7 +4059,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
4053
4059
|
* @param trackId
|
|
4054
4060
|
* @returns
|
|
4055
4061
|
*/
|
|
4056
|
-
getRemoteTrack(trackId: string):
|
|
4062
|
+
getRemoteTrack(trackId: string): RCRemoteAudioTrack | RCRemoteVideoTrack | null;
|
|
4057
4063
|
/**
|
|
4058
4064
|
* 获取当前已经订阅的全量资源
|
|
4059
4065
|
* returns subscribedTracks ISubscribeAttr[]
|
|
@@ -4073,8 +4079,8 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
4073
4079
|
registerReportListener(listener: IRCRTCReportListener | null): void;
|
|
4074
4080
|
/**
|
|
4075
4081
|
* 音量上报
|
|
4076
|
-
* @param handler
|
|
4077
|
-
* @param _ -
|
|
4082
|
+
* @param handler 音量事件监听函数
|
|
4083
|
+
* @param _ - 参数已废弃,SDK 默认以每秒一次进行回调~~上报时间间隔~~
|
|
4078
4084
|
*/
|
|
4079
4085
|
onAudioLevelChange(handler: IAudioLevelChangeHandler | null, _?: number): void;
|
|
4080
4086
|
/**
|