@hysc/meeting 0.1.0
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 -0
- package/esm/BMChat/BMMessageInfo.d.ts +27 -0
- package/esm/BMRoom/BMLiveVM.d.ts +35 -0
- package/esm/BMRoom/BMRoom.d.ts +622 -0
- package/esm/BMRoom/BMRoomInfo.d.ts +189 -0
- package/esm/BMRoom/BMRoomVM.d.ts +283 -0
- package/esm/BMRoom/RoomEvent.d.ts +1 -0
- package/esm/BMRoom/attachEvents.d.ts +27 -0
- package/esm/BMStream/BMSpeaker.d.ts +44 -0
- package/esm/BMStream/BMStreamModel.d.ts +248 -0
- package/esm/BMStream/BMStreamModelVM.d.ts +233 -0
- package/esm/BMStream/getHTMLMediaStreamOptions.d.ts +35 -0
- package/esm/BMUser/BMUser.d.ts +147 -0
- package/esm/BMUser/BMUserVM.d.ts +137 -0
- package/esm/bjy-common/function/debounce.d.ts +9 -0
- package/esm/bjy-common/function/execute.d.ts +9 -0
- package/esm/bjy-common/function/isDef.d.ts +1 -0
- package/esm/bjy-common/function/isNative.d.ts +1 -0
- package/esm/bjy-common/function/isUndef.d.ts +1 -0
- package/esm/bjy-common/function/nextTick.d.ts +2 -0
- package/esm/bjy-common/function/throttling.d.ts +9 -0
- package/esm/bjy-common/function/toNumber.d.ts +1 -0
- package/esm/bjy-common/function/toString.d.ts +1 -0
- package/esm/bjy-common/type/api.d.ts +66 -0
- package/esm/bjy-common/type/options.d.ts +7 -0
- package/esm/bjy-common/type/type.d.ts +90 -0
- package/esm/bjy-common/util/CustomEvent.d.ts +30 -0
- package/esm/bjy-common/util/Emitter.d.ts +57 -0
- package/esm/bjy-common/util/NextTask.d.ts +28 -0
- package/esm/bjy-common/util/Sleep.d.ts +14 -0
- package/esm/bjy-common/util/Timer.d.ts +13 -0
- package/esm/bjy-common/util/array.d.ts +96 -0
- package/esm/bjy-common/util/browser.d.ts +6 -0
- package/esm/bjy-common/util/constant.d.ts +50 -0
- package/esm/bjy-common/util/holder.d.ts +6 -0
- package/esm/bjy-common/util/is.d.ts +49 -0
- package/esm/bjy-common/util/keypath.d.ts +41 -0
- package/esm/bjy-common/util/logger.d.ts +42 -0
- package/esm/bjy-common/util/network.d.ts +4 -0
- package/esm/bjy-common/util/object.d.ts +83 -0
- package/esm/bjy-common/util/os.d.ts +14 -0
- package/esm/bjy-common/util/string.d.ts +102 -0
- package/esm/boom-meeting/src/BMChat/BMChatVM.d.ts +21 -0
- package/esm/boom-meeting/src/BMChat/BMMessageInfo.d.ts +27 -0
- package/esm/boom-meeting/src/BMRoom/BMLiveVM.d.ts +35 -0
- package/esm/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +147 -0
- package/esm/boom-meeting/src/BMRoom/RoomEvent.d.ts +1 -0
- package/esm/boom-meeting/src/BMStream/BMSpeaker.d.ts +44 -0
- package/esm/boom-meeting/src/BMStream/BMStreamModel.d.ts +248 -0
- package/esm/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +213 -0
- package/esm/boom-meeting/src/BMStream/getHTMLMediaStreamOptions.d.ts +35 -0
- package/esm/boom-meeting/src/BMUser/BMUser.d.ts +147 -0
- package/esm/boom-meeting/src/BMUser/BMUserVM.d.ts +111 -0
- package/esm/boom-meeting/src/bjy-common/function/debounce.d.ts +9 -0
- package/esm/boom-meeting/src/bjy-common/function/execute.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/isNative.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/nextTick.d.ts +2 -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/function/toString.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/CustomEvent.d.ts +30 -0
- package/esm/boom-meeting/src/bjy-common/util/Emitter.d.ts +57 -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/array.d.ts +96 -0
- package/esm/boom-meeting/src/bjy-common/util/browser.d.ts +6 -0
- package/esm/boom-meeting/src/bjy-common/util/constant.d.ts +50 -0
- package/esm/boom-meeting/src/bjy-common/util/holder.d.ts +6 -0
- package/esm/boom-meeting/src/bjy-common/util/is.d.ts +49 -0
- package/esm/boom-meeting/src/bjy-common/util/keypath.d.ts +41 -0
- package/esm/boom-meeting/src/bjy-common/util/logger.d.ts +42 -0
- package/esm/boom-meeting/src/bjy-common/util/network.d.ts +4 -0
- package/esm/boom-meeting/src/bjy-common/util/object.d.ts +83 -0
- package/esm/boom-meeting/src/bjy-common/util/os.d.ts +14 -0
- package/esm/boom-meeting/src/bjy-common/util/string.d.ts +102 -0
- package/esm/boom-meeting/src/constants.d.ts +83 -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/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/devices.d.ts +2 -0
- package/esm/boom-meeting/src/util/emitter.d.ts +18 -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/boom-meeting/src/util/roomUtils.d.ts +9 -0
- package/esm/boom-meeting/src/util/util.d.ts +76 -0
- package/esm/constants.d.ts +83 -0
- package/esm/error/RTCError.d.ts +20 -0
- package/esm/error/errorMap.d.ts +70 -0
- package/esm/error/errorType.d.ts +96 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.js +60529 -0
- package/esm/index.js.map +7 -0
- package/esm/logger/logger.d.ts +86 -0
- package/esm/type/customStats.d.ts +117 -0
- package/esm/type/index.d.ts +9 -0
- package/esm/type/stream.d.ts +17 -0
- package/esm/type/user.d.ts +9 -0
- 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/PackLoss.d.ts +7 -0
- package/esm/util/Pqueue.d.ts +61 -0
- package/esm/util/Privileges.d.ts +20 -0
- package/esm/util/ReportCollector.d.ts +22 -0
- package/esm/util/Stutter.d.ts +19 -0
- package/esm/util/base64.d.ts +4 -0
- package/esm/util/checkPermissions.d.ts +1 -0
- package/esm/util/checkSystemRequirements.d.ts +1 -0
- package/esm/util/constant.d.ts +67 -0
- package/esm/util/devices.d.ts +2 -0
- package/esm/util/emitter.d.ts +18 -0
- package/esm/util/formatUserId.d.ts +2 -0
- package/esm/util/is.d.ts +70 -0
- package/esm/util/peerToPeerProbe.d.ts +9 -0
- package/esm/util/request.d.ts +45 -0
- package/esm/util/roomUtils.d.ts +9 -0
- package/esm/util/util.d.ts +76 -0
- package/esm/utils/ErrorTypes.d.ts +97 -0
- package/package.json +36 -0
- package/umd/BMChat/BMChatVM.d.ts +24 -0
- package/umd/BMRoom/BMRoom.d.ts +622 -0
- package/umd/BMRoom/BMRoomInfo.d.ts +189 -0
- package/umd/BMRoom/BMRoomVM.d.ts +283 -0
- package/umd/BMRoom/attachEvents.d.ts +27 -0
- package/umd/BMStream/BMStreamModelVM.d.ts +233 -0
- package/umd/BMUser/BMUser.d.ts +147 -0
- package/umd/BMUser/BMUserVM.d.ts +137 -0
- package/umd/boom-meeting/src/BMChat/BMMessageInfo.d.ts +27 -0
- package/umd/boom-meeting/src/BMRoom/BMLiveVM.d.ts +35 -0
- package/umd/boom-meeting/src/BMRoom/RoomEvent.d.ts +1 -0
- package/umd/boom-meeting/src/BMStream/BMSpeaker.d.ts +44 -0
- package/umd/boom-meeting/src/BMStream/BMStreamModel.d.ts +248 -0
- package/umd/boom-meeting/src/BMStream/getHTMLMediaStreamOptions.d.ts +35 -0
- package/umd/boom-meeting/src/bjy-common/function/debounce.d.ts +9 -0
- package/umd/boom-meeting/src/bjy-common/function/execute.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/isNative.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/nextTick.d.ts +2 -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/function/toString.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/CustomEvent.d.ts +30 -0
- package/umd/boom-meeting/src/bjy-common/util/Emitter.d.ts +57 -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/array.d.ts +96 -0
- package/umd/boom-meeting/src/bjy-common/util/browser.d.ts +6 -0
- package/umd/boom-meeting/src/bjy-common/util/constant.d.ts +50 -0
- package/umd/boom-meeting/src/bjy-common/util/holder.d.ts +6 -0
- package/umd/boom-meeting/src/bjy-common/util/is.d.ts +49 -0
- package/umd/boom-meeting/src/bjy-common/util/keypath.d.ts +41 -0
- package/umd/boom-meeting/src/bjy-common/util/logger.d.ts +42 -0
- package/umd/boom-meeting/src/bjy-common/util/network.d.ts +4 -0
- package/umd/boom-meeting/src/bjy-common/util/object.d.ts +83 -0
- package/umd/boom-meeting/src/bjy-common/util/os.d.ts +14 -0
- package/umd/boom-meeting/src/bjy-common/util/string.d.ts +102 -0
- package/umd/boom-meeting/src/constants.d.ts +83 -0
- package/umd/boom-meeting/src/error/errorMap.d.ts +70 -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/util/PackLoss.d.ts +7 -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/devices.d.ts +2 -0
- package/umd/boom-meeting/src/util/emitter.d.ts +18 -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/umd/boom-meeting/src/util/roomUtils.d.ts +9 -0
- package/umd/boom-meeting/src/util/util.d.ts +76 -0
- package/umd/error/RTCError.d.ts +20 -0
- package/umd/error/errorType.d.ts +96 -0
- package/umd/index.d.ts +2 -0
- package/umd/index.js +60 -0
- package/umd/logger/logger.d.ts +86 -0
- package/umd/util/Pqueue.d.ts +61 -0
- package/umd/util/constant.d.ts +67 -0
- package/umd/utils/ErrorTypes.d.ts +97 -0
package/esm/util/is.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare function func(value: any): value is Function;
|
|
2
|
+
/**
|
|
3
|
+
* Check if value is an array.
|
|
4
|
+
*
|
|
5
|
+
* @param value
|
|
6
|
+
* @return
|
|
7
|
+
*/
|
|
8
|
+
export declare function array<T>(value: any): value is Array<T>;
|
|
9
|
+
/**
|
|
10
|
+
* Check if value is an object.
|
|
11
|
+
*
|
|
12
|
+
* @param value
|
|
13
|
+
* @return
|
|
14
|
+
*/
|
|
15
|
+
export declare function object(value: any): value is Object;
|
|
16
|
+
/**
|
|
17
|
+
* Check if value is a string.
|
|
18
|
+
*
|
|
19
|
+
* @param value
|
|
20
|
+
* @return
|
|
21
|
+
*/
|
|
22
|
+
export declare function string(value: any): value is string;
|
|
23
|
+
/**
|
|
24
|
+
* Check if value is a number.
|
|
25
|
+
*
|
|
26
|
+
* @param value
|
|
27
|
+
* @return
|
|
28
|
+
*/
|
|
29
|
+
export declare function number(value: any): value is number;
|
|
30
|
+
/**
|
|
31
|
+
* Check if value is boolean.
|
|
32
|
+
*
|
|
33
|
+
* @param value
|
|
34
|
+
* @return
|
|
35
|
+
*/
|
|
36
|
+
export declare function boolean(value: any): value is boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Check if value is numeric.
|
|
39
|
+
*
|
|
40
|
+
* @param value
|
|
41
|
+
* @return
|
|
42
|
+
*/
|
|
43
|
+
export declare function numeric(value: any): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* 判断是不是普通字面量对象
|
|
46
|
+
*
|
|
47
|
+
* @param {*} target
|
|
48
|
+
* @return {boolean}
|
|
49
|
+
*/
|
|
50
|
+
export declare function isPlainObject(target: any): target is Object;
|
|
51
|
+
/**
|
|
52
|
+
* 判断 value 是否在指定范围中
|
|
53
|
+
*
|
|
54
|
+
* @param value 待判断值
|
|
55
|
+
* @param min 范围左区间
|
|
56
|
+
* @param max 范围右区间
|
|
57
|
+
*/
|
|
58
|
+
export declare function range(value: number, min: number, max: number): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Check if value is ArrayBuffer.
|
|
61
|
+
*
|
|
62
|
+
* @param value
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
export declare function arrayBuffer(value: any): value is ArrayBuffer;
|
|
66
|
+
export declare function isVloudWebRTC(type: number): boolean;
|
|
67
|
+
export declare function isTencentWebRTC(type: number): boolean;
|
|
68
|
+
export declare function videoTrack(track: MediaStreamTrack): boolean;
|
|
69
|
+
export declare function audioTrack(track: MediaStreamTrack): boolean;
|
|
70
|
+
export declare function isSingleMode(type: number): boolean;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { MsaterRes, ProbeServerRes, SigRes } from '../type/type';
|
|
2
|
+
/**
|
|
3
|
+
* 设置请求环境
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
* @param e 环境
|
|
7
|
+
*/
|
|
8
|
+
export declare function setRequestEnv(e: string): void;
|
|
9
|
+
export declare function getURL(path: string): string;
|
|
10
|
+
export declare function getTokenAuthUrl(): string;
|
|
11
|
+
/**
|
|
12
|
+
* 发送 post 请求
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
* @param path fetch 路径
|
|
16
|
+
* @param data post 发送 data
|
|
17
|
+
* @returns 返回数据
|
|
18
|
+
*/
|
|
19
|
+
export declare function post(path: string, data: Object): Promise<any>;
|
|
20
|
+
/**
|
|
21
|
+
* 发送 get 请求
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
* @param path fetch 路径
|
|
25
|
+
* @param data get 发送 data
|
|
26
|
+
* @returns 返回数据
|
|
27
|
+
*/
|
|
28
|
+
export declare function get(path: string, data: Object): Promise<any>;
|
|
29
|
+
/**
|
|
30
|
+
* 获取 token
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
* @param sign
|
|
34
|
+
* @returns 返回数据
|
|
35
|
+
*/
|
|
36
|
+
export declare function checkSign(sign: string, roomId: string, userId: number): Promise<SigRes>;
|
|
37
|
+
/**
|
|
38
|
+
* 获取 Proxies
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
* @param MasterRes
|
|
42
|
+
* @returns 返回数据
|
|
43
|
+
*/
|
|
44
|
+
export declare function fetchMaster(master: string): Promise<MsaterRes>;
|
|
45
|
+
export declare function fetchProbeServers(): Promise<ProbeServerRes>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SingleRemoteStream } from "../type";
|
|
2
|
+
/**
|
|
3
|
+
* @name: roomUtils
|
|
4
|
+
* @author: yangliye
|
|
5
|
+
* @date: 2022-12-06 09:31
|
|
6
|
+
* @description:roomUtils
|
|
7
|
+
* @update: 2022-12-06 09:31
|
|
8
|
+
*/
|
|
9
|
+
export declare function isShareStream(remoteStream: SingleRemoteStream): boolean;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import BMUser from '../BMUser/BMUser';
|
|
2
|
+
import BMStreamModel from '../BMStream/BMStreamModel';
|
|
3
|
+
export declare const notGetTalkInterval: number;
|
|
4
|
+
/**
|
|
5
|
+
* 生成唯一 id
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
* @returns id
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateUUID(): string;
|
|
11
|
+
/**
|
|
12
|
+
* 将函数回调转换为 Promise
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
* @typeParam T 回调结果类型
|
|
16
|
+
* @typeParam This 函数执行上下文
|
|
17
|
+
* @param fn 回调函数
|
|
18
|
+
* @param args 函数执行参数
|
|
19
|
+
* @param ctx 函数执行上下文
|
|
20
|
+
* @param hasResolve 是否有成功回调
|
|
21
|
+
* @returns 回调结果
|
|
22
|
+
*/
|
|
23
|
+
export declare function callbackToPromise<T, This>(fn: any, args: any[], ctx: any, hasResolve?: boolean): Promise<T | void>;
|
|
24
|
+
/**
|
|
25
|
+
* 创建 AudioContext
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
* @returns AudioContext
|
|
29
|
+
*/
|
|
30
|
+
export declare function getAudioContext(): AudioContext;
|
|
31
|
+
/**
|
|
32
|
+
* 创建 AudioMeter
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
35
|
+
* @param audioContext
|
|
36
|
+
* @param clipLevel
|
|
37
|
+
* @param averaging
|
|
38
|
+
* @param clipLag
|
|
39
|
+
* @returns ScriptProcessorNode
|
|
40
|
+
*/
|
|
41
|
+
export declare function createAudioMeter(audioContext: AudioContext, clipLevel?: number, averaging?: number, clipLag?: number): ScriptProcessorNode;
|
|
42
|
+
/**
|
|
43
|
+
* 放置 AudioMeter
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
* @param stream
|
|
47
|
+
* @param mediaStream
|
|
48
|
+
*/
|
|
49
|
+
export declare function createVolumeMeter(stream: any, audioTrack: MediaStreamTrack): void;
|
|
50
|
+
/**
|
|
51
|
+
* 解析 vloud 流数据
|
|
52
|
+
*
|
|
53
|
+
* @internal
|
|
54
|
+
* @param streamDeviceOption
|
|
55
|
+
* @param streamCodecOption
|
|
56
|
+
* @returns 解析结果
|
|
57
|
+
*/
|
|
58
|
+
export declare function parseVloudStreamOptions(streamDeviceOption: any, streamCodecOption: any): Object;
|
|
59
|
+
export declare function timestamp(): number;
|
|
60
|
+
export declare function resumeContext(): Promise<void>;
|
|
61
|
+
export declare function getEmptyVloudStats(): any;
|
|
62
|
+
export declare function timestampMillisecond(diffNTP?: number): number;
|
|
63
|
+
/**
|
|
64
|
+
* 处理时间戳
|
|
65
|
+
* @param {number} timeStamp
|
|
66
|
+
* @returns {string} 12:09
|
|
67
|
+
*/
|
|
68
|
+
export declare function handleTime(timeStamp: number): string;
|
|
69
|
+
export declare function sortStreamModelsOrUser<T extends BMUser | BMStreamModel>(list: T[]): T[];
|
|
70
|
+
/**
|
|
71
|
+
* 根据权限判断是不是普通参会者
|
|
72
|
+
* @param permission
|
|
73
|
+
*/
|
|
74
|
+
export declare function getIsCommonUser(permission: string): boolean;
|
|
75
|
+
export declare function getIsManager(permission: string): boolean;
|
|
76
|
+
export declare function getPermission(permission: string, p: string): boolean;
|
|
@@ -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
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hysc/meeting",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "boom meeting",
|
|
5
|
+
"main": "umd/index.js",
|
|
6
|
+
"module": "esm/index.js",
|
|
7
|
+
"types": "esm/index.d.ts",
|
|
8
|
+
"private": false,
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "tsc --watch",
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"docs": "rimraf docs && typedoc"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [],
|
|
15
|
+
"files": [
|
|
16
|
+
"esm",
|
|
17
|
+
"umd"
|
|
18
|
+
],
|
|
19
|
+
"author": "yangliye",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@boom/core": "workspace:*",
|
|
23
|
+
"lodash-es": "^4.17.21",
|
|
24
|
+
"mitt": "^3.0.0",
|
|
25
|
+
"p-queue": "git+ssh://git@git.baijiashilian.com:LLL/frondend/p-queue.git#master",
|
|
26
|
+
"rxjs": "^7.5.5",
|
|
27
|
+
"typescript": "^4.6.3",
|
|
28
|
+
"@boom/utils": "workspace:*"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@boom/core": "workspace:*"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/lodash-es": "^4.17.6"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import BoomCore from '@boom/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
|
+
}
|