@hysc/meeting 1.6.15 → 1.6.16
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/esm/BMChat/BMChatVM.d.ts +24 -24
- package/esm/BMChat/BMMessageInfo.d.ts +27 -27
- package/esm/BMRoom/BMLiveVM.d.ts +35 -35
- package/esm/BMUser/BMUser.d.ts +147 -147
- package/esm/BMUser/BMUserVM.d.ts +137 -137
- package/esm/boom-meeting/src/BMChat/BMChatVM.d.ts +1 -1
- package/esm/boom-meeting/src/BMRoom/attachEvents.d.ts +4 -2
- package/esm/boom-meeting/src/BMStream/BMStreamModel.d.ts +1 -1
- package/esm/boom-meeting/src/BMUser/BMUser.d.ts +1 -1
- package/{umd → esm/boom-meeting/src}/BMUser/BMUserVM.d.ts +0 -0
- package/{umd → esm/boom-meeting/src}/constants.d.ts +0 -0
- package/esm/constants.d.ts +83 -83
- package/esm/index.js +1 -1
- package/esm/index.js.map +3 -3
- package/esm/util/emitter.d.ts +18 -18
- package/package.json +1 -1
- package/umd/boom-meeting/src/BMChat/BMChatVM.d.ts +1 -1
- package/umd/boom-meeting/src/BMRoom/attachEvents.d.ts +4 -2
- package/umd/boom-meeting/src/BMStream/BMStreamModel.d.ts +1 -1
- package/umd/boom-meeting/src/BMUser/BMUser.d.ts +1 -1
- package/umd/boom-meeting/src/BMUser/BMUserVM.d.ts +137 -0
- package/umd/boom-meeting/src/constants.d.ts +83 -0
- package/umd/index.js +1 -1
- package/esm/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +0 -189
- package/esm/boom-meeting/src/BMRoom/BMRoomVM.d.ts +0 -278
- package/esm/boom-meeting/src/BMRoom/RoomEvent.d.ts +0 -1
- package/esm/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +0 -232
- package/esm/boom-meeting/src/bjy-common/function/debounce.d.ts +0 -9
- package/esm/boom-meeting/src/bjy-common/function/isDef.d.ts +0 -1
- package/esm/boom-meeting/src/bjy-common/function/isUndef.d.ts +0 -1
- package/esm/boom-meeting/src/bjy-common/function/throttling.d.ts +0 -9
- package/esm/boom-meeting/src/bjy-common/function/toNumber.d.ts +0 -1
- package/esm/boom-meeting/src/bjy-common/type/api.d.ts +0 -66
- package/esm/boom-meeting/src/bjy-common/type/options.d.ts +0 -7
- package/esm/boom-meeting/src/bjy-common/type/type.d.ts +0 -90
- package/esm/boom-meeting/src/bjy-common/util/NextTask.d.ts +0 -28
- package/esm/boom-meeting/src/bjy-common/util/Sleep.d.ts +0 -14
- package/esm/boom-meeting/src/bjy-common/util/Timer.d.ts +0 -13
- package/esm/boom-meeting/src/bjy-common/util/browser.d.ts +0 -6
- package/esm/boom-meeting/src/bjy-common/util/holder.d.ts +0 -6
- package/esm/boom-meeting/src/bjy-common/util/network.d.ts +0 -4
- package/esm/boom-meeting/src/bjy-common/util/os.d.ts +0 -14
- package/esm/boom-meeting/src/error/errorMap.d.ts +0 -70
- package/esm/boom-meeting/src/error/errorType.d.ts +0 -96
- package/esm/boom-meeting/src/logger/logger.d.ts +0 -86
- package/esm/boom-meeting/src/type/customStats.d.ts +0 -117
- package/esm/boom-meeting/src/type/index.d.ts +0 -9
- package/esm/boom-meeting/src/type/stream.d.ts +0 -17
- package/esm/boom-meeting/src/type/user.d.ts +0 -9
- package/esm/boom-meeting/src/types/customStats.d.ts +0 -103
- package/esm/boom-meeting/src/types/index.d.ts +0 -9
- package/esm/boom-meeting/src/types/stream.d.ts +0 -17
- package/esm/boom-meeting/src/types/user.d.ts +0 -11
- package/esm/boom-meeting/src/util/PackLoss.d.ts +0 -7
- package/esm/boom-meeting/src/util/Pqueue.d.ts +0 -61
- package/esm/boom-meeting/src/util/Privileges.d.ts +0 -20
- package/esm/boom-meeting/src/util/ReportCollector.d.ts +0 -22
- package/esm/boom-meeting/src/util/Stutter.d.ts +0 -19
- package/esm/boom-meeting/src/util/base64.d.ts +0 -4
- package/esm/boom-meeting/src/util/checkPermissions.d.ts +0 -1
- package/esm/boom-meeting/src/util/checkSystemRequirements.d.ts +0 -1
- package/esm/boom-meeting/src/util/constant.d.ts +0 -67
- package/esm/boom-meeting/src/util/devices.d.ts +0 -2
- package/esm/boom-meeting/src/util/formatUserId.d.ts +0 -2
- package/esm/boom-meeting/src/util/is.d.ts +0 -70
- package/esm/boom-meeting/src/util/peerToPeerProbe.d.ts +0 -9
- package/esm/boom-meeting/src/util/request.d.ts +0 -45
- package/esm/types/customStats.d.ts +0 -103
- package/esm/types/index.d.ts +0 -9
- package/esm/types/stream.d.ts +0 -17
- package/esm/types/user.d.ts +0 -11
- package/esm/utils/ErrorTypes.d.ts +0 -97
- package/umd/BMChat/BMChatVM.d.ts +0 -24
- package/umd/BMChat/BMMessageInfo.d.ts +0 -27
- package/umd/BMRoom/BMLiveVM.d.ts +0 -35
- package/umd/BMStream/BMSpeaker.d.ts +0 -44
- package/umd/BMUser/BMUser.d.ts +0 -147
- package/umd/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +0 -189
- package/umd/boom-meeting/src/BMRoom/BMRoomVM.d.ts +0 -278
- package/umd/boom-meeting/src/BMRoom/RoomEvent.d.ts +0 -1
- package/umd/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +0 -232
- package/umd/boom-meeting/src/bjy-common/function/debounce.d.ts +0 -9
- package/umd/boom-meeting/src/bjy-common/function/isDef.d.ts +0 -1
- package/umd/boom-meeting/src/bjy-common/function/isUndef.d.ts +0 -1
- package/umd/boom-meeting/src/bjy-common/function/throttling.d.ts +0 -9
- package/umd/boom-meeting/src/bjy-common/function/toNumber.d.ts +0 -1
- package/umd/boom-meeting/src/bjy-common/type/api.d.ts +0 -66
- package/umd/boom-meeting/src/bjy-common/type/options.d.ts +0 -7
- package/umd/boom-meeting/src/bjy-common/type/type.d.ts +0 -90
- package/umd/boom-meeting/src/bjy-common/util/NextTask.d.ts +0 -28
- package/umd/boom-meeting/src/bjy-common/util/Sleep.d.ts +0 -14
- package/umd/boom-meeting/src/bjy-common/util/Timer.d.ts +0 -13
- package/umd/boom-meeting/src/bjy-common/util/browser.d.ts +0 -6
- package/umd/boom-meeting/src/bjy-common/util/holder.d.ts +0 -6
- package/umd/boom-meeting/src/bjy-common/util/network.d.ts +0 -4
- package/umd/boom-meeting/src/bjy-common/util/os.d.ts +0 -14
- package/umd/boom-meeting/src/error/errorMap.d.ts +0 -70
- package/umd/boom-meeting/src/error/errorType.d.ts +0 -96
- package/umd/boom-meeting/src/logger/logger.d.ts +0 -86
- package/umd/boom-meeting/src/type/customStats.d.ts +0 -117
- package/umd/boom-meeting/src/type/index.d.ts +0 -9
- package/umd/boom-meeting/src/type/stream.d.ts +0 -17
- package/umd/boom-meeting/src/type/user.d.ts +0 -9
- package/umd/boom-meeting/src/types/customStats.d.ts +0 -103
- package/umd/boom-meeting/src/types/index.d.ts +0 -9
- package/umd/boom-meeting/src/types/stream.d.ts +0 -17
- package/umd/boom-meeting/src/types/user.d.ts +0 -11
- package/umd/boom-meeting/src/util/PackLoss.d.ts +0 -7
- package/umd/boom-meeting/src/util/Pqueue.d.ts +0 -61
- package/umd/boom-meeting/src/util/Privileges.d.ts +0 -20
- package/umd/boom-meeting/src/util/ReportCollector.d.ts +0 -22
- package/umd/boom-meeting/src/util/Stutter.d.ts +0 -19
- package/umd/boom-meeting/src/util/base64.d.ts +0 -4
- package/umd/boom-meeting/src/util/checkPermissions.d.ts +0 -1
- package/umd/boom-meeting/src/util/checkSystemRequirements.d.ts +0 -1
- package/umd/boom-meeting/src/util/constant.d.ts +0 -67
- package/umd/boom-meeting/src/util/devices.d.ts +0 -2
- package/umd/boom-meeting/src/util/formatUserId.d.ts +0 -2
- package/umd/boom-meeting/src/util/is.d.ts +0 -70
- package/umd/boom-meeting/src/util/peerToPeerProbe.d.ts +0 -9
- package/umd/boom-meeting/src/util/request.d.ts +0 -45
- package/umd/index.js.map +0 -1
- package/umd/util/emitter.d.ts +0 -18
- package/umd/utils/ErrorTypes.d.ts +0 -97
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @name: ErrorTypes
|
|
3
|
-
* @author: yangliye
|
|
4
|
-
* @date: 2022-07-08 11:20
|
|
5
|
-
* @description:ErrorTypes
|
|
6
|
-
* @update: 2022-07-08 11:20
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* boom-core层的错误
|
|
10
|
-
*/
|
|
11
|
-
export declare type ErrorTypes = {
|
|
12
|
-
code: number;
|
|
13
|
-
message: string;
|
|
14
|
-
};
|
|
15
|
-
export declare enum BoomCoreErrorCode {
|
|
16
|
-
'BloudLock' = 28,
|
|
17
|
-
'ShareScreenNoPermission' = 100,
|
|
18
|
-
'ShareScreenCanceled' = 101,
|
|
19
|
-
'ShareScreenOtherError' = 102,
|
|
20
|
-
'ShareScreenContentHintError' = 103,
|
|
21
|
-
'ShareScreenClientJoinedError' = 104,
|
|
22
|
-
'BrtcShareSigError' = 105,
|
|
23
|
-
'ToggleShareScreenError' = 106,
|
|
24
|
-
'BrtcCreateStreamError' = 107,
|
|
25
|
-
'BrtcSubscribeError' = 108,
|
|
26
|
-
'BrtcPublishError' = 109,
|
|
27
|
-
'BrtcUnsubscribeError' = 110,
|
|
28
|
-
'BrtcUnPublishError' = 111,
|
|
29
|
-
'RepeatJoinError' = 112,
|
|
30
|
-
'ProxiesUrlTypeError' = 113,
|
|
31
|
-
'getBloudProxiesUrlError' = 114,
|
|
32
|
-
'JoinUserInfoError' = 115,
|
|
33
|
-
'JoinTypeError' = 116,
|
|
34
|
-
'JoinBrtcError' = 117,
|
|
35
|
-
'JoinBloudError' = 118,
|
|
36
|
-
'UpdateCustomStatsError' = 119,
|
|
37
|
-
'CreateBloudError' = 120
|
|
38
|
-
}
|
|
39
|
-
export declare const ShareScreenNoPermission: ErrorTypes;
|
|
40
|
-
export declare const ShareScreenCanceled: ErrorTypes;
|
|
41
|
-
export declare const ShareScreenOtherError: (msg: string) => ErrorTypes;
|
|
42
|
-
export declare const ShareScreenContentHintError: ErrorTypes;
|
|
43
|
-
export declare const ShareScreenClientJoinedError: ErrorTypes;
|
|
44
|
-
export declare const BrtcShareSigError: ErrorTypes;
|
|
45
|
-
export declare const ToggleShareScreenError: (msg: string) => ErrorTypes;
|
|
46
|
-
export declare const RepeatJoinError: ErrorTypes;
|
|
47
|
-
export declare const ProxiesUrlTypeError: ErrorTypes;
|
|
48
|
-
export declare const getBloudProxiesUrlError: (msg: string) => ErrorTypes;
|
|
49
|
-
export declare const JoinUserInfoError: ErrorTypes;
|
|
50
|
-
export declare const JoinTypeError: ErrorTypes;
|
|
51
|
-
export declare const JoinBrtcError: (msg: string) => ErrorTypes;
|
|
52
|
-
export declare const JoinBloudError: (msg: string) => ErrorTypes;
|
|
53
|
-
export declare const BloudLockError: (msg: string) => ErrorTypes;
|
|
54
|
-
export declare const BrtcCreateStreamError: (msg: string) => ErrorTypes;
|
|
55
|
-
export declare const BrtcSubscribeError: (msg: string) => ErrorTypes;
|
|
56
|
-
export declare const BrtcPublishError: (msg: string) => ErrorTypes;
|
|
57
|
-
export declare const BrtcUnsubscribeError: (msg: string) => ErrorTypes;
|
|
58
|
-
export declare const BrtcUnPublishError: (msg: string) => ErrorTypes;
|
|
59
|
-
export declare const updateCustomStatsError: (msg: string) => ErrorTypes;
|
|
60
|
-
export declare enum BoomMeetingErrorCode {
|
|
61
|
-
'BmJoinError' = 200,
|
|
62
|
-
'BMLeaveError' = 201,
|
|
63
|
-
'BmSetRemoteVideoEnable' = 202,
|
|
64
|
-
'BmSetRemoteAudioEnable' = 203,
|
|
65
|
-
'BmSetLocalVideoEnable' = 204,
|
|
66
|
-
'BmSetLocalAudioEnable' = 205,
|
|
67
|
-
'BmSetLocalSpeakerEnable' = 206,
|
|
68
|
-
'BmChangeMasterError' = 207,
|
|
69
|
-
'BmUpdateManagerError' = 208,
|
|
70
|
-
'BmEvictUserError' = 209,
|
|
71
|
-
'BmUpdateUserError' = 210,
|
|
72
|
-
'BmSetAudioOffError' = 211,
|
|
73
|
-
'BmSetVideoOffError' = 212,
|
|
74
|
-
'BmSetMsgOffError' = 213,
|
|
75
|
-
'BmUpdateCustomStatsError' = 214,
|
|
76
|
-
'BmChangeVideoProfileError' = 215,
|
|
77
|
-
'BmChangeAudioProfileError' = 216,
|
|
78
|
-
'BmCheckDeviceError' = 217
|
|
79
|
-
}
|
|
80
|
-
export declare const BmJoinError: (msg: string) => ErrorTypes;
|
|
81
|
-
export declare const BmLeaveError: (msg: string) => ErrorTypes;
|
|
82
|
-
export declare const BmSetRemoteVideoEnable: (msg: string) => ErrorTypes;
|
|
83
|
-
export declare const BmSetRemoteAudioEnable: (msg: string) => ErrorTypes;
|
|
84
|
-
export declare const BmSetLocalVideoEnable: (msg: string) => ErrorTypes;
|
|
85
|
-
export declare const BmSetLocalAudioEnable: (msg: string) => ErrorTypes;
|
|
86
|
-
export declare const BmSetLocalSpeakerEnable: (msg: string) => ErrorTypes;
|
|
87
|
-
export declare const BmChangeMasterError: (msg: string) => ErrorTypes;
|
|
88
|
-
export declare const BmUpdateManagerError: (msg: string) => ErrorTypes;
|
|
89
|
-
export declare const BmEvictUserError: (msg: string) => ErrorTypes;
|
|
90
|
-
export declare const BmUpdateUserError: (msg: string) => ErrorTypes;
|
|
91
|
-
export declare const BmSetAudioOffError: (msg: string) => ErrorTypes;
|
|
92
|
-
export declare const BmSetVideoOffError: (msg: string) => ErrorTypes;
|
|
93
|
-
export declare const BmSetMsgOffError: (msg: string) => ErrorTypes;
|
|
94
|
-
export declare const BmUpdateCustomStatsError: (msg: string) => ErrorTypes;
|
|
95
|
-
export declare const BmChangeVideoProfileError: (msg: string) => ErrorTypes;
|
|
96
|
-
export declare const BmChangeAudioProfileError: (msg: string) => ErrorTypes;
|
|
97
|
-
export declare const BmCheckDeviceError: (msg: string) => ErrorTypes;
|
package/umd/BMChat/BMChatVM.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import BoomCore from '@hysc/core/esm';
|
|
2
|
-
import BMMessageInfo from './BMMessageInfo';
|
|
3
|
-
import { BehaviorSubject, Subject } from "rxjs";
|
|
4
|
-
import BMUserVM from '../BMUser/BMUserVM';
|
|
5
|
-
import BMRoom from '../BMRoom/BMRoom';
|
|
6
|
-
export default class BMChatVM {
|
|
7
|
-
messageList: Array<BMMessageInfo>;
|
|
8
|
-
boomCore: BoomCore;
|
|
9
|
-
userVM: BMUserVM;
|
|
10
|
-
bmRoom: BMRoom;
|
|
11
|
-
messageListWatcher: BehaviorSubject<Array<BMMessageInfo>>;
|
|
12
|
-
hasDangerMessageWatcher: Subject<boolean>;
|
|
13
|
-
constructor(boomCore: BoomCore, userVM: BMUserVM, bmRoom: BMRoom);
|
|
14
|
-
/**
|
|
15
|
-
* 发送聊天消息
|
|
16
|
-
* @param talkMsg 聊天信息
|
|
17
|
-
*/
|
|
18
|
-
sendMessage(talkMsg: string, userId: string | undefined): Promise<void>;
|
|
19
|
-
addMessage(info: BMMessageInfo, isParticipantNotice: boolean): void;
|
|
20
|
-
/**
|
|
21
|
-
* 获取历史消息
|
|
22
|
-
*/
|
|
23
|
-
getHistoryMessage(): Promise<BMMessageInfo[]>;
|
|
24
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
interface IMessageInfo {
|
|
2
|
-
userId?: string;
|
|
3
|
-
message: string;
|
|
4
|
-
role?: string;
|
|
5
|
-
isLocal?: boolean;
|
|
6
|
-
avatar?: string;
|
|
7
|
-
nickName?: string;
|
|
8
|
-
sendTime?: number;
|
|
9
|
-
isMeetingNotice?: boolean;
|
|
10
|
-
to?: string | undefined;
|
|
11
|
-
isDanger?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export default class BMMessageInfo {
|
|
14
|
-
userId?: any;
|
|
15
|
-
message: string;
|
|
16
|
-
time: string;
|
|
17
|
-
timeStamp: number;
|
|
18
|
-
role?: string;
|
|
19
|
-
isLocal?: boolean;
|
|
20
|
-
avatar?: any;
|
|
21
|
-
nickName?: any;
|
|
22
|
-
isMeetingNotice: boolean;
|
|
23
|
-
to: string | undefined;
|
|
24
|
-
isDanger: boolean | undefined;
|
|
25
|
-
constructor(props: IMessageInfo);
|
|
26
|
-
}
|
|
27
|
-
export {};
|
package/umd/BMRoom/BMLiveVM.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @name: BMLiveVM.ts
|
|
3
|
-
* @author: yangliye
|
|
4
|
-
* @date: 2022-07-15 13:53
|
|
5
|
-
* @description:处理直播相关的流处理
|
|
6
|
-
* @update: 2022-07-15 13:53
|
|
7
|
-
*/
|
|
8
|
-
import BMRoom from "./BMRoom";
|
|
9
|
-
import BMStreamModel from "../BMStream/BMStreamModel";
|
|
10
|
-
declare class BMLiveVM {
|
|
11
|
-
private room;
|
|
12
|
-
constructor(room: BMRoom);
|
|
13
|
-
private get localBMUser();
|
|
14
|
-
private get localIsAudience();
|
|
15
|
-
/**
|
|
16
|
-
* 拉流处理
|
|
17
|
-
* @param bmStreamModel
|
|
18
|
-
*/
|
|
19
|
-
handlePull(bmStreamModel: BMStreamModel): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* 切换大小流处理
|
|
22
|
-
* @param bmStreamModel
|
|
23
|
-
*/
|
|
24
|
-
handleChangeStreamType(bmStreamModel: BMStreamModel): Promise<void>;
|
|
25
|
-
handlePlay(bmStreamModel: BMStreamModel, noPlayChanged: boolean): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* 处理观众端举手发言完了,然后在禁止发言,这个时候,没有必要在拉所有人的流,把除了混流的人的流都取消订阅,然后播放混流的声音
|
|
28
|
-
*/
|
|
29
|
-
handleAudienceDisable(): Promise<void>;
|
|
30
|
-
/**
|
|
31
|
-
* 观众允许发言,允许发言之后,要把所有的流都拉,然后混流静音
|
|
32
|
-
*/
|
|
33
|
-
handleAudienceEnable(): Promise<void>;
|
|
34
|
-
}
|
|
35
|
-
export default BMLiveVM;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import BMUser from '../BMUser/BMUser';
|
|
2
|
-
import { SingleStream } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* @name: BMSpeaker
|
|
5
|
-
* @author: liuxinghai
|
|
6
|
-
* @date: 2022-06-07 11:41
|
|
7
|
-
* @description:BMSpeaker
|
|
8
|
-
* 适配 brtc 流对象到 bloud 流对象接口,
|
|
9
|
-
* 用户辅助采用 bloud SpeakerDetector 做说话人检测
|
|
10
|
-
* @date: 2022-06-07 11:41
|
|
11
|
-
*/
|
|
12
|
-
export default class BMSpeaker {
|
|
13
|
-
private _user;
|
|
14
|
-
private _stream;
|
|
15
|
-
private _emitter;
|
|
16
|
-
constructor(user: BMUser, stream: SingleStream);
|
|
17
|
-
/**
|
|
18
|
-
* 获取对象 ID 标识,此处使用流 ID 标识
|
|
19
|
-
* @returns
|
|
20
|
-
*/
|
|
21
|
-
getID(): string;
|
|
22
|
-
/**
|
|
23
|
-
* 获取用户 BMUser 对象
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
|
-
getUser(): BMUser;
|
|
27
|
-
/**
|
|
28
|
-
* 监听事件
|
|
29
|
-
*
|
|
30
|
-
* @param type 事件类型
|
|
31
|
-
* @param fn 事件回调
|
|
32
|
-
* @return 实例本身 {@link Client}
|
|
33
|
-
*/
|
|
34
|
-
on(type: string, fn: Function): this;
|
|
35
|
-
/**
|
|
36
|
-
* 启动音频音量检测
|
|
37
|
-
*/
|
|
38
|
-
collectAudioLevel(): void;
|
|
39
|
-
private handleAudioLevel;
|
|
40
|
-
/**
|
|
41
|
-
* 关闭音频音量检测
|
|
42
|
-
*/
|
|
43
|
-
close(): void;
|
|
44
|
-
}
|
package/umd/BMUser/BMUser.d.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import BMStreamModel from '../BMStream/BMStreamModel';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import BCUser from '@hysc/core/esm/BoomAdapter/User/User';
|
|
4
|
-
import BMRoom from '../BMRoom/BMRoom';
|
|
5
|
-
declare type Operation = 'none' | 'getMaster' | 'getManager' | 'removeMaster' | 'getGuest' | 'removeGuest' | 'removeManager' | 'changeNickName' | 'speakerEnable' | 'changeShare' | 'updateUser' | 'raiseHandsVideo' | 'raiseHandsAudio' | 'audienceEnableSpeaking';
|
|
6
|
-
interface IUserActionWatcher {
|
|
7
|
-
operation: Operation;
|
|
8
|
-
user: BMUser;
|
|
9
|
-
}
|
|
10
|
-
interface UserInfo {
|
|
11
|
-
avatar: string;
|
|
12
|
-
jointime: number;
|
|
13
|
-
nickname: string;
|
|
14
|
-
pos: string;
|
|
15
|
-
userId: string;
|
|
16
|
-
status?: {
|
|
17
|
-
audioRaiseHands: boolean;
|
|
18
|
-
videoRaiseHands: boolean;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export interface RaiseHandInfo {
|
|
22
|
-
status: 'raiseHandsAudio' | 'raiseHandsVideo';
|
|
23
|
-
user: BMUser;
|
|
24
|
-
}
|
|
25
|
-
export default class BMUser {
|
|
26
|
-
/**
|
|
27
|
-
* 用户id
|
|
28
|
-
*/
|
|
29
|
-
userId: string;
|
|
30
|
-
/**
|
|
31
|
-
* 用户信息
|
|
32
|
-
*/
|
|
33
|
-
userInfo: UserInfo;
|
|
34
|
-
nickName: string;
|
|
35
|
-
isMaster: boolean;
|
|
36
|
-
isManager: boolean;
|
|
37
|
-
mirror: boolean;
|
|
38
|
-
isLocal: boolean;
|
|
39
|
-
isToupingma: boolean;
|
|
40
|
-
hasMultiple: boolean;
|
|
41
|
-
isCreate: boolean;
|
|
42
|
-
hasShare: boolean;
|
|
43
|
-
audienceEnableSpeaking: boolean;
|
|
44
|
-
/** 头像 */
|
|
45
|
-
avatar: string;
|
|
46
|
-
private streamModels;
|
|
47
|
-
permission: any;
|
|
48
|
-
/**
|
|
49
|
-
* 监听器, 监听返回对象属性
|
|
50
|
-
* @property {string} operation
|
|
51
|
-
* 'getManager':获得管理员权限/成为联席主持人
|
|
52
|
-
* 'getMaster':成为主持人
|
|
53
|
-
* 'removeManager':取消管理员权限/取消联席主持人
|
|
54
|
-
* 'removeMaster':取消主持人
|
|
55
|
-
* 'changeNickName':改变昵称
|
|
56
|
-
* 'speakerEnable':扬声器开关状态改变
|
|
57
|
-
* 'changeShare': 是否在屏幕共享
|
|
58
|
-
* 'raiseHandsVideo': 是否视频举手
|
|
59
|
-
* 'raiseHandsAudio': 是否音频举手
|
|
60
|
-
* @property {BMUser} user
|
|
61
|
-
*/
|
|
62
|
-
watcher: BehaviorSubject<IUserActionWatcher>;
|
|
63
|
-
/**
|
|
64
|
-
* 排序
|
|
65
|
-
*/
|
|
66
|
-
sortNum: number;
|
|
67
|
-
/**
|
|
68
|
-
* 举手相关
|
|
69
|
-
*/
|
|
70
|
-
raiseVideoHands: boolean;
|
|
71
|
-
raiseAudioHands: boolean;
|
|
72
|
-
isAudience: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* 是不是普通参会者
|
|
75
|
-
*/
|
|
76
|
-
isCommonUser: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* 是不是web端入会
|
|
79
|
-
*/
|
|
80
|
-
get isWeb(): boolean;
|
|
81
|
-
constructor(user: any, isLocal?: boolean);
|
|
82
|
-
setup(userId: string, userinfo: UserInfo, nickname: string): void;
|
|
83
|
-
getMainStreamModel(): BMStreamModel | undefined;
|
|
84
|
-
getShareStreamModel(): BMStreamModel | undefined;
|
|
85
|
-
/**
|
|
86
|
-
* 获取用户麦克风开启状态
|
|
87
|
-
*/
|
|
88
|
-
get audioEnable(): boolean;
|
|
89
|
-
get isMixer(): boolean;
|
|
90
|
-
/**
|
|
91
|
-
* 获取用户视频开启状态
|
|
92
|
-
*/
|
|
93
|
-
get videoEnable(): boolean;
|
|
94
|
-
get isSharing(): boolean;
|
|
95
|
-
/**
|
|
96
|
-
* 是否是信号源
|
|
97
|
-
*/
|
|
98
|
-
get isSignal(): boolean;
|
|
99
|
-
/**
|
|
100
|
-
* 检测当前用户是否有主持人权限
|
|
101
|
-
*/
|
|
102
|
-
checkLocalHasMaster(): boolean;
|
|
103
|
-
/**
|
|
104
|
-
* 给用户添加流
|
|
105
|
-
* @param streamId
|
|
106
|
-
* @param stream 流
|
|
107
|
-
*/
|
|
108
|
-
addStream(streamId: string, stream: BMStreamModel): void;
|
|
109
|
-
/**
|
|
110
|
-
* 删除流
|
|
111
|
-
* @param streamId
|
|
112
|
-
*/
|
|
113
|
-
removeStream(streamId: string): void;
|
|
114
|
-
/**
|
|
115
|
-
* 获取用户id
|
|
116
|
-
*/
|
|
117
|
-
getID(): string;
|
|
118
|
-
/**
|
|
119
|
-
* 获取用户昵称
|
|
120
|
-
*/
|
|
121
|
-
getNickName(): string;
|
|
122
|
-
/**
|
|
123
|
-
* 获取用户信息
|
|
124
|
-
*/
|
|
125
|
-
getUserInfo(): UserInfo;
|
|
126
|
-
/**
|
|
127
|
-
* 获取用户流信息
|
|
128
|
-
*/
|
|
129
|
-
getStreams(): Map<string, BMStreamModel>;
|
|
130
|
-
/**
|
|
131
|
-
* updateUserInfo更新用户信息(除了isMaster,isMaster是通过change-master事件改变的)
|
|
132
|
-
* @param bcUser
|
|
133
|
-
* @param participant
|
|
134
|
-
* @param bmRoom
|
|
135
|
-
* @returns
|
|
136
|
-
*/
|
|
137
|
-
updateUserInfo(bcUser: BCUser, participant: any, bmRoom: BMRoom): void;
|
|
138
|
-
/** 是否有管理权限, 是主持人或联席主持人之一 */
|
|
139
|
-
hasManager(): boolean;
|
|
140
|
-
/** 获取用户后面的身份标识 */
|
|
141
|
-
getNicknameSuffix(): string;
|
|
142
|
-
/**
|
|
143
|
-
* 更新当前用户的排序
|
|
144
|
-
*/
|
|
145
|
-
updateSortNum(): void;
|
|
146
|
-
}
|
|
147
|
-
export {};
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @name: BMRoomInfo
|
|
3
|
-
* @author: yangliye
|
|
4
|
-
* @date: 2022-05-18 13:52
|
|
5
|
-
* @description:BMRoomInfo
|
|
6
|
-
* @update: 2022-05-18 13:52
|
|
7
|
-
*/
|
|
8
|
-
import { BehaviorSubject, Subject } from 'rxjs';
|
|
9
|
-
import { audioOffWatcherValue } from '../type';
|
|
10
|
-
import BMRoom from './BMRoom';
|
|
11
|
-
import BMUser from '../BMUser/BMUser';
|
|
12
|
-
import { CloudRecord, FilePermission } from "./BMRoomVM";
|
|
13
|
-
interface OperationCustomStats {
|
|
14
|
-
/**
|
|
15
|
-
* 是否允许点赞 0 不可用 1可用
|
|
16
|
-
*/
|
|
17
|
-
giveLikeEnable: 0 | 1;
|
|
18
|
-
/**
|
|
19
|
-
* 聊天是否可以用 0 不可用 1可用 2仅主持人 3嘉宾
|
|
20
|
-
*/
|
|
21
|
-
chatEnable: 0 | 1 | 2 | 3;
|
|
22
|
-
/**
|
|
23
|
-
* 上传文档权限 设置-文档上传模式 0仅主持人 1 嘉宾 2 全员
|
|
24
|
-
*/
|
|
25
|
-
fileUpdateModel: FilePermission;
|
|
26
|
-
/**
|
|
27
|
-
* 文档查看权限 设置-文档查看模式 0仅主持人 1 嘉宾 2 全员
|
|
28
|
-
*/
|
|
29
|
-
fileUpdateLook: FilePermission;
|
|
30
|
-
/**
|
|
31
|
-
* 文档下载权限 设置-文档下载模式 0仅主持人 1 嘉宾 2 全员
|
|
32
|
-
*/
|
|
33
|
-
fileUpdateDown: FilePermission;
|
|
34
|
-
/**
|
|
35
|
-
* 文档编辑权限 设置-文档编辑模式 0仅主持人 1 嘉宾 2 全员
|
|
36
|
-
*/
|
|
37
|
-
fileUpdateEdit: FilePermission;
|
|
38
|
-
/**
|
|
39
|
-
* 共享屏幕权限 设置-屏幕共享模式 0仅主持人 1全员
|
|
40
|
-
*/
|
|
41
|
-
screenShareModel: 0 | 1;
|
|
42
|
-
/**
|
|
43
|
-
* 是否仅一人共享 1:是 2:否
|
|
44
|
-
*/
|
|
45
|
-
onlyOnePersonShare: 0 | 1;
|
|
46
|
-
/**
|
|
47
|
-
* 云录对象
|
|
48
|
-
* recordStatus 录制状态:0=暂未开始,1=录制中,2=申请中
|
|
49
|
-
* userId:开启人
|
|
50
|
-
*/
|
|
51
|
-
cloudRecord: CloudRecord;
|
|
52
|
-
/**
|
|
53
|
-
* 入会时麦克风权限 0全员 1嘉宾 2主持人
|
|
54
|
-
*/
|
|
55
|
-
joinAudioEnable: 0 | 1 | 2;
|
|
56
|
-
/**
|
|
57
|
-
* 入会时开启摄像头权限 0全员 1嘉宾 2主持人
|
|
58
|
-
*/
|
|
59
|
-
joinVideoEnable: 0 | 1 | 2;
|
|
60
|
-
/**
|
|
61
|
-
* 参会者列表权限 0全员 1嘉宾 2主持人
|
|
62
|
-
*/
|
|
63
|
-
userListEnable: 0 | 1 | 2;
|
|
64
|
-
/**
|
|
65
|
-
* 会议中是否允许开启麦克风 0全员 1嘉宾 2主持人
|
|
66
|
-
*/
|
|
67
|
-
audioEnable: 0 | 1 | 2;
|
|
68
|
-
/**
|
|
69
|
-
* 会议中是否允许开启摄像头 0全员 1嘉宾 2主持人
|
|
70
|
-
*/
|
|
71
|
-
videoEnable: 0 | 1 | 2;
|
|
72
|
-
/**
|
|
73
|
-
* 是否允许自行改名 0全员 1嘉宾
|
|
74
|
-
*/
|
|
75
|
-
modifyNameEnable: 0 | 1;
|
|
76
|
-
/**
|
|
77
|
-
* 是否允许开启虚拟背景 0全员 1嘉宾 2主持人
|
|
78
|
-
*/
|
|
79
|
-
backgroundAIEnable: 0 | 1 | 2;
|
|
80
|
-
}
|
|
81
|
-
export default class BMRoomInfo {
|
|
82
|
-
private room;
|
|
83
|
-
/**
|
|
84
|
-
* 房间名
|
|
85
|
-
*/
|
|
86
|
-
private _roomName;
|
|
87
|
-
/**
|
|
88
|
-
* 消息序列号
|
|
89
|
-
*/
|
|
90
|
-
msgSeq: string;
|
|
91
|
-
/**
|
|
92
|
-
* 房间 号
|
|
93
|
-
*/
|
|
94
|
-
roomID: string;
|
|
95
|
-
/**
|
|
96
|
-
* 是否全员静音(业务端用)
|
|
97
|
-
*/
|
|
98
|
-
audioOff: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* 是否可以自行开启(业务端用)
|
|
101
|
-
*/
|
|
102
|
-
selfopenaudio: boolean;
|
|
103
|
-
/**
|
|
104
|
-
* 是否锁定
|
|
105
|
-
*/
|
|
106
|
-
private lock;
|
|
107
|
-
/**
|
|
108
|
-
* 离开提示
|
|
109
|
-
*/
|
|
110
|
-
private leaveNotice;
|
|
111
|
-
/**
|
|
112
|
-
* 全员静音状态下是否允许打开麦克风
|
|
113
|
-
* @private
|
|
114
|
-
*/
|
|
115
|
-
private openSelf;
|
|
116
|
-
/**
|
|
117
|
-
* 通知公告信息
|
|
118
|
-
*/
|
|
119
|
-
chatNotice: string;
|
|
120
|
-
/**
|
|
121
|
-
* 通知公告信息富文本
|
|
122
|
-
*/
|
|
123
|
-
chatNoticeRich: string;
|
|
124
|
-
/**
|
|
125
|
-
* 所有的音频举手人员
|
|
126
|
-
*/
|
|
127
|
-
private raiseHandsList;
|
|
128
|
-
raiseHandsWatcher: BehaviorSubject<BMUser[]>;
|
|
129
|
-
/**
|
|
130
|
-
* 所有的视频举手的人员
|
|
131
|
-
*/
|
|
132
|
-
private raiseVideoHandsList;
|
|
133
|
-
raiseVideoHandsWatcher: BehaviorSubject<BMUser[]>;
|
|
134
|
-
operationPermission: OperationCustomStats | undefined;
|
|
135
|
-
operationPermissionWatcher: Subject<OperationCustomStats>;
|
|
136
|
-
chatNoticeWatcher: Subject<unknown>;
|
|
137
|
-
totalUserWatcher: BehaviorSubject<number>;
|
|
138
|
-
constructor();
|
|
139
|
-
get roomName(): string;
|
|
140
|
-
/**
|
|
141
|
-
* 判断是不是大房间使用
|
|
142
|
-
*/
|
|
143
|
-
get isBigRoom(): boolean;
|
|
144
|
-
setup(info: any): void;
|
|
145
|
-
bindRoom(room: BMRoom): void;
|
|
146
|
-
initCustomStats(customStats: any): void;
|
|
147
|
-
updateOperationPermission(stats: any): void;
|
|
148
|
-
private handleInitParams;
|
|
149
|
-
audioOffWatcher: Subject<audioOffWatcherValue>;
|
|
150
|
-
lockWatcher: BehaviorSubject<boolean>;
|
|
151
|
-
leaveNoticeWatcher: BehaviorSubject<boolean>;
|
|
152
|
-
openSelfWatcher: BehaviorSubject<boolean>;
|
|
153
|
-
/**
|
|
154
|
-
* 设置是否全员静音
|
|
155
|
-
* @param audioOff
|
|
156
|
-
* @param selfopenaudio 是否可以自行开启
|
|
157
|
-
*/
|
|
158
|
-
setAudioOff(audioOff: boolean, selfopenaudio: boolean): void;
|
|
159
|
-
/**
|
|
160
|
-
* 设置是否锁定
|
|
161
|
-
* @param lock
|
|
162
|
-
*/
|
|
163
|
-
setlock(lock: boolean): void;
|
|
164
|
-
setLeaveNotice(leaveNotice: boolean): void;
|
|
165
|
-
setRaiseHandsList(userList: BMUser[]): void;
|
|
166
|
-
/**
|
|
167
|
-
* 音频举手处理
|
|
168
|
-
* @param user
|
|
169
|
-
*/
|
|
170
|
-
addRaiseHandUser(user: BMUser): void;
|
|
171
|
-
/**
|
|
172
|
-
* 取消音频举手处理
|
|
173
|
-
* @param user
|
|
174
|
-
*/
|
|
175
|
-
removeRaiseHandUser(user: BMUser): void;
|
|
176
|
-
/**
|
|
177
|
-
* 视频举手处理
|
|
178
|
-
* @param user
|
|
179
|
-
*/
|
|
180
|
-
addVideoRaiseHandUser(user: BMUser): void;
|
|
181
|
-
/**
|
|
182
|
-
* 取消视频举手处理
|
|
183
|
-
* @param user
|
|
184
|
-
*/
|
|
185
|
-
removeVideoRaiseHandUser(user: BMUser): void;
|
|
186
|
-
private setRaiseHandsWatcherValue;
|
|
187
|
-
private setVideoRaiseHandsWatcherValue;
|
|
188
|
-
}
|
|
189
|
-
export {};
|