@hysc/meeting 6.1.4 → 6.1.6
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/boom-meeting/src/BMChat/BMMessageInfo.d.ts +31 -0
- package/esm/boom-meeting/src/BMRoom/BMLiveVM.d.ts +35 -0
- package/esm/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +215 -0
- package/esm/boom-meeting/src/BMStream/BMSpeaker.d.ts +26 -0
- package/esm/boom-meeting/src/BMStream/getHTMLMediaStreamOptions.d.ts +35 -0
- package/esm/boom-meeting/src/BMStream/sortStream.d.ts +30 -0
- package/esm/boom-meeting/src/SingletonQueue/SingletonQueue.d.ts +26 -0
- package/esm/boom-meeting/src/bjy-common/function/execute.d.ts +9 -0
- package/esm/boom-meeting/src/bjy-common/function/isNative.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/toString.d.ts +1 -0
- package/esm/boom-meeting/src/bjy-common/util/constant.d.ts +50 -0
- package/esm/boom-meeting/src/bjy-common/util/is.d.ts +49 -0
- package/esm/boom-meeting/src/bjy-common/util/string.d.ts +102 -0
- package/esm/boom-meeting/src/constants.d.ts +129 -0
- package/esm/boom-meeting/src/error/RTCError.d.ts +20 -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/util/Pqueue.d.ts +62 -0
- package/esm/boom-meeting/src/util/Thread.d.ts +12 -0
- package/esm/boom-meeting/src/util/benchmark.d.ts +1 -0
- package/esm/boom-meeting/src/util/constant.d.ts +67 -0
- package/esm/boom-meeting/src/util/emitter.d.ts +43 -0
- package/esm/boom-meeting/src/util/sortUtils.d.ts +10 -0
- package/esm/boom-meeting/src/util/util.d.ts +78 -0
- package/esm/index.js +2 -2
- package/esm/index.js.map +3 -3
- package/esm/src/BMChat/BMMessageInfo.d.ts +31 -31
- package/esm/src/BMRoom/BMLiveVM.d.ts +35 -35
- package/esm/src/BMRoom/BMRoomInfo.d.ts +215 -215
- package/esm/src/BMStream/BMSpeaker.d.ts +26 -26
- package/esm/src/BMStream/getHTMLMediaStreamOptions.d.ts +35 -35
- package/esm/src/BMStream/sortStream.d.ts +30 -30
- package/esm/src/SingletonQueue/SingletonQueue.d.ts +26 -26
- package/esm/src/bjy-common/function/execute.d.ts +9 -9
- package/esm/src/bjy-common/function/isNative.d.ts +1 -1
- package/esm/src/bjy-common/function/nextTick.d.ts +2 -2
- package/esm/src/bjy-common/function/toString.d.ts +1 -1
- package/esm/src/bjy-common/util/constant.d.ts +50 -50
- package/esm/src/bjy-common/util/is.d.ts +49 -49
- package/esm/src/bjy-common/util/string.d.ts +102 -102
- package/esm/src/constants.d.ts +129 -129
- package/esm/src/error/RTCError.d.ts +20 -20
- package/esm/src/error/errorType.d.ts +96 -96
- package/esm/src/logger/logger.d.ts +86 -86
- package/esm/src/util/Pqueue.d.ts +62 -62
- package/esm/src/util/Thread.d.ts +12 -12
- package/esm/src/util/benchmark.d.ts +1 -0
- package/esm/src/util/constant.d.ts +67 -67
- package/esm/src/util/emitter.d.ts +43 -43
- package/esm/src/util/sortUtils.d.ts +10 -10
- package/esm/src/util/util.d.ts +78 -78
- package/package.json +4 -4
- package/umd/boom-meeting/src/BMChat/BMMessageInfo.d.ts +31 -0
- package/umd/boom-meeting/src/BMRoom/BMLiveVM.d.ts +35 -0
- package/umd/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +215 -0
- package/umd/boom-meeting/src/BMStream/BMSpeaker.d.ts +26 -0
- package/umd/boom-meeting/src/BMStream/getHTMLMediaStreamOptions.d.ts +35 -0
- package/umd/boom-meeting/src/BMStream/sortStream.d.ts +30 -0
- package/umd/boom-meeting/src/SingletonQueue/SingletonQueue.d.ts +26 -0
- package/umd/boom-meeting/src/bjy-common/function/execute.d.ts +9 -0
- package/umd/boom-meeting/src/bjy-common/function/isNative.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/toString.d.ts +1 -0
- package/umd/boom-meeting/src/bjy-common/util/constant.d.ts +50 -0
- package/umd/boom-meeting/src/bjy-common/util/is.d.ts +49 -0
- package/umd/boom-meeting/src/bjy-common/util/string.d.ts +102 -0
- package/umd/boom-meeting/src/constants.d.ts +129 -0
- package/umd/boom-meeting/src/error/RTCError.d.ts +20 -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/util/Pqueue.d.ts +62 -0
- package/umd/boom-meeting/src/util/Thread.d.ts +12 -0
- package/umd/boom-meeting/src/util/benchmark.d.ts +1 -0
- package/umd/boom-meeting/src/util/constant.d.ts +67 -0
- package/umd/boom-meeting/src/util/emitter.d.ts +43 -0
- package/umd/boom-meeting/src/util/sortUtils.d.ts +10 -0
- package/umd/boom-meeting/src/util/util.d.ts +78 -0
- package/umd/index.js +2 -2
- package/umd/src/BMStream/BMStreamModel.d.ts +2 -1
package/esm/src/util/Pqueue.d.ts
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @ Author: zhaozhidan
|
|
3
|
-
* @ Create Time: 2020-04-26 11:47:55
|
|
4
|
-
* @ Modified by: zhaozhidan
|
|
5
|
-
* @ Modified time: 2020-09-19 22:19:21
|
|
6
|
-
* @ Description: Boom
|
|
7
|
-
*/
|
|
8
|
-
declare class Pqueue {
|
|
9
|
-
private queueArray;
|
|
10
|
-
private isTaskPending;
|
|
11
|
-
private queue;
|
|
12
|
-
constructor(maxTask: number, isStart?: boolean);
|
|
13
|
-
/**
|
|
14
|
-
* 添加队列
|
|
15
|
-
* @param {*} fn 生成Promise函数
|
|
16
|
-
* @param {String} taskId 任务标识别
|
|
17
|
-
* @param {Number} priority 任务优先级
|
|
18
|
-
* @param {String} nickName 要打印的值
|
|
19
|
-
*/
|
|
20
|
-
addQueue(fn: any, taskId: string, priority?: number, nickName?: string): void;
|
|
21
|
-
/**
|
|
22
|
-
* 清空队列
|
|
23
|
-
*/
|
|
24
|
-
clearQueue(): void;
|
|
25
|
-
/**
|
|
26
|
-
* 队列开始执行
|
|
27
|
-
*/
|
|
28
|
-
startQueue(): void;
|
|
29
|
-
/**
|
|
30
|
-
* 暂停队列
|
|
31
|
-
*/
|
|
32
|
-
pauseQueue(): any[];
|
|
33
|
-
/**
|
|
34
|
-
* 返回队列里还未pending和执行完的任务数
|
|
35
|
-
* @returns {number}
|
|
36
|
-
*/
|
|
37
|
-
size(): number;
|
|
38
|
-
/**
|
|
39
|
-
* 返回队列里还未pending和执行完的任务数
|
|
40
|
-
* @returns {number}
|
|
41
|
-
*/
|
|
42
|
-
pending(): number;
|
|
43
|
-
/**
|
|
44
|
-
* 查询任务是否结束
|
|
45
|
-
*/
|
|
46
|
-
checkTaskStatus(): boolean;
|
|
47
|
-
/**
|
|
48
|
-
* 修改任务的状态
|
|
49
|
-
*/
|
|
50
|
-
setTaskStatus(res: boolean): void;
|
|
51
|
-
/**
|
|
52
|
-
* 队列是否执行完了.
|
|
53
|
-
*/
|
|
54
|
-
onIdle(): Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* 队列是否执行完了.
|
|
57
|
-
*/
|
|
58
|
-
onEmpty(): Promise<void>;
|
|
59
|
-
}
|
|
60
|
-
export declare const streamPullQueue: Pqueue;
|
|
61
|
-
export declare const eventQueue: Pqueue;
|
|
62
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @ Author: zhaozhidan
|
|
3
|
+
* @ Create Time: 2020-04-26 11:47:55
|
|
4
|
+
* @ Modified by: zhaozhidan
|
|
5
|
+
* @ Modified time: 2020-09-19 22:19:21
|
|
6
|
+
* @ Description: Boom
|
|
7
|
+
*/
|
|
8
|
+
declare class Pqueue {
|
|
9
|
+
private queueArray;
|
|
10
|
+
private isTaskPending;
|
|
11
|
+
private queue;
|
|
12
|
+
constructor(maxTask: number, isStart?: boolean);
|
|
13
|
+
/**
|
|
14
|
+
* 添加队列
|
|
15
|
+
* @param {*} fn 生成Promise函数
|
|
16
|
+
* @param {String} taskId 任务标识别
|
|
17
|
+
* @param {Number} priority 任务优先级
|
|
18
|
+
* @param {String} nickName 要打印的值
|
|
19
|
+
*/
|
|
20
|
+
addQueue(fn: any, taskId: string, priority?: number, nickName?: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* 清空队列
|
|
23
|
+
*/
|
|
24
|
+
clearQueue(): void;
|
|
25
|
+
/**
|
|
26
|
+
* 队列开始执行
|
|
27
|
+
*/
|
|
28
|
+
startQueue(): void;
|
|
29
|
+
/**
|
|
30
|
+
* 暂停队列
|
|
31
|
+
*/
|
|
32
|
+
pauseQueue(): any[];
|
|
33
|
+
/**
|
|
34
|
+
* 返回队列里还未pending和执行完的任务数
|
|
35
|
+
* @returns {number}
|
|
36
|
+
*/
|
|
37
|
+
size(): number;
|
|
38
|
+
/**
|
|
39
|
+
* 返回队列里还未pending和执行完的任务数
|
|
40
|
+
* @returns {number}
|
|
41
|
+
*/
|
|
42
|
+
pending(): number;
|
|
43
|
+
/**
|
|
44
|
+
* 查询任务是否结束
|
|
45
|
+
*/
|
|
46
|
+
checkTaskStatus(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* 修改任务的状态
|
|
49
|
+
*/
|
|
50
|
+
setTaskStatus(res: boolean): void;
|
|
51
|
+
/**
|
|
52
|
+
* 队列是否执行完了.
|
|
53
|
+
*/
|
|
54
|
+
onIdle(): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* 队列是否执行完了.
|
|
57
|
+
*/
|
|
58
|
+
onEmpty(): Promise<void>;
|
|
59
|
+
}
|
|
60
|
+
export declare const streamPullQueue: Pqueue;
|
|
61
|
+
export declare const eventQueue: Pqueue;
|
|
62
|
+
export {};
|
package/esm/src/util/Thread.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @name: Thread
|
|
3
|
-
* @author: yangliye
|
|
4
|
-
* @date: 2023-05-06 15:33
|
|
5
|
-
* @description:Thread
|
|
6
|
-
* @update: 2023-05-06 15:33
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* 休眠 ms
|
|
10
|
-
* @param ms
|
|
11
|
-
*/
|
|
12
|
-
export declare function sleep(ms: number): Promise<unknown>;
|
|
1
|
+
/**
|
|
2
|
+
* @name: Thread
|
|
3
|
+
* @author: yangliye
|
|
4
|
+
* @date: 2023-05-06 15:33
|
|
5
|
+
* @description:Thread
|
|
6
|
+
* @update: 2023-05-06 15:33
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* 休眠 ms
|
|
10
|
+
* @param ms
|
|
11
|
+
*/
|
|
12
|
+
export declare function sleep(ms: number): Promise<unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function benchmark(): () => number;
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file 为了压缩,定义的常量
|
|
3
|
-
* @author zhaogaoxing
|
|
4
|
-
*/
|
|
5
|
-
export declare const TRUE = true;
|
|
6
|
-
export declare const FALSE = false;
|
|
7
|
-
export declare const NULL: null;
|
|
8
|
-
export declare const UNDEFINED: undefined;
|
|
9
|
-
export declare const MINUS_ONE = -1;
|
|
10
|
-
export declare const RAW_TRUE = "true";
|
|
11
|
-
export declare const RAW_FALSE = "false";
|
|
12
|
-
export declare const RAW_NULL = "null";
|
|
13
|
-
export declare const RAW_UNDEFINED = "undefined";
|
|
14
|
-
export declare const RAW_THIS = "this";
|
|
15
|
-
export declare const RAW_VALUE = "value";
|
|
16
|
-
export declare const RAW_LENGTH = "length";
|
|
17
|
-
export declare const RAW_FUNCTION = "function";
|
|
18
|
-
export declare const RAW_WILDCARD = "*";
|
|
19
|
-
export declare const RAW_DOT = ".";
|
|
20
|
-
export declare const RAW_SLASH = "/";
|
|
21
|
-
export declare const RAW_TAG = "tag";
|
|
22
|
-
export declare const KEYPATH_PARENT = "..";
|
|
23
|
-
export declare const KEYPATH_CURRENT = "this";
|
|
24
|
-
/**
|
|
25
|
-
* Single instance for window in browser
|
|
26
|
-
*/
|
|
27
|
-
export declare const WINDOW: (Window & typeof globalThis) | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Single instance for document in browser
|
|
30
|
-
*/
|
|
31
|
-
export declare const DOCUMENT: Document | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* Single instance for global in nodejs or browser
|
|
34
|
-
*/
|
|
35
|
-
export declare const GLOBAL: typeof globalThis | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Single instance for noop function
|
|
38
|
-
*/
|
|
39
|
-
export declare const EMPTY_FUNCTION: () => void;
|
|
40
|
-
/**
|
|
41
|
-
* 空对象,很多地方会用到,比如 `a || EMPTY_OBJECT` 确保是个对象
|
|
42
|
-
*/
|
|
43
|
-
export declare const EMPTY_OBJECT: Readonly<{}>;
|
|
44
|
-
/**
|
|
45
|
-
* 空数组
|
|
46
|
-
*/
|
|
47
|
-
export declare const EMPTY_ARRAY: readonly never[];
|
|
48
|
-
/**
|
|
49
|
-
* 空字符串
|
|
50
|
-
*/
|
|
51
|
-
export declare const EMPTY_STRING = "";
|
|
52
|
-
export declare const WEBRTC_TYPE_VLOUD = 0;
|
|
53
|
-
export declare const WEBRTC_TYPE_TENCENT = 1;
|
|
54
|
-
export declare const PRODUCTION = "production";
|
|
55
|
-
export declare const BETA = "beta";
|
|
56
|
-
export declare const DEVELOPMENT = "development";
|
|
57
|
-
export declare const LOGGER_TAG_CLIENT = "c";
|
|
58
|
-
export declare const LOGGER_TAG_STREAM = "s";
|
|
59
|
-
export declare const LOGGER_TAG_SIGNAL = "g";
|
|
60
|
-
export declare const LOGGER_TAG_PLAYER = "p";
|
|
61
|
-
export declare const MEDIA_TYPE_CAMERA = "videoinput";
|
|
62
|
-
export declare const MEDIA_TYPE_MIC = "audioinput";
|
|
63
|
-
export declare const MEDIA_TYPE_SPEAKER = "audiooutput";
|
|
64
|
-
export declare const ROOM_CHANNEL_TYPE_WS = 0;
|
|
65
|
-
export declare const ROOM_CHANNEL_TYPE_DC = 1;
|
|
66
|
-
export declare const SING_MODE = 1;
|
|
67
|
-
export declare const MIX_MODE = 2;
|
|
1
|
+
/**
|
|
2
|
+
* @file 为了压缩,定义的常量
|
|
3
|
+
* @author zhaogaoxing
|
|
4
|
+
*/
|
|
5
|
+
export declare const TRUE = true;
|
|
6
|
+
export declare const FALSE = false;
|
|
7
|
+
export declare const NULL: null;
|
|
8
|
+
export declare const UNDEFINED: undefined;
|
|
9
|
+
export declare const MINUS_ONE = -1;
|
|
10
|
+
export declare const RAW_TRUE = "true";
|
|
11
|
+
export declare const RAW_FALSE = "false";
|
|
12
|
+
export declare const RAW_NULL = "null";
|
|
13
|
+
export declare const RAW_UNDEFINED = "undefined";
|
|
14
|
+
export declare const RAW_THIS = "this";
|
|
15
|
+
export declare const RAW_VALUE = "value";
|
|
16
|
+
export declare const RAW_LENGTH = "length";
|
|
17
|
+
export declare const RAW_FUNCTION = "function";
|
|
18
|
+
export declare const RAW_WILDCARD = "*";
|
|
19
|
+
export declare const RAW_DOT = ".";
|
|
20
|
+
export declare const RAW_SLASH = "/";
|
|
21
|
+
export declare const RAW_TAG = "tag";
|
|
22
|
+
export declare const KEYPATH_PARENT = "..";
|
|
23
|
+
export declare const KEYPATH_CURRENT = "this";
|
|
24
|
+
/**
|
|
25
|
+
* Single instance for window in browser
|
|
26
|
+
*/
|
|
27
|
+
export declare const WINDOW: (Window & typeof globalThis) | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Single instance for document in browser
|
|
30
|
+
*/
|
|
31
|
+
export declare const DOCUMENT: Document | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Single instance for global in nodejs or browser
|
|
34
|
+
*/
|
|
35
|
+
export declare const GLOBAL: typeof globalThis | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Single instance for noop function
|
|
38
|
+
*/
|
|
39
|
+
export declare const EMPTY_FUNCTION: () => void;
|
|
40
|
+
/**
|
|
41
|
+
* 空对象,很多地方会用到,比如 `a || EMPTY_OBJECT` 确保是个对象
|
|
42
|
+
*/
|
|
43
|
+
export declare const EMPTY_OBJECT: Readonly<{}>;
|
|
44
|
+
/**
|
|
45
|
+
* 空数组
|
|
46
|
+
*/
|
|
47
|
+
export declare const EMPTY_ARRAY: readonly never[];
|
|
48
|
+
/**
|
|
49
|
+
* 空字符串
|
|
50
|
+
*/
|
|
51
|
+
export declare const EMPTY_STRING = "";
|
|
52
|
+
export declare const WEBRTC_TYPE_VLOUD = 0;
|
|
53
|
+
export declare const WEBRTC_TYPE_TENCENT = 1;
|
|
54
|
+
export declare const PRODUCTION = "production";
|
|
55
|
+
export declare const BETA = "beta";
|
|
56
|
+
export declare const DEVELOPMENT = "development";
|
|
57
|
+
export declare const LOGGER_TAG_CLIENT = "c";
|
|
58
|
+
export declare const LOGGER_TAG_STREAM = "s";
|
|
59
|
+
export declare const LOGGER_TAG_SIGNAL = "g";
|
|
60
|
+
export declare const LOGGER_TAG_PLAYER = "p";
|
|
61
|
+
export declare const MEDIA_TYPE_CAMERA = "videoinput";
|
|
62
|
+
export declare const MEDIA_TYPE_MIC = "audioinput";
|
|
63
|
+
export declare const MEDIA_TYPE_SPEAKER = "audiooutput";
|
|
64
|
+
export declare const ROOM_CHANNEL_TYPE_WS = 0;
|
|
65
|
+
export declare const ROOM_CHANNEL_TYPE_DC = 1;
|
|
66
|
+
export declare const SING_MODE = 1;
|
|
67
|
+
export declare const MIX_MODE = 2;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @name: emitter
|
|
3
|
-
* @author: yangliye
|
|
4
|
-
* @date: 2022-05-24 15:15
|
|
5
|
-
* @description:emitter
|
|
6
|
-
* @update: 2022-05-24 15:15
|
|
7
|
-
*/
|
|
8
|
-
import { Emitter } from "mitt";
|
|
9
|
-
import { ConnectErrorMessage, NoPlayerContainer, SubscribeMessage } from "../BMStream/BMStreamModel";
|
|
10
|
-
import { ADD_AUDIO_PLAY, ADD_PULL_USER, BIND_BIG_ELEMENT, BIND_ELEMENT, CHANG_IS_GUEST, HANDLE_STREAM_CONNECT_ERROR, MANUAL_SUBSCRIPTION, MODEL_SORT_NUM_CHANGE, NO_CONTAINER, RAISE_HAND, RECEIVE_SUBSCRIBE_MESSAGE, SET_VOLUME, UNSUBSCRIBE_STREAM, USER_SORT_NUM_CHANGE } from "../constants";
|
|
11
|
-
import { RaiseHandInfo } from "../BMUser/BMUser";
|
|
12
|
-
import { ChangeIsGuest } from "../BMUser/BMUserVM";
|
|
13
|
-
import { PullItem } from "../SingletonQueue/SingletonQueue";
|
|
14
|
-
export declare type UserSortType = {
|
|
15
|
-
isCommon: boolean;
|
|
16
|
-
shouldDelay: boolean;
|
|
17
|
-
};
|
|
18
|
-
export declare type VolumeInfo = {
|
|
19
|
-
streamId: string;
|
|
20
|
-
volume: number;
|
|
21
|
-
};
|
|
22
|
-
declare type Events = {
|
|
23
|
-
[RECEIVE_SUBSCRIBE_MESSAGE]: SubscribeMessage;
|
|
24
|
-
[USER_SORT_NUM_CHANGE]: UserSortType;
|
|
25
|
-
[HANDLE_STREAM_CONNECT_ERROR]: ConnectErrorMessage;
|
|
26
|
-
[RAISE_HAND]: RaiseHandInfo;
|
|
27
|
-
[UNSUBSCRIBE_STREAM]: SubscribeMessage;
|
|
28
|
-
[MANUAL_SUBSCRIPTION]: SubscribeMessage;
|
|
29
|
-
[CHANG_IS_GUEST]: ChangeIsGuest;
|
|
30
|
-
[BIND_ELEMENT]: SubscribeMessage;
|
|
31
|
-
[BIND_BIG_ELEMENT]: SubscribeMessage;
|
|
32
|
-
[NO_CONTAINER]: NoPlayerContainer;
|
|
33
|
-
[MODEL_SORT_NUM_CHANGE]: null;
|
|
34
|
-
[ADD_PULL_USER]: PullItem;
|
|
35
|
-
[SET_VOLUME]: VolumeInfo;
|
|
36
|
-
[ADD_AUDIO_PLAY]: SubscribeMessage;
|
|
37
|
-
};
|
|
38
|
-
export default class BoomEmitter {
|
|
39
|
-
static emitter: Emitter<Events> | undefined;
|
|
40
|
-
static getInstance(): Emitter<Events>;
|
|
41
|
-
static removeEmitter: () => void;
|
|
42
|
-
}
|
|
43
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @name: emitter
|
|
3
|
+
* @author: yangliye
|
|
4
|
+
* @date: 2022-05-24 15:15
|
|
5
|
+
* @description:emitter
|
|
6
|
+
* @update: 2022-05-24 15:15
|
|
7
|
+
*/
|
|
8
|
+
import { Emitter } from "mitt";
|
|
9
|
+
import { ConnectErrorMessage, NoPlayerContainer, SubscribeMessage } from "../BMStream/BMStreamModel";
|
|
10
|
+
import { ADD_AUDIO_PLAY, ADD_PULL_USER, BIND_BIG_ELEMENT, BIND_ELEMENT, CHANG_IS_GUEST, HANDLE_STREAM_CONNECT_ERROR, MANUAL_SUBSCRIPTION, MODEL_SORT_NUM_CHANGE, NO_CONTAINER, RAISE_HAND, RECEIVE_SUBSCRIBE_MESSAGE, SET_VOLUME, UNSUBSCRIBE_STREAM, USER_SORT_NUM_CHANGE } from "../constants";
|
|
11
|
+
import { RaiseHandInfo } from "../BMUser/BMUser";
|
|
12
|
+
import { ChangeIsGuest } from "../BMUser/BMUserVM";
|
|
13
|
+
import { PullItem } from "../SingletonQueue/SingletonQueue";
|
|
14
|
+
export declare type UserSortType = {
|
|
15
|
+
isCommon: boolean;
|
|
16
|
+
shouldDelay: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare type VolumeInfo = {
|
|
19
|
+
streamId: string;
|
|
20
|
+
volume: number;
|
|
21
|
+
};
|
|
22
|
+
declare type Events = {
|
|
23
|
+
[RECEIVE_SUBSCRIBE_MESSAGE]: SubscribeMessage;
|
|
24
|
+
[USER_SORT_NUM_CHANGE]: UserSortType;
|
|
25
|
+
[HANDLE_STREAM_CONNECT_ERROR]: ConnectErrorMessage;
|
|
26
|
+
[RAISE_HAND]: RaiseHandInfo;
|
|
27
|
+
[UNSUBSCRIBE_STREAM]: SubscribeMessage;
|
|
28
|
+
[MANUAL_SUBSCRIPTION]: SubscribeMessage;
|
|
29
|
+
[CHANG_IS_GUEST]: ChangeIsGuest;
|
|
30
|
+
[BIND_ELEMENT]: SubscribeMessage;
|
|
31
|
+
[BIND_BIG_ELEMENT]: SubscribeMessage;
|
|
32
|
+
[NO_CONTAINER]: NoPlayerContainer;
|
|
33
|
+
[MODEL_SORT_NUM_CHANGE]: null;
|
|
34
|
+
[ADD_PULL_USER]: PullItem;
|
|
35
|
+
[SET_VOLUME]: VolumeInfo;
|
|
36
|
+
[ADD_AUDIO_PLAY]: SubscribeMessage;
|
|
37
|
+
};
|
|
38
|
+
export default class BoomEmitter {
|
|
39
|
+
static emitter: Emitter<Events> | undefined;
|
|
40
|
+
static getInstance(): Emitter<Events>;
|
|
41
|
+
static removeEmitter: () => void;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @name: sortUtils
|
|
3
|
-
* @author: yangliye
|
|
4
|
-
* @date: 2023-02-22 18:17
|
|
5
|
-
* @description:sortUtils
|
|
6
|
-
* @update: 2023-02-22 18:17
|
|
7
|
-
*/
|
|
8
|
-
import BMUser from "../BMUser/BMUser";
|
|
9
|
-
import { MODEL_SORT_ENUM_STAND, MODEL_SORT_ENUM_ZY } from "../constants";
|
|
10
|
-
export declare function getSortNum(user: BMUser):
|
|
1
|
+
/**
|
|
2
|
+
* @name: sortUtils
|
|
3
|
+
* @author: yangliye
|
|
4
|
+
* @date: 2023-02-22 18:17
|
|
5
|
+
* @description:sortUtils
|
|
6
|
+
* @update: 2023-02-22 18:17
|
|
7
|
+
*/
|
|
8
|
+
import BMUser from "../BMUser/BMUser";
|
|
9
|
+
import { MODEL_SORT_ENUM_STAND, MODEL_SORT_ENUM_ZY } from "../constants";
|
|
10
|
+
export declare function getSortNum(user: BMUser): MODEL_SORT_ENUM_STAND | MODEL_SORT_ENUM_ZY;
|
package/esm/src/util/util.d.ts
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
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 sortUsers(list: BMUser[]): BMUser[];
|
|
70
|
-
export declare function sortStreamModels(list: BMStreamModel[]): BMStreamModel[];
|
|
71
|
-
/**
|
|
72
|
-
* 根据权限判断是不是普通参会者
|
|
73
|
-
* @param permission
|
|
74
|
-
*/
|
|
75
|
-
export declare function getIsCommonUser(permission: string): boolean;
|
|
76
|
-
export declare function getIsManager(permission: string): boolean;
|
|
77
|
-
export declare function getIsMaster(permission: string): boolean;
|
|
78
|
-
export declare function getPermission(permission: string, p: string): boolean;
|
|
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 sortUsers(list: BMUser[]): BMUser[];
|
|
70
|
+
export declare function sortStreamModels(list: BMStreamModel[]): BMStreamModel[];
|
|
71
|
+
/**
|
|
72
|
+
* 根据权限判断是不是普通参会者
|
|
73
|
+
* @param permission
|
|
74
|
+
*/
|
|
75
|
+
export declare function getIsCommonUser(permission: string): boolean;
|
|
76
|
+
export declare function getIsManager(permission: string): boolean;
|
|
77
|
+
export declare function getIsMaster(permission: string): boolean;
|
|
78
|
+
export declare function getPermission(permission: string, p: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hysc/meeting",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.6",
|
|
4
4
|
"description": "boom meeting",
|
|
5
5
|
"main": "umd/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"@hysc/p-queue": "6.3.0",
|
|
20
20
|
"rxjs": "^7.5.5",
|
|
21
21
|
"typescript": "^4.6.3",
|
|
22
|
-
"@hysc/bloud": "6.1.
|
|
23
|
-
"@hysc/core": "6.1.4",
|
|
22
|
+
"@hysc/bloud": "6.1.6",
|
|
24
23
|
"@hysc/utils": "6.1.0",
|
|
24
|
+
"@hysc/core": "6.1.6",
|
|
25
25
|
"@hysc/logger": "1.0.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@hysc/core": "6.1.
|
|
28
|
+
"@hysc/core": "6.1.6"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/lodash-es": "^4.17.6"
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
seq?: number;
|
|
13
|
+
failed?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export default class BMMessageInfo {
|
|
16
|
+
userId?: any;
|
|
17
|
+
message: string;
|
|
18
|
+
time: string;
|
|
19
|
+
timeStamp: number;
|
|
20
|
+
role?: string;
|
|
21
|
+
isLocal?: boolean;
|
|
22
|
+
avatar?: any;
|
|
23
|
+
nickName?: any;
|
|
24
|
+
isMeetingNotice: boolean;
|
|
25
|
+
to: string | undefined;
|
|
26
|
+
isDanger: boolean | undefined;
|
|
27
|
+
seq: number | undefined;
|
|
28
|
+
failed: boolean | undefined;
|
|
29
|
+
constructor(props: IMessageInfo);
|
|
30
|
+
}
|
|
31
|
+
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;
|