@hysc/meeting 10.5.5 → 10.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/umd/index.js +25 -0
- package/umd/src/BMChat/BMChatVM.d.ts +28 -0
- package/umd/src/BMChat/BMMessageInfo.d.ts +32 -0
- package/umd/src/BMRoom/BMLiveVM.d.ts +36 -0
- package/umd/src/BMRoom/BMRoom.d.ts +740 -0
- package/umd/src/BMRoom/BMRoomInfo.d.ts +222 -0
- package/umd/src/BMRoom/BMRoomVM.d.ts +329 -0
- package/umd/src/BMRoom/RoomEvent.d.ts +1 -0
- package/umd/src/BMStream/BMSpeaker.d.ts +26 -0
- package/umd/src/BMStream/BMStreamModel.d.ts +311 -0
- package/umd/src/BMStream/BMStreamModelVM.d.ts +281 -0
- package/umd/src/BMStream/getHTMLMediaStreamOptions.d.ts +35 -0
- package/umd/src/BMStream/sortStream.d.ts +30 -0
- package/umd/src/BMUser/BMUser.d.ts +173 -0
- package/umd/src/BMUser/BMUserVM.d.ts +188 -0
- package/umd/src/SingletonQueue/SingletonQueue.d.ts +16 -0
- package/umd/src/audioPlay/AudioPlay.d.ts +31 -0
- package/umd/src/bjy-common/function/debounce.d.ts +9 -0
- package/umd/src/bjy-common/function/execute.d.ts +9 -0
- package/umd/src/bjy-common/function/getErrorMessage.d.ts +1 -0
- package/umd/src/bjy-common/function/isDef.d.ts +1 -0
- package/umd/src/bjy-common/function/isNative.d.ts +1 -0
- package/umd/src/bjy-common/function/isUndef.d.ts +1 -0
- package/umd/src/bjy-common/function/nextTick.d.ts +2 -0
- package/umd/src/bjy-common/function/throttling.d.ts +9 -0
- package/umd/src/bjy-common/function/toNumber.d.ts +1 -0
- package/umd/src/bjy-common/function/toString.d.ts +1 -0
- package/umd/src/bjy-common/type/api.d.ts +66 -0
- package/umd/src/bjy-common/type/options.d.ts +7 -0
- package/umd/src/bjy-common/type/type.d.ts +90 -0
- package/umd/src/bjy-common/util/CustomEvent.d.ts +30 -0
- package/umd/src/bjy-common/util/Emitter.d.ts +57 -0
- package/umd/src/bjy-common/util/NextTask.d.ts +28 -0
- package/umd/src/bjy-common/util/Sleep.d.ts +14 -0
- package/umd/src/bjy-common/util/Timer.d.ts +13 -0
- package/umd/src/bjy-common/util/array.d.ts +96 -0
- package/umd/src/bjy-common/util/browser.d.ts +6 -0
- package/umd/src/bjy-common/util/constant.d.ts +50 -0
- package/umd/src/bjy-common/util/holder.d.ts +6 -0
- package/umd/src/bjy-common/util/is.d.ts +49 -0
- package/umd/src/bjy-common/util/keypath.d.ts +41 -0
- package/umd/src/bjy-common/util/logger.d.ts +42 -0
- package/umd/src/bjy-common/util/network.d.ts +4 -0
- package/umd/src/bjy-common/util/object.d.ts +83 -0
- package/umd/src/bjy-common/util/os.d.ts +14 -0
- package/umd/src/bjy-common/util/string.d.ts +102 -0
- package/umd/src/constants.d.ts +130 -0
- package/umd/src/error/RTCError.d.ts +20 -0
- package/umd/src/error/errorMap.d.ts +70 -0
- package/umd/src/error/errorType.d.ts +96 -0
- package/umd/src/handleEvent/attachEvents.d.ts +47 -0
- package/umd/src/handleEvent/brtcNetEvent.d.ts +9 -0
- package/umd/src/handleEvent/customMessageEvent.d.ts +2 -0
- package/umd/src/handleEvent/handleParticipantEvent.d.ts +24 -0
- package/umd/src/handleEvent/handleRoomEvent.d.ts +20 -0
- package/umd/src/handleEvent/messageEvent.d.ts +5 -0
- package/umd/src/handleEvent/pullUser.d.ts +7 -0
- package/umd/src/handleEvent/roomErrEvent.d.ts +9 -0
- package/umd/src/handleEvent/streamEvent.d.ts +22 -0
- package/umd/src/index.d.ts +13 -0
- package/umd/src/logger/logger.d.ts +86 -0
- package/umd/src/type/customStats.d.ts +129 -0
- package/umd/src/type/index.d.ts +9 -0
- package/umd/src/type/stream.d.ts +12 -0
- package/umd/src/type/user.d.ts +9 -0
- package/umd/src/util/PackLoss.d.ts +7 -0
- package/umd/src/util/Pqueue.d.ts +62 -0
- package/umd/src/util/Privileges.d.ts +20 -0
- package/umd/src/util/ReportCollector.d.ts +22 -0
- package/umd/src/util/Stutter.d.ts +19 -0
- package/umd/src/util/Thread.d.ts +12 -0
- package/umd/src/util/base64.d.ts +4 -0
- package/umd/src/util/benchmark.d.ts +1 -0
- package/umd/src/util/checkPermissions.d.ts +1 -0
- package/umd/src/util/checkSystemRequirements.d.ts +1 -0
- package/umd/src/util/constant.d.ts +67 -0
- package/umd/src/util/devices.d.ts +2 -0
- package/umd/src/util/emitter.d.ts +45 -0
- package/umd/src/util/formatUserId.d.ts +2 -0
- package/umd/src/util/is.d.ts +70 -0
- package/umd/src/util/peerToPeerProbe.d.ts +9 -0
- package/umd/src/util/request.d.ts +45 -0
- package/umd/src/util/roomUtils.d.ts +9 -0
- package/umd/src/util/sortUtils.d.ts +10 -0
- package/umd/src/util/util.d.ts +81 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name: constants
|
|
3
|
+
* @author: yangliye
|
|
4
|
+
* @date: 2022-04-27 10:39
|
|
5
|
+
* @description:constants
|
|
6
|
+
* @update: 2022-04-27 10:39
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* 标品排序规则
|
|
10
|
+
*/
|
|
11
|
+
export declare enum MODEL_SORT_ENUM_STAND {
|
|
12
|
+
SCREEN_MASTER = 0,
|
|
13
|
+
SCREEN_MANAGER_AUDIO_VIDEO = 1,
|
|
14
|
+
SCREEN_MANAGER_AUDIO = 2,
|
|
15
|
+
SCREEN_MANAGER_VIDEO = 3,
|
|
16
|
+
SCREEN_MANAGER = 4,
|
|
17
|
+
SCREEN_GUEST_AUDIO_VIDEO = 5,
|
|
18
|
+
SCREEN_GUEST_AUDIO = 6,
|
|
19
|
+
SCREEN_GUEST_VIDEO = 7,
|
|
20
|
+
SCREEN_GUEST = 8,
|
|
21
|
+
SCREEN_COMMONUSER_AUDIO_VIDEO = 9,
|
|
22
|
+
SCREEN_COMMONUSER_AUDIO = 10,
|
|
23
|
+
SCREEN_COMMONUSER_VIDEO = 11,
|
|
24
|
+
SCREEN_OTHER = 12,
|
|
25
|
+
MASTER = 13,
|
|
26
|
+
LOCAL = 14,
|
|
27
|
+
MANAGER_AUDIO_VIDEO = 15,
|
|
28
|
+
MANAGER_AUDIO = 16,
|
|
29
|
+
MANAGER_VIDEO = 17,
|
|
30
|
+
MANAGER = 18,
|
|
31
|
+
RAISE_HAND = 19,
|
|
32
|
+
RAISE_AUDIO = 20,
|
|
33
|
+
RAISE_VIDEO = 21,
|
|
34
|
+
GUEST_AUDIO_VIDEO = 22,
|
|
35
|
+
GUEST_AUDIO = 23,
|
|
36
|
+
GUEST_VIDEO = 24,
|
|
37
|
+
GUEST = 25,
|
|
38
|
+
SIGNAL = 26,
|
|
39
|
+
COMMONUSER_AUDIO_VIDEO = 27,
|
|
40
|
+
COMMONUSER_AUDIO = 28,
|
|
41
|
+
COMMONUSER_VIDEO = 29,
|
|
42
|
+
OTHER = 30
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 中移排序规则
|
|
46
|
+
*/
|
|
47
|
+
export declare enum MODEL_SORT_ENUM_ZY {
|
|
48
|
+
SCREEN = 0,
|
|
49
|
+
RAISE_AUDIO = 1,
|
|
50
|
+
RAISE_VIDEO = 2,
|
|
51
|
+
LOCAL = 3,
|
|
52
|
+
MASTER_AUDIO_VIDEO = 4,
|
|
53
|
+
MANAGER_AUDIO_VIDEO = 5,
|
|
54
|
+
AUDIO_VIDEO = 6,
|
|
55
|
+
MASTER_AUDIO = 7,
|
|
56
|
+
MANAGER_AUDIO = 8,
|
|
57
|
+
AUDIO = 9,
|
|
58
|
+
MASTER_VIDEO = 10,
|
|
59
|
+
MANAGER_VIDEO = 11,
|
|
60
|
+
VIDEO = 12,
|
|
61
|
+
MASTER = 13,
|
|
62
|
+
MANAGER = 14,
|
|
63
|
+
GUEST = 15,
|
|
64
|
+
COMMON_USER = 16,
|
|
65
|
+
SIGNAL = 17,
|
|
66
|
+
OTHER = 18
|
|
67
|
+
}
|
|
68
|
+
export declare enum STREAM_TYPE {
|
|
69
|
+
/**
|
|
70
|
+
* 大流
|
|
71
|
+
*/
|
|
72
|
+
SUB_MAIN = 0,
|
|
73
|
+
/**
|
|
74
|
+
* 小流
|
|
75
|
+
*/
|
|
76
|
+
SINGLE = 1,
|
|
77
|
+
/**
|
|
78
|
+
* 屏幕共享流
|
|
79
|
+
*/
|
|
80
|
+
SHARE = 2,
|
|
81
|
+
/**
|
|
82
|
+
* 其他
|
|
83
|
+
*/
|
|
84
|
+
OTHER = 3
|
|
85
|
+
}
|
|
86
|
+
export declare const STREAM_SUFFIX_LOW = "LowQuality";
|
|
87
|
+
export declare const TOUPINGMA = "_toupingma";
|
|
88
|
+
export declare const STREAM_SUFFIX_SCREEN = "_screen";
|
|
89
|
+
export declare const MOBILE_STREAM_SUFFIX_SCREEN = "screen-";
|
|
90
|
+
export declare const SIGNAL_SUFFIX = "xinhao_";
|
|
91
|
+
export declare const IGNORE_USERS_PREFIX: string[];
|
|
92
|
+
export declare const STREAM_SUFFIX_HDMI = "_hdmi";
|
|
93
|
+
export declare const STREAM_CONTAIN_MIXER = "-mixer-";
|
|
94
|
+
export declare const STREAM_CONTAIN_RTMP_MIXER = "-rtmpmixer-";
|
|
95
|
+
/**
|
|
96
|
+
* 接受到传递过来的收到订阅信息的信令
|
|
97
|
+
*/
|
|
98
|
+
export declare const RECEIVE_SUBSCRIBE_MESSAGE = "sub-message";
|
|
99
|
+
/**
|
|
100
|
+
* 用户的排序改变
|
|
101
|
+
*/
|
|
102
|
+
export declare const USER_SORT_NUM_CHANGE = "user-sort-num-change";
|
|
103
|
+
/**
|
|
104
|
+
* 收到业务端bindDom的事件信息,主要是处理播放逻辑的功能
|
|
105
|
+
*/
|
|
106
|
+
export declare const BIND_ELEMENT = "bind-element";
|
|
107
|
+
/**
|
|
108
|
+
* 流监听到connect-error的处理
|
|
109
|
+
*/
|
|
110
|
+
export declare const HANDLE_STREAM_CONNECT_ERROR = "stream-connect-error";
|
|
111
|
+
/**
|
|
112
|
+
* 举手相关的处理
|
|
113
|
+
*/
|
|
114
|
+
export declare const RAISE_HAND = "raise-hand";
|
|
115
|
+
export declare const MANUAL_SUBSCRIPTION = "manual-subscription";
|
|
116
|
+
/**
|
|
117
|
+
* 手动订阅模式取消订阅流
|
|
118
|
+
*/
|
|
119
|
+
export declare const UNSUBSCRIBE_STREAM = "unsubscribe-stream";
|
|
120
|
+
/**
|
|
121
|
+
* 用户的嘉宾身份会发生变化,从嘉宾变为普通参会者,或者从普通参会者变为嘉宾
|
|
122
|
+
*/
|
|
123
|
+
export declare const CHANG_IS_GUEST = "change-is-guest";
|
|
124
|
+
export declare const BIND_BIG_ELEMENT = "bind-big-element";
|
|
125
|
+
export declare const NO_CONTAINER = "no-container";
|
|
126
|
+
export declare const MODEL_SORT_NUM_CHANGE = "model-sort-num-change";
|
|
127
|
+
export declare const ADD_PULL_USER = "add-pull-user";
|
|
128
|
+
export declare const SET_VOLUME = "set-volume";
|
|
129
|
+
export declare const ADD_AUDIO_PLAY = "add-audio-play";
|
|
130
|
+
export declare const STREAM_PLAY = "stream-play";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default class BoomError extends Error {
|
|
2
|
+
static instanceOf(error: any): boolean;
|
|
3
|
+
private BoomErrorFlag;
|
|
4
|
+
private code;
|
|
5
|
+
private eName?;
|
|
6
|
+
private error;
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
* @param code
|
|
10
|
+
* @param name
|
|
11
|
+
* @param message
|
|
12
|
+
*/
|
|
13
|
+
constructor(code: number, message?: any, error?: any, name?: string);
|
|
14
|
+
/**
|
|
15
|
+
* 获取错误码
|
|
16
|
+
*
|
|
17
|
+
* @returns 错误码
|
|
18
|
+
*/
|
|
19
|
+
getCode(): number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare const BoomErrorMessage: {
|
|
2
|
+
1000: {
|
|
3
|
+
name: string;
|
|
4
|
+
message: string;
|
|
5
|
+
};
|
|
6
|
+
1001: {
|
|
7
|
+
name: string;
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
1002: {
|
|
11
|
+
name: string;
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
1003: {
|
|
15
|
+
name: string;
|
|
16
|
+
message: string;
|
|
17
|
+
};
|
|
18
|
+
4000: {
|
|
19
|
+
name: string;
|
|
20
|
+
message: string;
|
|
21
|
+
};
|
|
22
|
+
4001: {
|
|
23
|
+
name: string;
|
|
24
|
+
message: string;
|
|
25
|
+
};
|
|
26
|
+
4002: {
|
|
27
|
+
name: string;
|
|
28
|
+
message: string;
|
|
29
|
+
};
|
|
30
|
+
4003: {
|
|
31
|
+
name: string;
|
|
32
|
+
message: string;
|
|
33
|
+
};
|
|
34
|
+
4004: {
|
|
35
|
+
name: string;
|
|
36
|
+
message: string;
|
|
37
|
+
};
|
|
38
|
+
4005: {
|
|
39
|
+
name: string;
|
|
40
|
+
message: string;
|
|
41
|
+
};
|
|
42
|
+
4006: {
|
|
43
|
+
name: string;
|
|
44
|
+
message: string;
|
|
45
|
+
};
|
|
46
|
+
4007: {
|
|
47
|
+
name: string;
|
|
48
|
+
message: string;
|
|
49
|
+
};
|
|
50
|
+
4008: {
|
|
51
|
+
name: string;
|
|
52
|
+
message: string;
|
|
53
|
+
};
|
|
54
|
+
5000: {
|
|
55
|
+
name: string;
|
|
56
|
+
message: string;
|
|
57
|
+
};
|
|
58
|
+
5001: {
|
|
59
|
+
name: string;
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
62
|
+
9000: {
|
|
63
|
+
name: string;
|
|
64
|
+
message: string;
|
|
65
|
+
};
|
|
66
|
+
1010: {
|
|
67
|
+
name: string;
|
|
68
|
+
message: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 本地一般错误
|
|
3
|
+
*/
|
|
4
|
+
export declare const LOCAL_ERROR = 1000;
|
|
5
|
+
/**
|
|
6
|
+
* 无效参数
|
|
7
|
+
*/
|
|
8
|
+
export declare const INVALID_PARAMETER = 1001;
|
|
9
|
+
/**
|
|
10
|
+
* 非法操作
|
|
11
|
+
*/
|
|
12
|
+
export declare const INVALID_OPERATION = 1002;
|
|
13
|
+
/**
|
|
14
|
+
* 不支持
|
|
15
|
+
*/
|
|
16
|
+
export declare const NOT_SUPPORTED = 1003;
|
|
17
|
+
/**
|
|
18
|
+
* 没有权限
|
|
19
|
+
*/
|
|
20
|
+
export declare const PERMISSION_DENY = 1010;
|
|
21
|
+
/**
|
|
22
|
+
* 没有推送音频权限
|
|
23
|
+
*/
|
|
24
|
+
export declare const PERMISSION_DENY_AUDIO = 1011;
|
|
25
|
+
/**
|
|
26
|
+
* 没有推送视频权限
|
|
27
|
+
*/
|
|
28
|
+
export declare const PERMISSION_DENY_VIDEO = 1012;
|
|
29
|
+
/**
|
|
30
|
+
* 进入频道失败
|
|
31
|
+
*/
|
|
32
|
+
export declare const JOIN_CHANNEL_ERROR = 4000;
|
|
33
|
+
/**
|
|
34
|
+
* 信令通道建立失败
|
|
35
|
+
*/
|
|
36
|
+
export declare const SIGNAL_SETUP_FAILED = 4001;
|
|
37
|
+
/**
|
|
38
|
+
* 信令通道错误
|
|
39
|
+
*/
|
|
40
|
+
export declare const SIGNAL_ERROR = 4002;
|
|
41
|
+
/**
|
|
42
|
+
* ICE Tansport 连接错误
|
|
43
|
+
*/
|
|
44
|
+
export declare const ICE_TRANSPORT_ERROR = 4003;
|
|
45
|
+
/**
|
|
46
|
+
* 创建 sdp offer 失败
|
|
47
|
+
*/
|
|
48
|
+
export declare const CREATE_OFFER_FAILED = 4004;
|
|
49
|
+
/**
|
|
50
|
+
* 端被踢出
|
|
51
|
+
*/
|
|
52
|
+
export declare const CLIENT_BANNED = 4005;
|
|
53
|
+
/**
|
|
54
|
+
* 媒体传输超时
|
|
55
|
+
*/
|
|
56
|
+
export declare const MEDIA_SERVER_TIMEOUT = 4006;
|
|
57
|
+
/**
|
|
58
|
+
* 订阅远端流超时
|
|
59
|
+
*/
|
|
60
|
+
export declare const SUBSCRIPTION_TIMEOUT = 4007;
|
|
61
|
+
/**
|
|
62
|
+
* 推流错误
|
|
63
|
+
*/
|
|
64
|
+
export declare const MEDIA_PUBLISH_ERROR = 4008;
|
|
65
|
+
/**
|
|
66
|
+
* 用户被踢出
|
|
67
|
+
*/
|
|
68
|
+
export declare const USER_KICKED = 4009;
|
|
69
|
+
/**
|
|
70
|
+
* 订阅重试的过程中出现 stream 已被销毁
|
|
71
|
+
*/
|
|
72
|
+
export declare const MEDIA_SUBSCRIPTION_RETRY_NULL_ERROR = 4010;
|
|
73
|
+
/**
|
|
74
|
+
* HTTP 请求失败
|
|
75
|
+
*/
|
|
76
|
+
export declare const FETCH_ERROR = 5000;
|
|
77
|
+
/**
|
|
78
|
+
* userSig 校验失败
|
|
79
|
+
*/
|
|
80
|
+
export declare const USER_SIG_ERROR = 5001;
|
|
81
|
+
/**
|
|
82
|
+
* token 过期
|
|
83
|
+
*/
|
|
84
|
+
export declare const TOKEN_EXPIRE_ERROR = 5002;
|
|
85
|
+
/**
|
|
86
|
+
* 房间关闭
|
|
87
|
+
*/
|
|
88
|
+
export declare const ROOM_CLOSED_ERROR = 5003;
|
|
89
|
+
/**
|
|
90
|
+
* 未知错误
|
|
91
|
+
*/
|
|
92
|
+
export declare const UNKNOWN = 9000;
|
|
93
|
+
/**
|
|
94
|
+
* 用户不存在
|
|
95
|
+
*/
|
|
96
|
+
export declare const USER_NOT_EXIT = 9001;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import BoomCore from '@hysc/core';
|
|
2
|
+
import BMStreamModelVM from "../BMStream/BMStreamModelVM";
|
|
3
|
+
import BMRoom from '../BMRoom/BMRoom';
|
|
4
|
+
import BMUserVM from "../BMUser/BMUserVM";
|
|
5
|
+
import BMChatVM from '../BMChat/BMChatVM';
|
|
6
|
+
import { BehaviorSubject } from 'rxjs';
|
|
7
|
+
import type { StreamCustomInfo } from '@hysc/bloud';
|
|
8
|
+
/**
|
|
9
|
+
* 收到消息信令的集合
|
|
10
|
+
*/
|
|
11
|
+
export declare enum MessageType {
|
|
12
|
+
/**
|
|
13
|
+
* 初始化watcher用
|
|
14
|
+
*/
|
|
15
|
+
INIT = "init",
|
|
16
|
+
/**
|
|
17
|
+
* 收到远端控制本地摄像头的消息
|
|
18
|
+
*/
|
|
19
|
+
VIDEO_FORCE_CHANGE = "video-force-change",
|
|
20
|
+
/**
|
|
21
|
+
* 收到远端控制本地麦克风的消息
|
|
22
|
+
*/
|
|
23
|
+
AUDIO_FORCE_CHANGE = "audio-force-change"
|
|
24
|
+
}
|
|
25
|
+
export interface BloudStreamEventState {
|
|
26
|
+
userId: string;
|
|
27
|
+
streamId: string;
|
|
28
|
+
isScreen: boolean;
|
|
29
|
+
video: boolean;
|
|
30
|
+
audio: boolean;
|
|
31
|
+
customInfo?: StreamCustomInfo;
|
|
32
|
+
}
|
|
33
|
+
export interface BloudStreamState {
|
|
34
|
+
video: boolean;
|
|
35
|
+
audio: boolean;
|
|
36
|
+
isScreen: boolean;
|
|
37
|
+
customInfo?: StreamCustomInfo;
|
|
38
|
+
}
|
|
39
|
+
export interface BloudUnPubEvent {
|
|
40
|
+
userId: string;
|
|
41
|
+
streamId: string;
|
|
42
|
+
isScreen: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare type Observes = {
|
|
45
|
+
[k: string]: BehaviorSubject<any>;
|
|
46
|
+
};
|
|
47
|
+
export declare function attachEvents(boomCore: BoomCore, userVM: BMUserVM, bmStreamVm: BMStreamModelVM, chatVM: BMChatVM, bmRoom: BMRoom): Observes;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name: EventHandler
|
|
3
|
+
* @author: yangliye
|
|
4
|
+
* @date: 2023-04-04 10:14
|
|
5
|
+
* @description:EventHandler
|
|
6
|
+
* @update: 2023-04-04 10:14
|
|
7
|
+
*/
|
|
8
|
+
import BMUserVM from "../BMUser/BMUserVM";
|
|
9
|
+
import BMRoom from "../BMRoom/BMRoom";
|
|
10
|
+
import BMStreamModelVM from "../BMStream/BMStreamModelVM";
|
|
11
|
+
import BCClient from "@hysc/core";
|
|
12
|
+
import BMChatVM from "../BMChat/BMChatVM";
|
|
13
|
+
import BoomCore from "@hysc/core";
|
|
14
|
+
import { BCUser } from "@hysc/core";
|
|
15
|
+
import BMUser from "../BMUser/BMUser";
|
|
16
|
+
export declare function handleParticipantJoin(data: any, userVM: BMUserVM, bmStreamVm: BMStreamModelVM, boomCore: BoomCore, chatVM: BMChatVM, observes: any): void;
|
|
17
|
+
export declare function handleLeaveUsers(data: any, userVM: BMUserVM, bmRoom: BMRoom, observes: any, bmStreamVm: BMStreamModelVM, boomCore: BCClient, chatVM: BMChatVM): void;
|
|
18
|
+
export declare function handleParticipantLeft(data: any, userVM: BMUserVM, bmRoom: BMRoom, observes: any, bmStreamVm: BMStreamModelVM, boomCore: BCClient, chatVM: BMChatVM): void;
|
|
19
|
+
export declare function handleChangeMaster(data: any, userVM: BMUserVM, bmRoom: BMRoom, observes: any, bmStreamVm: BMStreamModelVM): void;
|
|
20
|
+
export declare function handleEvict(data: any, userVM: BMUserVM, bmStreamVm: BMStreamModelVM, bmRoom: BMRoom, observes: any): void;
|
|
21
|
+
export declare function handleUpdateUser(data: any, userVM: BMUserVM, bmRoom: BMRoom, bmStreamVm: BMStreamModelVM, observes: any): void;
|
|
22
|
+
export declare function updateBMUser(allUsers: Map<string, BCUser>, bmUser: BMUser, userVm: BMUserVM): void;
|
|
23
|
+
export declare const handleUserRejoined: any;
|
|
24
|
+
export declare function handleMoveUserRoom(bmRoom: BMRoom, userVM: BMUserVM, data: any, observes: any): Promise<void>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name: handleRoomEvent
|
|
3
|
+
* @author: yangliye
|
|
4
|
+
* @date: 2023-04-25 15:16
|
|
5
|
+
* @description:handleRoomEvent
|
|
6
|
+
* @update: 2023-04-25 15:16
|
|
7
|
+
*/
|
|
8
|
+
import BMRoom from "../BMRoom/BMRoom";
|
|
9
|
+
import BMUserVM from "../BMUser/BMUserVM";
|
|
10
|
+
import BMStreamModelVM from "../BMStream/BMStreamModelVM";
|
|
11
|
+
export declare function handleRoomConnected(data: any, bmRoom: BMRoom, userVM: BMUserVM, observes: any, shouldNotification?: boolean): Promise<void>;
|
|
12
|
+
export declare function handleInitJoinRoomUsers(bmRoom: BMRoom): Promise<void>;
|
|
13
|
+
export declare function handleRoomUpdated(data: any, bmRoom: BMRoom): void;
|
|
14
|
+
export declare function handleInitRoomInfo(data: any, bmRoom: BMRoom): void;
|
|
15
|
+
export declare function handleRoomSync(data: any, bmRoom: BMRoom, userVm: BMUserVM, bmStreamVm: BMStreamModelVM): Promise<void>;
|
|
16
|
+
export declare function handleBrtcRoomReconnecting(data: any, bmRoom: BMRoom, observes: any): void;
|
|
17
|
+
export declare function handleBrtcRoomReconnected(data: any, bmRoom: BMRoom, observes: any): void;
|
|
18
|
+
export declare function handleBloudRoomReconnecting(data: any, bmRoom: BMRoom, observes: any): void;
|
|
19
|
+
export declare function handleBloudRoomReconnected(data: any, bmRoom: BMRoom, observes: any): Promise<void>;
|
|
20
|
+
export declare function handleBloudRoomSync(data: any, userVM: BMUserVM, bmRoom: BMRoom, bmStreamVm: BMStreamModelVM, observes: any): Promise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import BMUserVM from "../BMUser/BMUserVM";
|
|
2
|
+
import BMChatVM from "../BMChat/BMChatVM";
|
|
3
|
+
import BMRoom from "../BMRoom/BMRoom";
|
|
4
|
+
export declare function handleSendMessage(msg: any, userVM: BMUserVM, chatVM: BMChatVM, observes: any): void;
|
|
5
|
+
export declare function handleCustomMessage(msg: any, bmRoom: BMRoom, observes: any): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import BMRoom from "../BMRoom/BMRoom";
|
|
2
|
+
import BCClient from "@hysc/core";
|
|
3
|
+
import BMStreamModelVM from "../BMStream/BMStreamModelVM";
|
|
4
|
+
import BoomCore from "@hysc/core";
|
|
5
|
+
export declare const NETWORK_ERROR_QUEUE: Set<(...args: any) => void>;
|
|
6
|
+
export declare function handleBRTCRoomError(data: any, bmRoom: BMRoom, boomCore: BCClient, bmStreamVm: BMStreamModelVM, observes: any): Promise<void>;
|
|
7
|
+
export declare function reconnectBloud(bmRoom: BMRoom, boomCore: BoomCore, observes: any, data: any): Promise<unknown>;
|
|
8
|
+
export declare function reconnectBRTCShareWS(boomCore: BoomCore): Promise<unknown>;
|
|
9
|
+
export declare function handleBloudError(bmRoom: BMRoom, boomCore: BCClient, bmStreamVm: BMStreamModelVM, data: any, observes: any): Promise<void>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name: streamEvent
|
|
3
|
+
* @author: yangliye
|
|
4
|
+
* @date: 2023-04-26 10:36
|
|
5
|
+
* @description:streamEvent
|
|
6
|
+
* @update: 2023-04-26 10:36
|
|
7
|
+
*/
|
|
8
|
+
import BMStreamModel from "../BMStream/BMStreamModel";
|
|
9
|
+
import BMStreamModelVM from "../BMStream/BMStreamModelVM";
|
|
10
|
+
import { BloudStreamEventState, BloudUnPubEvent } from "./attachEvents";
|
|
11
|
+
import BMRoom from "../BMRoom/BMRoom";
|
|
12
|
+
export declare function checkStreamIsNormal(streamModel: BMStreamModel | undefined): void;
|
|
13
|
+
export declare function handleStreamUpdated(event: any, bmStreamVm: BMStreamModelVM, observes: any): void;
|
|
14
|
+
export declare function handleBloudReconnectStreamEvent(bmStreamVm: BMStreamModelVM): void;
|
|
15
|
+
export declare const handleReconnectedStream: any;
|
|
16
|
+
export declare function handleStreamPublished(event: any, bmStreamVm: BMStreamModelVM, bmRoom: BMRoom, observes: any): void;
|
|
17
|
+
export declare function handleBloudStreamPublished(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
|
|
18
|
+
export declare function handleBloudStreamPubAUpdate(data: BloudStreamEventState, bmStreamVm: BMStreamModelVM, isPublish?: boolean): void;
|
|
19
|
+
export declare function handleBloudStreamUnPublished(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
|
|
20
|
+
export declare function handleBloudStreamUpdated(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
|
|
21
|
+
export declare function handleBloudStreamUnpublish(data: BloudUnPubEvent, bmStreamVm: BMStreamModelVM): void;
|
|
22
|
+
export declare function handleRepublishLocalShare(bmRoom: BMRoom, bmStreamVm: BMStreamModelVM): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import BoomMeetingSDK from './BMRoom/BMRoom';
|
|
2
|
+
import { Logger } from "@hysc/utils";
|
|
3
|
+
import BMUser from './BMUser/BMUser';
|
|
4
|
+
import BMStreamModel from "./BMStream/BMStreamModel";
|
|
5
|
+
import BMMessageInfo from './BMChat/BMMessageInfo';
|
|
6
|
+
import BMRoomInfo from './BMRoom/BMRoomInfo';
|
|
7
|
+
import BMChatVM from './BMChat/BMChatVM';
|
|
8
|
+
import BMStreamModelVM from './BMStream/BMStreamModelVM';
|
|
9
|
+
import BMUserVM from './BMUser/BMUserVM';
|
|
10
|
+
import BMRoomVM from './BMRoom/BMRoomVM';
|
|
11
|
+
export default BoomMeetingSDK;
|
|
12
|
+
export { Logger };
|
|
13
|
+
export type { BMUser, BMStreamModel, BMMessageInfo, BMRoomInfo, BMChatVM, BMStreamModelVM, BMUserVM, BMRoomVM };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* debug 级别
|
|
3
|
+
*/
|
|
4
|
+
export declare const DEBUG = 1;
|
|
5
|
+
/**
|
|
6
|
+
* info 级别
|
|
7
|
+
*/
|
|
8
|
+
export declare const INFO = 2;
|
|
9
|
+
/**
|
|
10
|
+
* info 级别
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* warn 级别
|
|
14
|
+
*/
|
|
15
|
+
export declare const WARN = 3;
|
|
16
|
+
/**
|
|
17
|
+
* error 级别
|
|
18
|
+
*/
|
|
19
|
+
export declare const ERROR = 4;
|
|
20
|
+
/**
|
|
21
|
+
* 关闭所有日志
|
|
22
|
+
*/
|
|
23
|
+
export declare const CLOSE = 5;
|
|
24
|
+
/**
|
|
25
|
+
* fatal 级别
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare const FATAL = 6;
|
|
29
|
+
/**
|
|
30
|
+
* 设置日志输出级别
|
|
31
|
+
*
|
|
32
|
+
* @param level 日志输出级别
|
|
33
|
+
*/
|
|
34
|
+
export declare function setLevel(level: number): void;
|
|
35
|
+
/**
|
|
36
|
+
* 打印 debug 日志
|
|
37
|
+
*
|
|
38
|
+
* @param msg 日志内容
|
|
39
|
+
*/
|
|
40
|
+
export declare function debug(msg: string, tag?: string, userId?: any, args?: any): void;
|
|
41
|
+
/**
|
|
42
|
+
* 打印 info 日志
|
|
43
|
+
*
|
|
44
|
+
* @param msg 日志内容
|
|
45
|
+
*/
|
|
46
|
+
export declare function info(msg: string, tag?: string, userId?: any, args?: any): void;
|
|
47
|
+
/**
|
|
48
|
+
* 打印 call 日志
|
|
49
|
+
*
|
|
50
|
+
* @param msg
|
|
51
|
+
* @param args
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* 打印 warn 日志
|
|
55
|
+
*
|
|
56
|
+
* @param msg 日志内容
|
|
57
|
+
*/
|
|
58
|
+
export declare function warn(msg: string, tag?: string, userId?: any, args?: any): void;
|
|
59
|
+
/**
|
|
60
|
+
* 打印 error 日志
|
|
61
|
+
*
|
|
62
|
+
* @param msg 日志内容
|
|
63
|
+
*/
|
|
64
|
+
export declare function error(msg: string, tag?: string, userId?: any, args?: any): void;
|
|
65
|
+
/**
|
|
66
|
+
* 致命错误,中断程序
|
|
67
|
+
*
|
|
68
|
+
* @param msg 日志内容
|
|
69
|
+
*/
|
|
70
|
+
export declare function fatal(code: number, name?: string, message?: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* 打开日志上传
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
export declare function enableUploadLog(): void;
|
|
76
|
+
/**
|
|
77
|
+
* 关闭日志上传
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
export declare function disableUploadLog(): void;
|
|
81
|
+
export declare const LogMap: {
|
|
82
|
+
1: typeof debug;
|
|
83
|
+
2: typeof info;
|
|
84
|
+
3: typeof warn;
|
|
85
|
+
4: typeof error;
|
|
86
|
+
};
|