@hysc/meeting 10.0.12 → 10.0.14
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 +45 -6
- package/dist/index.d.ts +45 -6
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as lodash_es from 'lodash-es';
|
|
2
2
|
import * as _hysc_brtc from '@hysc/brtc';
|
|
3
|
-
import { LocalStream, RemoteStream, Device, SubscribeOptions, VideoProfile, AudioHint } from '@hysc/brtc';
|
|
3
|
+
import { LocalStream, RemoteStream, Device, SubscribeOptions, VideoProfile, AudioHint, StreamCodecOption } from '@hysc/brtc';
|
|
4
4
|
import BCClient, { BCUser, ShareMediaOptions, Player, AudioPlayer } from '@hysc/core';
|
|
5
5
|
import { BehaviorSubject, Subject } from 'rxjs';
|
|
6
6
|
import { BoomError } from '@hysc/utils';
|
|
@@ -155,6 +155,7 @@ declare class SingletonQueue {
|
|
|
155
155
|
|
|
156
156
|
declare type UserSortType = {
|
|
157
157
|
isCommon: boolean;
|
|
158
|
+
isAudience: boolean;
|
|
158
159
|
shouldDelay: boolean;
|
|
159
160
|
};
|
|
160
161
|
|
|
@@ -224,7 +225,7 @@ declare class BMUserVM {
|
|
|
224
225
|
*/
|
|
225
226
|
initUserList(usersInRoom: Map<string, BCUser>): Promise<void>;
|
|
226
227
|
addBcUsersMap(users: Map<string, BCUser>, forceGetStream?: boolean): void;
|
|
227
|
-
addBCUser: (bcUser: BCUser, forceGetStream?: boolean) => BMUser | null;
|
|
228
|
+
addBCUser: (bcUser: BCUser, forceGetStream?: boolean) => BMUser | null | undefined;
|
|
228
229
|
/**
|
|
229
230
|
* 改变userList中的主持人,返回改变后的主持人用户对象,该方法只在change-master中调用, 不对外暴露
|
|
230
231
|
* @param userId
|
|
@@ -270,7 +271,7 @@ declare class BMUserVM {
|
|
|
270
271
|
updateUserSort: lodash_es.DebouncedFunc<() => void>;
|
|
271
272
|
updateCommonUserSort: lodash_es.DebouncedFunc<() => void>;
|
|
272
273
|
updateDelayCommonUserSort: lodash_es.DebouncedFunc<() => void>;
|
|
273
|
-
updateAudienceUserSort: () => void
|
|
274
|
+
updateAudienceUserSort: lodash_es.DebouncedFunc<() => void>;
|
|
274
275
|
updateSignalUserSort: () => void;
|
|
275
276
|
/**
|
|
276
277
|
* 初始化所有的用户
|
|
@@ -308,6 +309,7 @@ declare class BMUserVM {
|
|
|
308
309
|
searchUsers(searchTxt: string, pageSize: number): Promise<{
|
|
309
310
|
userList: BMUser[];
|
|
310
311
|
commonUserList: BMUser[];
|
|
312
|
+
audienceList: BMUser[];
|
|
311
313
|
}>;
|
|
312
314
|
/**
|
|
313
315
|
* 查找等候室用户
|
|
@@ -315,6 +317,7 @@ declare class BMUserVM {
|
|
|
315
317
|
* @param pageSize
|
|
316
318
|
*/
|
|
317
319
|
searchWaitRoomUsers(searchTxt: string, pageSize: number): Promise<BMUser[]>;
|
|
320
|
+
createUser(bcUser: BCUser): BMUser;
|
|
318
321
|
}
|
|
319
322
|
|
|
320
323
|
declare class BMChatVM {
|
|
@@ -379,11 +382,14 @@ declare class BMStreamModelVM {
|
|
|
379
382
|
*/
|
|
380
383
|
localIsShare: boolean;
|
|
381
384
|
isShareWatcher: Subject<boolean>;
|
|
385
|
+
localShareCustomStats: any;
|
|
382
386
|
_speaker_enable: boolean;
|
|
383
387
|
speakerEnableWatcher: BehaviorSubject<boolean>;
|
|
384
388
|
/**
|
|
385
389
|
* 混流
|
|
386
390
|
*/
|
|
391
|
+
mixStreamUid: string | null;
|
|
392
|
+
get mixStreamModel(): BMStreamModel | null | undefined;
|
|
387
393
|
mixStreamModelWatcher: BehaviorSubject<BMStreamModel | null>;
|
|
388
394
|
canvasTimer: NodeJS.Timeout | null;
|
|
389
395
|
private _recorder;
|
|
@@ -409,12 +415,18 @@ declare class BMStreamModelVM {
|
|
|
409
415
|
* 共享屏幕流错误
|
|
410
416
|
*/
|
|
411
417
|
localShareError: Subject<BoomError>;
|
|
418
|
+
localShareEndedError: Subject<boolean>;
|
|
412
419
|
/**
|
|
413
420
|
* 共享屏幕流是单独处理的逻辑,不是先创建streamModel然后在去查流,而是先去查流,在创建streamModel
|
|
414
421
|
*/
|
|
415
422
|
shareBloudStateMap: Map<string, BloudStreamEventState>;
|
|
423
|
+
/**
|
|
424
|
+
* 窗口播放事件,给到端上去做埋点
|
|
425
|
+
*/
|
|
426
|
+
streamPlayWatcher: Subject<StreamPlayMessage>;
|
|
416
427
|
constructor();
|
|
417
428
|
private static filterStreamModels;
|
|
429
|
+
handleStreamPlay: (info: StreamPlayMessage) => void;
|
|
418
430
|
initWithRoom(room: BMRoom): this;
|
|
419
431
|
/**
|
|
420
432
|
* 设置扬声器是否打开
|
|
@@ -576,7 +588,7 @@ declare class BMStreamModelVM {
|
|
|
576
588
|
/**
|
|
577
589
|
* 更新流信息 会给服务端发送updateStream信令,会收到updateStream的广播
|
|
578
590
|
*/
|
|
579
|
-
updateBloudStreamCustomStats(uid: string, streamId: string, streamInfo: StreamCustomInfo): Promise<
|
|
591
|
+
updateBloudStreamCustomStats(uid: string, streamId: string, streamInfo: StreamCustomInfo): Promise<void>;
|
|
580
592
|
/**
|
|
581
593
|
* 布局发生变化之后去调用一下这个方法去检测所有流的播放状态
|
|
582
594
|
* @param {string} status tag 用于区分是什么状态下调用的
|
|
@@ -602,6 +614,9 @@ interface NoPlayerContainer {
|
|
|
602
614
|
container: 'small' | 'big';
|
|
603
615
|
id: string;
|
|
604
616
|
}
|
|
617
|
+
interface StreamPlayMessage {
|
|
618
|
+
uid: string;
|
|
619
|
+
}
|
|
605
620
|
/**
|
|
606
621
|
* 播放器状态
|
|
607
622
|
*/
|
|
@@ -677,7 +692,7 @@ declare class BMStreamModel {
|
|
|
677
692
|
get uuid(): string;
|
|
678
693
|
get isAudience(): boolean;
|
|
679
694
|
/**
|
|
680
|
-
*
|
|
695
|
+
* 因为直播模式中,观众是不展示的
|
|
681
696
|
* 所以这个地方要判断一下
|
|
682
697
|
*/
|
|
683
698
|
get canShow(): boolean;
|
|
@@ -946,6 +961,9 @@ declare class BMUser {
|
|
|
946
961
|
raiseVideoHands: boolean;
|
|
947
962
|
raiseAudioHands: boolean;
|
|
948
963
|
raiseHand: boolean;
|
|
964
|
+
/**
|
|
965
|
+
* 观众
|
|
966
|
+
*/
|
|
949
967
|
isAudience: boolean;
|
|
950
968
|
/**
|
|
951
969
|
* 是不是普通参会者
|
|
@@ -1582,7 +1600,7 @@ declare class BMLiveVM {
|
|
|
1582
1600
|
private get localBMUser();
|
|
1583
1601
|
private get localIsAudience();
|
|
1584
1602
|
/**
|
|
1585
|
-
*
|
|
1603
|
+
* 拉流处理, 观众只拉混流
|
|
1586
1604
|
* @param bmStreamModel
|
|
1587
1605
|
*/
|
|
1588
1606
|
handlePull(bmStreamModel: BMStreamModel): Promise<void>;
|
|
@@ -1600,6 +1618,7 @@ declare class BMLiveVM {
|
|
|
1600
1618
|
* 观众允许发言,允许发言之后,要把所有的流都拉,然后混流静音
|
|
1601
1619
|
*/
|
|
1602
1620
|
handleAudienceEnable(): Promise<void>;
|
|
1621
|
+
handleMixStream(mute: boolean): Promise<void>;
|
|
1603
1622
|
}
|
|
1604
1623
|
|
|
1605
1624
|
/**
|
|
@@ -1696,6 +1715,10 @@ declare class BMRoom {
|
|
|
1696
1715
|
videoProfile: VideoProfile;
|
|
1697
1716
|
audioProfile: AudioProfileInfo | null;
|
|
1698
1717
|
voiceMode: AudioHint;
|
|
1718
|
+
/**
|
|
1719
|
+
* 视频自定义编码设置
|
|
1720
|
+
*/
|
|
1721
|
+
videoEncodeConfig: StreamCodecOption | null;
|
|
1699
1722
|
setVoiceMode(mode: AudioHint): void;
|
|
1700
1723
|
/**
|
|
1701
1724
|
* brtc断网重连要给端上事件响应,所有端上把流单独做处理的,需要在收到这个事件之后,重新处理所有的effect
|
|
@@ -1730,6 +1753,12 @@ declare class BMRoom {
|
|
|
1730
1753
|
audioPlayer: AudioPlay;
|
|
1731
1754
|
private pubFailedTimer;
|
|
1732
1755
|
get isSingleColumns(): boolean;
|
|
1756
|
+
get localIsAudience(): boolean;
|
|
1757
|
+
get shouldIgnoreStream(): boolean;
|
|
1758
|
+
/**
|
|
1759
|
+
* 研讨会
|
|
1760
|
+
*/
|
|
1761
|
+
get isWorkShop(): boolean;
|
|
1733
1762
|
/**
|
|
1734
1763
|
* 传递信息用的,主要是用于message信令往上层业务发送消息
|
|
1735
1764
|
*/
|
|
@@ -1769,6 +1798,15 @@ declare class BMRoom {
|
|
|
1769
1798
|
* @param profile 设置视频分辨率
|
|
1770
1799
|
*/
|
|
1771
1800
|
setVideoProfile(profile: VideoProfile): void;
|
|
1801
|
+
/**
|
|
1802
|
+
* 设置视频分辨率, 需要在入会之前调用
|
|
1803
|
+
* @param encodeConfig
|
|
1804
|
+
* @param encodeConfig.width 宽
|
|
1805
|
+
* @param encodeConfig.height 高
|
|
1806
|
+
* @param encodeConfig.biterate 码率
|
|
1807
|
+
* @param encodeConfig.frameRate 帧率
|
|
1808
|
+
*/
|
|
1809
|
+
setCustomVideoEncodeConfig(encodeConfig: StreamCodecOption): void;
|
|
1772
1810
|
setUserListColumns(column: number): void;
|
|
1773
1811
|
setSortType(type: number): void;
|
|
1774
1812
|
/**
|
|
@@ -2316,6 +2354,7 @@ declare class BMRoom {
|
|
|
2316
2354
|
queryBrtcStreams(uids: string[]): Promise<_hysc_brtc.RemoteStream[]>;
|
|
2317
2355
|
handleAddStreams(streams: SingleRemoteStream[]): void;
|
|
2318
2356
|
getForceUser(forceId: string): Promise<void>;
|
|
2357
|
+
queryUsers(uids: string[]): Promise<void>;
|
|
2319
2358
|
getVersion(): string;
|
|
2320
2359
|
}
|
|
2321
2360
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as lodash_es from 'lodash-es';
|
|
2
2
|
import * as _hysc_brtc from '@hysc/brtc';
|
|
3
|
-
import { LocalStream, RemoteStream, Device, SubscribeOptions, VideoProfile, AudioHint } from '@hysc/brtc';
|
|
3
|
+
import { LocalStream, RemoteStream, Device, SubscribeOptions, VideoProfile, AudioHint, StreamCodecOption } from '@hysc/brtc';
|
|
4
4
|
import BCClient, { BCUser, ShareMediaOptions, Player, AudioPlayer } from '@hysc/core';
|
|
5
5
|
import { BehaviorSubject, Subject } from 'rxjs';
|
|
6
6
|
import { BoomError } from '@hysc/utils';
|
|
@@ -155,6 +155,7 @@ declare class SingletonQueue {
|
|
|
155
155
|
|
|
156
156
|
declare type UserSortType = {
|
|
157
157
|
isCommon: boolean;
|
|
158
|
+
isAudience: boolean;
|
|
158
159
|
shouldDelay: boolean;
|
|
159
160
|
};
|
|
160
161
|
|
|
@@ -224,7 +225,7 @@ declare class BMUserVM {
|
|
|
224
225
|
*/
|
|
225
226
|
initUserList(usersInRoom: Map<string, BCUser>): Promise<void>;
|
|
226
227
|
addBcUsersMap(users: Map<string, BCUser>, forceGetStream?: boolean): void;
|
|
227
|
-
addBCUser: (bcUser: BCUser, forceGetStream?: boolean) => BMUser | null;
|
|
228
|
+
addBCUser: (bcUser: BCUser, forceGetStream?: boolean) => BMUser | null | undefined;
|
|
228
229
|
/**
|
|
229
230
|
* 改变userList中的主持人,返回改变后的主持人用户对象,该方法只在change-master中调用, 不对外暴露
|
|
230
231
|
* @param userId
|
|
@@ -270,7 +271,7 @@ declare class BMUserVM {
|
|
|
270
271
|
updateUserSort: lodash_es.DebouncedFunc<() => void>;
|
|
271
272
|
updateCommonUserSort: lodash_es.DebouncedFunc<() => void>;
|
|
272
273
|
updateDelayCommonUserSort: lodash_es.DebouncedFunc<() => void>;
|
|
273
|
-
updateAudienceUserSort: () => void
|
|
274
|
+
updateAudienceUserSort: lodash_es.DebouncedFunc<() => void>;
|
|
274
275
|
updateSignalUserSort: () => void;
|
|
275
276
|
/**
|
|
276
277
|
* 初始化所有的用户
|
|
@@ -308,6 +309,7 @@ declare class BMUserVM {
|
|
|
308
309
|
searchUsers(searchTxt: string, pageSize: number): Promise<{
|
|
309
310
|
userList: BMUser[];
|
|
310
311
|
commonUserList: BMUser[];
|
|
312
|
+
audienceList: BMUser[];
|
|
311
313
|
}>;
|
|
312
314
|
/**
|
|
313
315
|
* 查找等候室用户
|
|
@@ -315,6 +317,7 @@ declare class BMUserVM {
|
|
|
315
317
|
* @param pageSize
|
|
316
318
|
*/
|
|
317
319
|
searchWaitRoomUsers(searchTxt: string, pageSize: number): Promise<BMUser[]>;
|
|
320
|
+
createUser(bcUser: BCUser): BMUser;
|
|
318
321
|
}
|
|
319
322
|
|
|
320
323
|
declare class BMChatVM {
|
|
@@ -379,11 +382,14 @@ declare class BMStreamModelVM {
|
|
|
379
382
|
*/
|
|
380
383
|
localIsShare: boolean;
|
|
381
384
|
isShareWatcher: Subject<boolean>;
|
|
385
|
+
localShareCustomStats: any;
|
|
382
386
|
_speaker_enable: boolean;
|
|
383
387
|
speakerEnableWatcher: BehaviorSubject<boolean>;
|
|
384
388
|
/**
|
|
385
389
|
* 混流
|
|
386
390
|
*/
|
|
391
|
+
mixStreamUid: string | null;
|
|
392
|
+
get mixStreamModel(): BMStreamModel | null | undefined;
|
|
387
393
|
mixStreamModelWatcher: BehaviorSubject<BMStreamModel | null>;
|
|
388
394
|
canvasTimer: NodeJS.Timeout | null;
|
|
389
395
|
private _recorder;
|
|
@@ -409,12 +415,18 @@ declare class BMStreamModelVM {
|
|
|
409
415
|
* 共享屏幕流错误
|
|
410
416
|
*/
|
|
411
417
|
localShareError: Subject<BoomError>;
|
|
418
|
+
localShareEndedError: Subject<boolean>;
|
|
412
419
|
/**
|
|
413
420
|
* 共享屏幕流是单独处理的逻辑,不是先创建streamModel然后在去查流,而是先去查流,在创建streamModel
|
|
414
421
|
*/
|
|
415
422
|
shareBloudStateMap: Map<string, BloudStreamEventState>;
|
|
423
|
+
/**
|
|
424
|
+
* 窗口播放事件,给到端上去做埋点
|
|
425
|
+
*/
|
|
426
|
+
streamPlayWatcher: Subject<StreamPlayMessage>;
|
|
416
427
|
constructor();
|
|
417
428
|
private static filterStreamModels;
|
|
429
|
+
handleStreamPlay: (info: StreamPlayMessage) => void;
|
|
418
430
|
initWithRoom(room: BMRoom): this;
|
|
419
431
|
/**
|
|
420
432
|
* 设置扬声器是否打开
|
|
@@ -576,7 +588,7 @@ declare class BMStreamModelVM {
|
|
|
576
588
|
/**
|
|
577
589
|
* 更新流信息 会给服务端发送updateStream信令,会收到updateStream的广播
|
|
578
590
|
*/
|
|
579
|
-
updateBloudStreamCustomStats(uid: string, streamId: string, streamInfo: StreamCustomInfo): Promise<
|
|
591
|
+
updateBloudStreamCustomStats(uid: string, streamId: string, streamInfo: StreamCustomInfo): Promise<void>;
|
|
580
592
|
/**
|
|
581
593
|
* 布局发生变化之后去调用一下这个方法去检测所有流的播放状态
|
|
582
594
|
* @param {string} status tag 用于区分是什么状态下调用的
|
|
@@ -602,6 +614,9 @@ interface NoPlayerContainer {
|
|
|
602
614
|
container: 'small' | 'big';
|
|
603
615
|
id: string;
|
|
604
616
|
}
|
|
617
|
+
interface StreamPlayMessage {
|
|
618
|
+
uid: string;
|
|
619
|
+
}
|
|
605
620
|
/**
|
|
606
621
|
* 播放器状态
|
|
607
622
|
*/
|
|
@@ -677,7 +692,7 @@ declare class BMStreamModel {
|
|
|
677
692
|
get uuid(): string;
|
|
678
693
|
get isAudience(): boolean;
|
|
679
694
|
/**
|
|
680
|
-
*
|
|
695
|
+
* 因为直播模式中,观众是不展示的
|
|
681
696
|
* 所以这个地方要判断一下
|
|
682
697
|
*/
|
|
683
698
|
get canShow(): boolean;
|
|
@@ -946,6 +961,9 @@ declare class BMUser {
|
|
|
946
961
|
raiseVideoHands: boolean;
|
|
947
962
|
raiseAudioHands: boolean;
|
|
948
963
|
raiseHand: boolean;
|
|
964
|
+
/**
|
|
965
|
+
* 观众
|
|
966
|
+
*/
|
|
949
967
|
isAudience: boolean;
|
|
950
968
|
/**
|
|
951
969
|
* 是不是普通参会者
|
|
@@ -1582,7 +1600,7 @@ declare class BMLiveVM {
|
|
|
1582
1600
|
private get localBMUser();
|
|
1583
1601
|
private get localIsAudience();
|
|
1584
1602
|
/**
|
|
1585
|
-
*
|
|
1603
|
+
* 拉流处理, 观众只拉混流
|
|
1586
1604
|
* @param bmStreamModel
|
|
1587
1605
|
*/
|
|
1588
1606
|
handlePull(bmStreamModel: BMStreamModel): Promise<void>;
|
|
@@ -1600,6 +1618,7 @@ declare class BMLiveVM {
|
|
|
1600
1618
|
* 观众允许发言,允许发言之后,要把所有的流都拉,然后混流静音
|
|
1601
1619
|
*/
|
|
1602
1620
|
handleAudienceEnable(): Promise<void>;
|
|
1621
|
+
handleMixStream(mute: boolean): Promise<void>;
|
|
1603
1622
|
}
|
|
1604
1623
|
|
|
1605
1624
|
/**
|
|
@@ -1696,6 +1715,10 @@ declare class BMRoom {
|
|
|
1696
1715
|
videoProfile: VideoProfile;
|
|
1697
1716
|
audioProfile: AudioProfileInfo | null;
|
|
1698
1717
|
voiceMode: AudioHint;
|
|
1718
|
+
/**
|
|
1719
|
+
* 视频自定义编码设置
|
|
1720
|
+
*/
|
|
1721
|
+
videoEncodeConfig: StreamCodecOption | null;
|
|
1699
1722
|
setVoiceMode(mode: AudioHint): void;
|
|
1700
1723
|
/**
|
|
1701
1724
|
* brtc断网重连要给端上事件响应,所有端上把流单独做处理的,需要在收到这个事件之后,重新处理所有的effect
|
|
@@ -1730,6 +1753,12 @@ declare class BMRoom {
|
|
|
1730
1753
|
audioPlayer: AudioPlay;
|
|
1731
1754
|
private pubFailedTimer;
|
|
1732
1755
|
get isSingleColumns(): boolean;
|
|
1756
|
+
get localIsAudience(): boolean;
|
|
1757
|
+
get shouldIgnoreStream(): boolean;
|
|
1758
|
+
/**
|
|
1759
|
+
* 研讨会
|
|
1760
|
+
*/
|
|
1761
|
+
get isWorkShop(): boolean;
|
|
1733
1762
|
/**
|
|
1734
1763
|
* 传递信息用的,主要是用于message信令往上层业务发送消息
|
|
1735
1764
|
*/
|
|
@@ -1769,6 +1798,15 @@ declare class BMRoom {
|
|
|
1769
1798
|
* @param profile 设置视频分辨率
|
|
1770
1799
|
*/
|
|
1771
1800
|
setVideoProfile(profile: VideoProfile): void;
|
|
1801
|
+
/**
|
|
1802
|
+
* 设置视频分辨率, 需要在入会之前调用
|
|
1803
|
+
* @param encodeConfig
|
|
1804
|
+
* @param encodeConfig.width 宽
|
|
1805
|
+
* @param encodeConfig.height 高
|
|
1806
|
+
* @param encodeConfig.biterate 码率
|
|
1807
|
+
* @param encodeConfig.frameRate 帧率
|
|
1808
|
+
*/
|
|
1809
|
+
setCustomVideoEncodeConfig(encodeConfig: StreamCodecOption): void;
|
|
1772
1810
|
setUserListColumns(column: number): void;
|
|
1773
1811
|
setSortType(type: number): void;
|
|
1774
1812
|
/**
|
|
@@ -2316,6 +2354,7 @@ declare class BMRoom {
|
|
|
2316
2354
|
queryBrtcStreams(uids: string[]): Promise<_hysc_brtc.RemoteStream[]>;
|
|
2317
2355
|
handleAddStreams(streams: SingleRemoteStream[]): void;
|
|
2318
2356
|
getForceUser(forceId: string): Promise<void>;
|
|
2357
|
+
queryUsers(uids: string[]): Promise<void>;
|
|
2319
2358
|
getVersion(): string;
|
|
2320
2359
|
}
|
|
2321
2360
|
|