@hysc/meeting 0.2.0 → 0.4.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/boom-meeting/src/BMChat/BMChatVM.d.ts +9 -6
- package/esm/boom-meeting/src/BMRoom/BMRoom.d.ts +622 -0
- package/esm/boom-meeting/src/BMRoom/BMRoomInfo.d.ts +189 -147
- package/esm/boom-meeting/src/BMRoom/BMRoomVM.d.ts +283 -0
- package/esm/boom-meeting/src/BMRoom/attachEvents.d.ts +27 -0
- package/esm/boom-meeting/src/BMStream/BMStreamModel.d.ts +1 -1
- package/esm/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +30 -10
- package/esm/boom-meeting/src/BMUser/BMUser.d.ts +3 -3
- package/esm/boom-meeting/src/BMUser/BMUserVM.d.ts +33 -7
- package/esm/boom-meeting/src/error/RTCError.d.ts +20 -0
- package/esm/boom-meeting/src/error/errorType.d.ts +96 -96
- package/esm/boom-meeting/src/index.d.ts +2 -0
- package/esm/boom-meeting/src/logger/logger.d.ts +86 -86
- package/esm/boom-meeting/src/type/stream.d.ts +5 -5
- package/esm/boom-meeting/src/util/Pqueue.d.ts +61 -0
- package/esm/boom-meeting/src/util/constant.d.ts +67 -0
- package/esm/index.js +17 -63545
- package/esm/index.js.map +2 -2
- package/package.json +4 -5
- package/umd/boom-meeting/src/BMChat/BMChatVM.d.ts +24 -0
- package/umd/boom-meeting/src/BMRoom/BMRoom.d.ts +622 -0
- package/umd/boom-meeting/src/BMRoom/BMRoomVM.d.ts +283 -0
- package/umd/boom-meeting/src/BMRoom/attachEvents.d.ts +27 -0
- package/umd/boom-meeting/src/BMStream/BMStreamModel.d.ts +1 -1
- package/umd/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +233 -0
- package/umd/boom-meeting/src/BMUser/BMUser.d.ts +147 -0
- package/umd/boom-meeting/src/BMUser/BMUserVM.d.ts +137 -0
- package/umd/boom-meeting/src/type/stream.d.ts +5 -5
|
@@ -16,26 +16,36 @@
|
|
|
16
16
|
/// <reference types="node" />
|
|
17
17
|
import BMStreamModel from './BMStreamModel';
|
|
18
18
|
import BMUser from '../BMUser/BMUser';
|
|
19
|
-
import { SingleRemoteStream, SingleStream } from '../type';
|
|
19
|
+
import { SingleLocalStream, SingleRemoteStream, SingleStream } from '../type';
|
|
20
20
|
import BMRoom from '../BMRoom/BMRoom';
|
|
21
21
|
import { BehaviorSubject, Subject } from 'rxjs';
|
|
22
|
-
import { Device } from '@
|
|
22
|
+
import { Device } from '@hysc/core/esm/BoomAdapter/type/value';
|
|
23
23
|
import BMSpeaker from './BMSpeaker';
|
|
24
|
+
import { ShareMediaOptions } from "@hysc/core/esm/BoomCore/BCClient/BCClient";
|
|
25
|
+
import { getHTMLMediaStreamOptions, Result, getMediaStreamInfo } from "./getHTMLMediaStreamOptions";
|
|
26
|
+
/**
|
|
27
|
+
* 全量的brtc流记录,把所有brtc用户推的流都做记录
|
|
28
|
+
* stream-added 的时候添加
|
|
29
|
+
* stream-removed 的时候删除
|
|
30
|
+
* mute/unmute-video/audio 的时候更新流
|
|
31
|
+
* 当用户进来的时候,去查看这个流对象,如果流存在,就给这个人添加流
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare const BRTCStreamMap: Map<string, import("@hysc/core/esm/BoomAdapter/singleMode/stream/RemoteStream").default>;
|
|
35
|
+
export declare const BRTCShareStreamMap: Map<string, import("@hysc/core/esm/BoomAdapter/singleMode/stream/RemoteStream").default>;
|
|
24
36
|
export default class BMStreamModelVM {
|
|
25
|
-
/**
|
|
26
|
-
* 这个是为了记录当前bloud入会之前brtc推的流
|
|
27
|
-
*/
|
|
28
|
-
hadJoinedStreamModels: Set<any>;
|
|
29
37
|
streamModels: Map<string, BMStreamModel>;
|
|
30
38
|
/**
|
|
31
39
|
* 因为投屏码用户进来以后,他是不在小窗口展示的,所以要把投屏的用户过滤掉给业务的展示
|
|
32
40
|
*/
|
|
33
41
|
streamModelsWatcher: BehaviorSubject<BMStreamModel[]>;
|
|
34
|
-
shareStreamModels: BMStreamModel
|
|
42
|
+
shareStreamModels: Map<string, BMStreamModel>;
|
|
35
43
|
shareStreamModelsWatcher: BehaviorSubject<BMStreamModel[]>;
|
|
36
44
|
localModel: BMStreamModel | null;
|
|
37
45
|
private room;
|
|
38
46
|
bloudStream: any;
|
|
47
|
+
audioStream: SingleLocalStream | undefined;
|
|
48
|
+
brtcStream: SingleLocalStream | undefined;
|
|
39
49
|
/**
|
|
40
50
|
* 本地是否在屏幕共享
|
|
41
51
|
*/
|
|
@@ -51,7 +61,7 @@ export default class BMStreamModelVM {
|
|
|
51
61
|
/**
|
|
52
62
|
* 后面打开摄像头存储的流,主要是关闭摄像头的时候得把它清除掉
|
|
53
63
|
*/
|
|
54
|
-
|
|
64
|
+
videoStream: SingleLocalStream | null;
|
|
55
65
|
private _recorder;
|
|
56
66
|
private _isRecording;
|
|
57
67
|
private _slicingRecord;
|
|
@@ -102,8 +112,9 @@ export default class BMStreamModelVM {
|
|
|
102
112
|
/**
|
|
103
113
|
* 开关本地摄像头
|
|
104
114
|
* @param status true:开,false:关
|
|
115
|
+
* @param videoTrack 开启美颜之后,需要传递这个参数,携带美颜之后的videoTrack
|
|
105
116
|
*/
|
|
106
|
-
setLocalVideoEnable(status: boolean): Promise<
|
|
117
|
+
setLocalVideoEnable(status: boolean, videoTrack?: MediaStreamTrack): Promise<void>;
|
|
107
118
|
/**
|
|
108
119
|
* 开关本地麦克风
|
|
109
120
|
* @param status true:开,false:关
|
|
@@ -141,6 +152,7 @@ export default class BMStreamModelVM {
|
|
|
141
152
|
* @private
|
|
142
153
|
*/
|
|
143
154
|
private createStreamAndPublish;
|
|
155
|
+
videoMuteHandler(): Promise<void>;
|
|
144
156
|
/**
|
|
145
157
|
* 更改音视频状态或者取消发布
|
|
146
158
|
* @param type 更改类型
|
|
@@ -153,13 +165,14 @@ export default class BMStreamModelVM {
|
|
|
153
165
|
* 是否开启屏幕共享
|
|
154
166
|
* @param enable
|
|
155
167
|
* @param opts 开启屏幕共享参数
|
|
168
|
+
* @param customShare
|
|
156
169
|
* @param opts.audio 是否开启音频
|
|
157
170
|
* @param opts.source_name Electron 下窗口名称
|
|
158
171
|
* @param opts.width 共享屏幕宽度
|
|
159
172
|
* @param opts.height 共享屏幕高度
|
|
160
173
|
* @param opts.contentHint 视频的contentHint 可选值: '' | 'motion' | 'detail' | 'text'
|
|
161
174
|
*/
|
|
162
|
-
toggleShareScreen(enable: boolean, opts: any): Promise<unknown>;
|
|
175
|
+
toggleShareScreen(enable: boolean, opts: any, customShare?: Result): Promise<unknown>;
|
|
163
176
|
setShareScreenContentHint(contentHint: '' | 'motion' | 'detail' | 'text'): Promise<void>;
|
|
164
177
|
/**
|
|
165
178
|
* 排序变化之后的处理逻辑
|
|
@@ -210,4 +223,11 @@ export default class BMStreamModelVM {
|
|
|
210
223
|
startSpeakerDetector(): void;
|
|
211
224
|
addToDetector(speaker: BMSpeaker): void;
|
|
212
225
|
removeFromDetector(speakerId: string): void;
|
|
226
|
+
shareCustomMedia(enable: boolean, shareOptions: ShareMediaOptions): Promise<undefined>;
|
|
227
|
+
/**
|
|
228
|
+
* 根据videoElement 获取内部流数据
|
|
229
|
+
*/
|
|
230
|
+
getHTMLMediaStream: typeof getHTMLMediaStreamOptions;
|
|
231
|
+
getMediaStream: typeof getMediaStreamInfo;
|
|
232
|
+
clearCache(): void;
|
|
213
233
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import BMStreamModel from '../BMStream/BMStreamModel';
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import BCUser from '@
|
|
3
|
+
import BCUser from '@hysc/core/esm/BoomAdapter/User/User';
|
|
4
4
|
import BMRoom from '../BMRoom/BMRoom';
|
|
5
|
-
declare type Operation = 'none' | 'getMaster' | 'getManager' | 'removeMaster' | 'removeManager' | 'changeNickName' | 'speakerEnable' | 'changeShare' | 'updateUser' | 'raiseHandsVideo' | 'raiseHandsAudio' | 'audienceEnableSpeaking';
|
|
5
|
+
declare type Operation = 'none' | 'getMaster' | 'getManager' | 'removeMaster' | 'getGuest' | 'removeGuest' | 'removeManager' | 'changeNickName' | 'speakerEnable' | 'changeShare' | 'updateUser' | 'raiseHandsVideo' | 'raiseHandsAudio' | 'audienceEnableSpeaking';
|
|
6
6
|
interface IUserActionWatcher {
|
|
7
7
|
operation: Operation;
|
|
8
8
|
user: BMUser;
|
|
@@ -79,7 +79,7 @@ export default class BMUser {
|
|
|
79
79
|
*/
|
|
80
80
|
get isWeb(): boolean;
|
|
81
81
|
constructor(user: any, isLocal?: boolean);
|
|
82
|
-
setup(userId: string, userinfo: UserInfo): void;
|
|
82
|
+
setup(userId: string, userinfo: UserInfo, nickname: string): void;
|
|
83
83
|
getMainStreamModel(): BMStreamModel | undefined;
|
|
84
84
|
getShareStreamModel(): BMStreamModel | undefined;
|
|
85
85
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import BoomCore from '@
|
|
1
|
+
import BoomCore from '@hysc/core/esm';
|
|
2
2
|
import BMUser from './BMUser';
|
|
3
|
-
import BCUser from '@
|
|
3
|
+
import BCUser from '@hysc/core/esm/BoomAdapter/User/User';
|
|
4
4
|
import BMRoom from '../BMRoom/BMRoom';
|
|
5
5
|
import { BehaviorSubject } from 'rxjs';
|
|
6
6
|
import { UpdateMasterType } from '../type';
|
|
@@ -24,10 +24,11 @@ export default class BMUserVM {
|
|
|
24
24
|
audiencesListWatcher: BehaviorSubject<BMUser[]>;
|
|
25
25
|
commonUserListWatcher: BehaviorSubject<BMUser[]>;
|
|
26
26
|
signalListWatcher: BehaviorSubject<BMUser[]>;
|
|
27
|
+
masterUserWatcher: BehaviorSubject<BMUser | null>;
|
|
27
28
|
localUser: BMUser;
|
|
28
29
|
constructor(boomCore: BoomCore, localUser: BMUser);
|
|
29
30
|
initWithRoom(room: BMRoom): void;
|
|
30
|
-
handleUserRoleChange(info: ChangeIsGuest): void
|
|
31
|
+
handleUserRoleChange(info: ChangeIsGuest): Promise<void>;
|
|
31
32
|
/**
|
|
32
33
|
* 添加用户, 并返回已添加的用户对象
|
|
33
34
|
* @param bcUser bcUser对象
|
|
@@ -75,24 +76,33 @@ export default class BMUserVM {
|
|
|
75
76
|
/**
|
|
76
77
|
* 刚加入房间时初始化人数
|
|
77
78
|
*/
|
|
78
|
-
initUserList(): Promise<void>;
|
|
79
|
+
initUserList(pageIndex: number): Promise<void>;
|
|
79
80
|
/**
|
|
80
81
|
* 改变userList中的主持人,返回改变后的主持人用户对象,该方法只在change-master中调用, 不对外暴露
|
|
81
82
|
* @param userId
|
|
83
|
+
* @param oldMasterId
|
|
84
|
+
* @param isKeep
|
|
82
85
|
*/
|
|
83
|
-
updateMaster(userId: string): UpdateMasterType;
|
|
86
|
+
updateMaster(userId: string, oldMasterId: string, isKeep: boolean): UpdateMasterType;
|
|
87
|
+
/**
|
|
88
|
+
* 联席主持人设置嘉宾的操作
|
|
89
|
+
* @param userId
|
|
90
|
+
*/
|
|
91
|
+
managerChangeToGuest(userId: string): any;
|
|
84
92
|
/**
|
|
85
93
|
* 改变联席主持人,返回设置为联席主持人的bmuser对象
|
|
86
94
|
* @param userId
|
|
87
95
|
* @param status true:设置成联席主持人 false:取消联席主持人身份
|
|
96
|
+
* @param hasS
|
|
88
97
|
* @returns
|
|
89
98
|
*/
|
|
90
|
-
updateManager(userId: string, status: boolean): BMUser;
|
|
99
|
+
updateManager(userId: string, status: boolean, hasS?: boolean): BMUser;
|
|
91
100
|
/**
|
|
92
101
|
* 获取我自己
|
|
93
102
|
*/
|
|
94
103
|
getLocalUser(): BMUser;
|
|
95
|
-
|
|
104
|
+
updateSelf(bcUser: BCUser): void;
|
|
105
|
+
updateUser(bmUser: BMUser, bcUser: BCUser): void;
|
|
96
106
|
/**
|
|
97
107
|
* bcUser变成BMUser
|
|
98
108
|
* @param bcUser
|
|
@@ -108,4 +118,20 @@ export default class BMUserVM {
|
|
|
108
118
|
* 排序变化之后的处理逻辑
|
|
109
119
|
*/
|
|
110
120
|
updateSort: () => void;
|
|
121
|
+
/**
|
|
122
|
+
* 初始化所有的用户
|
|
123
|
+
* @param total
|
|
124
|
+
*/
|
|
125
|
+
initUsers(total: number): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* 本地嘉宾用户降级为普通参会者之后要取消拉流
|
|
128
|
+
*/
|
|
129
|
+
handleUnSubCommonUser(): void;
|
|
130
|
+
handleCommonUserChange(): void;
|
|
131
|
+
getUsers(page: number, pageSize: number, permission?: string): Promise<{
|
|
132
|
+
userList: BMUser[];
|
|
133
|
+
total: number;
|
|
134
|
+
}>;
|
|
135
|
+
getTotalUserNumber(): Promise<number>;
|
|
136
|
+
clearUsers(): void;
|
|
111
137
|
}
|
|
@@ -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
|
+
}
|
|
@@ -1,96 +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;
|
|
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;
|
|
@@ -1,86 +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
|
-
};
|
|
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
|
+
};
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* @description:stream
|
|
6
6
|
* @update: 2022-04-25 13:42
|
|
7
7
|
*/
|
|
8
|
-
import LocalStream from '@
|
|
9
|
-
import RemoteStream from '@
|
|
10
|
-
import { StreamDeviceOption } from '@
|
|
11
|
-
import { RemoteStreamOptions } from '@
|
|
12
|
-
export { SubscribeOptions } from '@
|
|
8
|
+
import LocalStream from '@hysc/core/esm/BoomAdapter/singleMode/stream/LocalStream';
|
|
9
|
+
import RemoteStream from '@hysc/core/esm/BoomAdapter/singleMode/stream/RemoteStream';
|
|
10
|
+
import { StreamDeviceOption } from '@hysc/core/esm/BoomAdapter/type/BRTCStream';
|
|
11
|
+
import { RemoteStreamOptions } from '@hysc/core/esm/BoomCore/BCClient/BCClient';
|
|
12
|
+
export { SubscribeOptions } from '@hysc/core/esm/BoomAdapter/type/BRTCClient';
|
|
13
13
|
export declare type SingleLocalStream = LocalStream;
|
|
14
14
|
export declare type SingleRemoteStream = RemoteStream;
|
|
15
15
|
export declare type SingleStream = SingleLocalStream | SingleRemoteStream;
|
|
@@ -0,0 +1,61 @@
|
|
|
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 {};
|