@hysc/meeting 1.6.16 → 1.6.17
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/BMStream/BMStreamModel.d.ts +2 -0
- package/esm/BMUser/BMUser.d.ts +151 -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/BMRoomInfo.d.ts +189 -0
- package/esm/boom-meeting/src/BMRoom/BMRoomVM.d.ts +278 -0
- package/esm/boom-meeting/src/BMRoom/RoomEvent.d.ts +1 -0
- package/esm/boom-meeting/src/BMRoom/attachEvents.d.ts +2 -4
- package/esm/boom-meeting/src/BMStream/BMStreamModel.d.ts +1 -1
- package/esm/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +232 -0
- package/esm/boom-meeting/src/BMUser/BMUser.d.ts +1 -1
- package/esm/boom-meeting/src/bjy-common/function/debounce.d.ts +9 -0
- package/esm/boom-meeting/src/bjy-common/function/isDef.d.ts +1 -0
- package/esm/boom-meeting/src/bjy-common/function/isUndef.d.ts +1 -0
- package/esm/boom-meeting/src/bjy-common/function/throttling.d.ts +9 -0
- package/esm/boom-meeting/src/bjy-common/function/toNumber.d.ts +1 -0
- package/esm/boom-meeting/src/bjy-common/type/api.d.ts +66 -0
- package/esm/boom-meeting/src/bjy-common/type/options.d.ts +7 -0
- package/esm/boom-meeting/src/bjy-common/type/type.d.ts +90 -0
- package/esm/boom-meeting/src/bjy-common/util/NextTask.d.ts +28 -0
- package/esm/boom-meeting/src/bjy-common/util/Sleep.d.ts +14 -0
- package/esm/boom-meeting/src/bjy-common/util/Timer.d.ts +13 -0
- package/esm/boom-meeting/src/bjy-common/util/browser.d.ts +6 -0
- package/esm/boom-meeting/src/bjy-common/util/holder.d.ts +6 -0
- package/esm/boom-meeting/src/bjy-common/util/network.d.ts +4 -0
- package/esm/boom-meeting/src/bjy-common/util/os.d.ts +14 -0
- package/esm/boom-meeting/src/error/errorMap.d.ts +70 -0
- package/esm/boom-meeting/src/error/errorType.d.ts +96 -0
- package/esm/boom-meeting/src/logger/logger.d.ts +86 -0
- package/esm/boom-meeting/src/type/customStats.d.ts +117 -0
- package/esm/boom-meeting/src/type/index.d.ts +9 -0
- package/esm/boom-meeting/src/type/stream.d.ts +17 -0
- package/esm/boom-meeting/src/type/user.d.ts +9 -0
- package/esm/boom-meeting/src/types/customStats.d.ts +103 -0
- package/esm/boom-meeting/src/types/index.d.ts +9 -0
- package/esm/boom-meeting/src/types/stream.d.ts +17 -0
- package/esm/boom-meeting/src/types/user.d.ts +11 -0
- package/esm/boom-meeting/src/util/PackLoss.d.ts +7 -0
- package/esm/boom-meeting/src/util/Pqueue.d.ts +61 -0
- package/esm/boom-meeting/src/util/Privileges.d.ts +20 -0
- package/esm/boom-meeting/src/util/ReportCollector.d.ts +22 -0
- package/esm/boom-meeting/src/util/Stutter.d.ts +19 -0
- package/esm/boom-meeting/src/util/base64.d.ts +4 -0
- package/esm/boom-meeting/src/util/checkPermissions.d.ts +1 -0
- package/esm/boom-meeting/src/util/checkSystemRequirements.d.ts +1 -0
- package/esm/boom-meeting/src/util/constant.d.ts +67 -0
- package/esm/boom-meeting/src/util/devices.d.ts +2 -0
- package/esm/boom-meeting/src/util/formatUserId.d.ts +2 -0
- package/esm/boom-meeting/src/util/is.d.ts +70 -0
- package/esm/boom-meeting/src/util/peerToPeerProbe.d.ts +9 -0
- package/esm/boom-meeting/src/util/request.d.ts +45 -0
- package/esm/constants.d.ts +83 -83
- package/esm/index.js +1 -1
- package/esm/index.js.map +3 -3
- package/esm/types/customStats.d.ts +103 -0
- package/esm/types/index.d.ts +9 -0
- package/esm/types/stream.d.ts +17 -0
- package/esm/types/user.d.ts +11 -0
- package/esm/util/emitter.d.ts +18 -18
- package/esm/utils/ErrorTypes.d.ts +97 -0
- package/package.json +3 -3
- package/umd/BMChat/BMChatVM.d.ts +24 -0
- package/umd/BMChat/BMMessageInfo.d.ts +27 -0
- package/umd/BMRoom/BMLiveVM.d.ts +35 -0
- package/umd/BMStream/BMSpeaker.d.ts +44 -0
- package/umd/BMStream/BMStreamModel.d.ts +2 -0
- package/umd/BMUser/BMUser.d.ts +151 -0
- package/{esm/boom-meeting/src → umd}/BMUser/BMUserVM.d.ts +0 -0
- package/umd/boom-meeting/src/BMChat/BMChatVM.d.ts +1 -1
- package/umd/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +189 -0
- package/umd/boom-meeting/src/BMRoom/BMRoomVM.d.ts +278 -0
- package/umd/boom-meeting/src/BMRoom/RoomEvent.d.ts +1 -0
- package/umd/boom-meeting/src/BMRoom/attachEvents.d.ts +2 -4
- package/umd/boom-meeting/src/BMStream/BMStreamModel.d.ts +1 -1
- package/umd/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +232 -0
- package/umd/boom-meeting/src/BMUser/BMUser.d.ts +1 -1
- package/umd/boom-meeting/src/bjy-common/function/debounce.d.ts +9 -0
- package/umd/boom-meeting/src/bjy-common/function/isDef.d.ts +1 -0
- package/umd/boom-meeting/src/bjy-common/function/isUndef.d.ts +1 -0
- package/umd/boom-meeting/src/bjy-common/function/throttling.d.ts +9 -0
- package/umd/boom-meeting/src/bjy-common/function/toNumber.d.ts +1 -0
- package/umd/boom-meeting/src/bjy-common/type/api.d.ts +66 -0
- package/umd/boom-meeting/src/bjy-common/type/options.d.ts +7 -0
- package/umd/boom-meeting/src/bjy-common/type/type.d.ts +90 -0
- package/umd/boom-meeting/src/bjy-common/util/NextTask.d.ts +28 -0
- package/umd/boom-meeting/src/bjy-common/util/Sleep.d.ts +14 -0
- package/umd/boom-meeting/src/bjy-common/util/Timer.d.ts +13 -0
- package/umd/boom-meeting/src/bjy-common/util/browser.d.ts +6 -0
- package/umd/boom-meeting/src/bjy-common/util/holder.d.ts +6 -0
- package/umd/boom-meeting/src/bjy-common/util/network.d.ts +4 -0
- package/umd/boom-meeting/src/bjy-common/util/os.d.ts +14 -0
- package/umd/boom-meeting/src/error/errorMap.d.ts +70 -0
- package/umd/boom-meeting/src/error/errorType.d.ts +96 -0
- package/umd/boom-meeting/src/logger/logger.d.ts +86 -0
- package/umd/boom-meeting/src/type/customStats.d.ts +117 -0
- package/umd/boom-meeting/src/type/index.d.ts +9 -0
- package/umd/boom-meeting/src/type/stream.d.ts +17 -0
- package/umd/boom-meeting/src/type/user.d.ts +9 -0
- package/umd/boom-meeting/src/types/customStats.d.ts +103 -0
- package/umd/boom-meeting/src/types/index.d.ts +9 -0
- package/umd/boom-meeting/src/types/stream.d.ts +17 -0
- package/umd/boom-meeting/src/types/user.d.ts +11 -0
- package/umd/boom-meeting/src/util/PackLoss.d.ts +7 -0
- package/umd/boom-meeting/src/util/Pqueue.d.ts +61 -0
- package/umd/boom-meeting/src/util/Privileges.d.ts +20 -0
- package/umd/boom-meeting/src/util/ReportCollector.d.ts +22 -0
- package/umd/boom-meeting/src/util/Stutter.d.ts +19 -0
- package/umd/boom-meeting/src/util/base64.d.ts +4 -0
- package/umd/boom-meeting/src/util/checkPermissions.d.ts +1 -0
- package/umd/boom-meeting/src/util/checkSystemRequirements.d.ts +1 -0
- package/umd/boom-meeting/src/util/constant.d.ts +67 -0
- package/umd/boom-meeting/src/util/devices.d.ts +2 -0
- package/umd/boom-meeting/src/util/formatUserId.d.ts +2 -0
- package/umd/boom-meeting/src/util/is.d.ts +70 -0
- package/umd/boom-meeting/src/util/peerToPeerProbe.d.ts +9 -0
- package/umd/boom-meeting/src/util/request.d.ts +45 -0
- package/{esm/boom-meeting/src → umd}/constants.d.ts +0 -0
- package/umd/index.js +1 -1
- package/umd/index.js.map +1 -0
- package/umd/util/emitter.d.ts +18 -0
- package/umd/utils/ErrorTypes.d.ts +97 -0
- package/umd/boom-meeting/src/BMUser/BMUserVM.d.ts +0 -137
- package/umd/boom-meeting/src/constants.d.ts +0 -83
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name: customStats
|
|
3
|
+
* @author: yangliye
|
|
4
|
+
* @date: 2022-07-14 17:35
|
|
5
|
+
* @description:customStats 类型声明定义
|
|
6
|
+
* @update: 2022-07-14 17:35
|
|
7
|
+
*/
|
|
8
|
+
export interface From {
|
|
9
|
+
fromTag: string;
|
|
10
|
+
}
|
|
11
|
+
export interface Tile {
|
|
12
|
+
index: number;
|
|
13
|
+
user: string;
|
|
14
|
+
nickname: string;
|
|
15
|
+
stream: string;
|
|
16
|
+
}
|
|
17
|
+
export interface NextTile {
|
|
18
|
+
index: number;
|
|
19
|
+
nickname: string;
|
|
20
|
+
user: string;
|
|
21
|
+
stream: string;
|
|
22
|
+
}
|
|
23
|
+
export interface MainLayout {
|
|
24
|
+
user: string;
|
|
25
|
+
layout: number;
|
|
26
|
+
activeSubtiles: boolean;
|
|
27
|
+
tiles: Tile[];
|
|
28
|
+
nextTiles: NextTile[];
|
|
29
|
+
}
|
|
30
|
+
export interface Tile2 {
|
|
31
|
+
index: number;
|
|
32
|
+
nickname: string;
|
|
33
|
+
user: string;
|
|
34
|
+
stream: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ForceOn {
|
|
37
|
+
user?: string;
|
|
38
|
+
isShare?: boolean;
|
|
39
|
+
active?: boolean;
|
|
40
|
+
laterScreen?: boolean;
|
|
41
|
+
tiles?: Tile2[];
|
|
42
|
+
}
|
|
43
|
+
export interface Tile3 {
|
|
44
|
+
index: number;
|
|
45
|
+
nickname: string;
|
|
46
|
+
user: string;
|
|
47
|
+
stream: string;
|
|
48
|
+
}
|
|
49
|
+
export interface Tiles4 {
|
|
50
|
+
index: number;
|
|
51
|
+
nickname: string;
|
|
52
|
+
user: string;
|
|
53
|
+
stream: string;
|
|
54
|
+
isSubStream?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface HostLayout {
|
|
57
|
+
user: string;
|
|
58
|
+
layout: number;
|
|
59
|
+
activeSubtiles: boolean;
|
|
60
|
+
tiles: Tiles4[];
|
|
61
|
+
}
|
|
62
|
+
export interface DefaultLayout {
|
|
63
|
+
mode: number;
|
|
64
|
+
allowSwitchingLayout: boolean;
|
|
65
|
+
tiles: Tile3[];
|
|
66
|
+
}
|
|
67
|
+
export interface Roll {
|
|
68
|
+
active: boolean;
|
|
69
|
+
start: number;
|
|
70
|
+
interval: number;
|
|
71
|
+
}
|
|
72
|
+
export interface ShareList {
|
|
73
|
+
user: string;
|
|
74
|
+
stream: string;
|
|
75
|
+
}
|
|
76
|
+
export interface CustomStats {
|
|
77
|
+
/**
|
|
78
|
+
* 默认为0,自由模式,可随时切换;
|
|
79
|
+
*
|
|
80
|
+
* 1时使用 defaultLayout,布局内可控;
|
|
81
|
+
*
|
|
82
|
+
* 2时使用 mainLayout,主会场同内容
|
|
83
|
+
*/
|
|
84
|
+
layoutMode: number;
|
|
85
|
+
from: From;
|
|
86
|
+
mainLayout: MainLayout;
|
|
87
|
+
forceOn: ForceOn;
|
|
88
|
+
defaultLayout: DefaultLayout;
|
|
89
|
+
roll: Roll;
|
|
90
|
+
shareList: ShareList[];
|
|
91
|
+
chatNotice: string;
|
|
92
|
+
giveLikeEnable: number;
|
|
93
|
+
chatEnable: number;
|
|
94
|
+
fileUpdateModel: number;
|
|
95
|
+
fileUpdateLook: number;
|
|
96
|
+
fileUpdateDown: number;
|
|
97
|
+
fileUpdateEdit: number;
|
|
98
|
+
screenShareModel: number;
|
|
99
|
+
activeSubtiles: boolean;
|
|
100
|
+
hostLayout: HostLayout;
|
|
101
|
+
updateKeys: any[];
|
|
102
|
+
}
|
|
103
|
+
export declare type PartialCustomStats = Partial<CustomStats>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name: stream
|
|
3
|
+
* @author: yangliye
|
|
4
|
+
* @date: 2022-04-25 13:42
|
|
5
|
+
* @description:stream
|
|
6
|
+
* @update: 2022-04-25 13:42
|
|
7
|
+
*/
|
|
8
|
+
import LocalStream from '@boom/core/esm/BoomAdapter/singleMode/stream/LocalStream';
|
|
9
|
+
import RemoteStream from '@boom/core/esm/BoomAdapter/singleMode/stream/RemoteStream';
|
|
10
|
+
import { StreamDeviceOption } from '@boom/core/esm/BoomAdapter/type/BRTCStream';
|
|
11
|
+
import { RemoteStreamOptions } from '@boom/core/esm/BoomCore/BCClient/BCClient';
|
|
12
|
+
export { SubscribeOptions } from '@boom/core/esm/BoomAdapter/type/BRTCClient';
|
|
13
|
+
export declare type SingleLocalStream = LocalStream;
|
|
14
|
+
export declare type SingleRemoteStream = RemoteStream;
|
|
15
|
+
export declare type SingleStream = SingleLocalStream | SingleRemoteStream;
|
|
16
|
+
export declare type SingleStreamDeviceOption = StreamDeviceOption;
|
|
17
|
+
export declare type SingleRemoteStreamOption = Pick<RemoteStreamOptions, 'uid' | 'stream' | 'subStream' | 'sid'>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import BCUser from '@boom/core/esm/BoomAdapter/User/User';
|
|
2
|
+
import BMUser from '../BMUser/BMUser';
|
|
3
|
+
export declare type BCUSer = BCUser;
|
|
4
|
+
export declare type UpdateMasterType = {
|
|
5
|
+
master: BMUser;
|
|
6
|
+
oldMaster: BMUser;
|
|
7
|
+
};
|
|
8
|
+
export declare type audioOffWatcherValue = {
|
|
9
|
+
audioOff: boolean;
|
|
10
|
+
selfopenaudio: boolean;
|
|
11
|
+
};
|
package/esm/util/emitter.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ConnectErrorMessage, SubscribeMessage } from "../BMStream/BMStreamModel";
|
|
2
|
-
import { BIND_BIG_ELEMENT, BIND_ELEMENT, CHANG_IS_GUEST, HANDLE_STREAM_CONNECT_ERROR, MANUAL_SUBSCRIPTION, RAISE_HAND, RECEIVE_SUBSCRIBE_MESSAGE, UNSUBSCRIBE_STREAM, USER_SORT_NUM_CHANGE } from "../constants";
|
|
3
|
-
import { RaiseHandInfo } from "../BMUser/BMUser";
|
|
4
|
-
import { ChangeIsGuest } from "../BMUser/BMUserVM";
|
|
5
|
-
declare type Events = {
|
|
6
|
-
[RECEIVE_SUBSCRIBE_MESSAGE]: SubscribeMessage;
|
|
7
|
-
[USER_SORT_NUM_CHANGE]: null;
|
|
8
|
-
[HANDLE_STREAM_CONNECT_ERROR]: ConnectErrorMessage;
|
|
9
|
-
[RAISE_HAND]: RaiseHandInfo;
|
|
10
|
-
[UNSUBSCRIBE_STREAM]: SubscribeMessage;
|
|
11
|
-
[MANUAL_SUBSCRIPTION]: SubscribeMessage;
|
|
12
|
-
[CHANG_IS_GUEST]: ChangeIsGuest;
|
|
13
|
-
[BIND_ELEMENT]: SubscribeMessage;
|
|
14
|
-
[BIND_BIG_ELEMENT]: SubscribeMessage;
|
|
15
|
-
};
|
|
16
|
-
export declare const emitter: import("mitt").Emitter<Events>;
|
|
17
|
-
export declare const removeEmitter: () => void;
|
|
18
|
-
export {};
|
|
1
|
+
import { ConnectErrorMessage, SubscribeMessage } from "../BMStream/BMStreamModel";
|
|
2
|
+
import { BIND_BIG_ELEMENT, BIND_ELEMENT, CHANG_IS_GUEST, HANDLE_STREAM_CONNECT_ERROR, MANUAL_SUBSCRIPTION, RAISE_HAND, RECEIVE_SUBSCRIBE_MESSAGE, UNSUBSCRIBE_STREAM, USER_SORT_NUM_CHANGE } from "../constants";
|
|
3
|
+
import { RaiseHandInfo } from "../BMUser/BMUser";
|
|
4
|
+
import { ChangeIsGuest } from "../BMUser/BMUserVM";
|
|
5
|
+
declare type Events = {
|
|
6
|
+
[RECEIVE_SUBSCRIBE_MESSAGE]: SubscribeMessage;
|
|
7
|
+
[USER_SORT_NUM_CHANGE]: null;
|
|
8
|
+
[HANDLE_STREAM_CONNECT_ERROR]: ConnectErrorMessage;
|
|
9
|
+
[RAISE_HAND]: RaiseHandInfo;
|
|
10
|
+
[UNSUBSCRIBE_STREAM]: SubscribeMessage;
|
|
11
|
+
[MANUAL_SUBSCRIPTION]: SubscribeMessage;
|
|
12
|
+
[CHANG_IS_GUEST]: ChangeIsGuest;
|
|
13
|
+
[BIND_ELEMENT]: SubscribeMessage;
|
|
14
|
+
[BIND_BIG_ELEMENT]: SubscribeMessage;
|
|
15
|
+
};
|
|
16
|
+
export declare const emitter: import("mitt").Emitter<Events>;
|
|
17
|
+
export declare const removeEmitter: () => void;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hysc/meeting",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.17",
|
|
4
4
|
"description": "boom meeting",
|
|
5
5
|
"main": "umd/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"author": "yangliye",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@hysc/core": "1.6.
|
|
17
|
+
"@hysc/core": "1.6.9",
|
|
18
18
|
"lodash-es": "^4.17.21",
|
|
19
19
|
"mitt": "^3.0.0",
|
|
20
20
|
"@hysc/p-queue": "6.3.0",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@hysc/utils": "1.2.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@hysc/core": "1.6.
|
|
26
|
+
"@hysc/core": "1.6.9"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/lodash-es": "^4.17.6"
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,35 @@
|
|
|
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;
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
}
|
|
@@ -28,6 +28,8 @@ export default class BMStreamModel {
|
|
|
28
28
|
_audio_enable: boolean;
|
|
29
29
|
videoEnableWatcher: BehaviorSubject<boolean>;
|
|
30
30
|
audioEnableWatcher: BehaviorSubject<boolean>;
|
|
31
|
+
streamUpdateWatcher: Subject<boolean>;
|
|
32
|
+
isSubScribedWatcher: Subject<boolean>;
|
|
31
33
|
playStateChangeWatcher: Subject<BMStreamModel>;
|
|
32
34
|
audioLevelWatcher: Subject<number>;
|
|
33
35
|
isCurrentDisplay: boolean;
|
|
@@ -0,0 +1,151 @@
|
|
|
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' | 'inBackground';
|
|
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
|
+
* 如果改用户是移动端, 该值用于判断这个用户是否在后台
|
|
79
|
+
*/
|
|
80
|
+
inBackground: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* 是不是web端入会
|
|
83
|
+
*/
|
|
84
|
+
get isWeb(): boolean;
|
|
85
|
+
constructor(user: any, isLocal?: boolean);
|
|
86
|
+
setup(userId: string, userinfo: UserInfo, nickname: string): void;
|
|
87
|
+
getMainStreamModel(): BMStreamModel | undefined;
|
|
88
|
+
getShareStreamModel(): BMStreamModel | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* 获取用户麦克风开启状态
|
|
91
|
+
*/
|
|
92
|
+
get audioEnable(): boolean;
|
|
93
|
+
get isMixer(): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* 获取用户视频开启状态
|
|
96
|
+
*/
|
|
97
|
+
get videoEnable(): boolean;
|
|
98
|
+
get isSharing(): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* 是否是信号源
|
|
101
|
+
*/
|
|
102
|
+
get isSignal(): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* 检测当前用户是否有主持人权限
|
|
105
|
+
*/
|
|
106
|
+
checkLocalHasMaster(): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* 给用户添加流
|
|
109
|
+
* @param streamId
|
|
110
|
+
* @param stream 流
|
|
111
|
+
*/
|
|
112
|
+
addStream(streamId: string, stream: BMStreamModel): void;
|
|
113
|
+
/**
|
|
114
|
+
* 删除流
|
|
115
|
+
* @param streamId
|
|
116
|
+
*/
|
|
117
|
+
removeStream(streamId: string): void;
|
|
118
|
+
/**
|
|
119
|
+
* 获取用户id
|
|
120
|
+
*/
|
|
121
|
+
getID(): string;
|
|
122
|
+
/**
|
|
123
|
+
* 获取用户昵称
|
|
124
|
+
*/
|
|
125
|
+
getNickName(): string;
|
|
126
|
+
/**
|
|
127
|
+
* 获取用户信息
|
|
128
|
+
*/
|
|
129
|
+
getUserInfo(): UserInfo;
|
|
130
|
+
/**
|
|
131
|
+
* 获取用户流信息
|
|
132
|
+
*/
|
|
133
|
+
getStreams(): Map<string, BMStreamModel>;
|
|
134
|
+
/**
|
|
135
|
+
* updateUserInfo更新用户信息(除了isMaster,isMaster是通过change-master事件改变的)
|
|
136
|
+
* @param bcUser
|
|
137
|
+
* @param participant
|
|
138
|
+
* @param bmRoom
|
|
139
|
+
* @returns
|
|
140
|
+
*/
|
|
141
|
+
updateUserInfo(bcUser: BCUser, participant: any, bmRoom: BMRoom): void;
|
|
142
|
+
/** 是否有管理权限, 是主持人或联席主持人之一 */
|
|
143
|
+
hasManager(): boolean;
|
|
144
|
+
/** 获取用户后面的身份标识 */
|
|
145
|
+
getNicknameSuffix(): string;
|
|
146
|
+
/**
|
|
147
|
+
* 更新当前用户的排序
|
|
148
|
+
*/
|
|
149
|
+
updateSortNum(): void;
|
|
150
|
+
}
|
|
151
|
+
export {};
|
|
File without changes
|