@hysc/meeting 5.0.27 → 5.0.29
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/BMStream/BMStreamModel.d.ts +3 -1
- package/esm/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +5 -5
- package/esm/boom-meeting/src/audioPlay/AudioPlay.d.ts +10 -2
- package/esm/boom-meeting/src/constants.d.ts +1 -0
- package/esm/boom-meeting/src/handleEvent/streamEvent.d.ts +1 -1
- package/esm/boom-meeting/src/util/emitter.d.ts +6 -1
- package/esm/index.js +2 -2
- package/esm/index.js.map +3 -3
- package/esm/src/BMRoom/BMRoom.d.ts +3 -0
- package/esm/src/BMStream/BMStreamModel.d.ts +3 -1
- package/esm/src/BMStream/BMStreamModelVM.d.ts +5 -5
- package/esm/src/audioPlay/AudioPlay.d.ts +10 -2
- package/esm/src/constants.d.ts +1 -0
- package/esm/src/handleEvent/streamEvent.d.ts +1 -1
- package/esm/src/util/emitter.d.ts +6 -1
- package/package.json +3 -3
- package/umd/boom-meeting/src/BMStream/BMStreamModel.d.ts +3 -1
- package/umd/boom-meeting/src/BMStream/BMStreamModelVM.d.ts +5 -5
- package/umd/boom-meeting/src/audioPlay/AudioPlay.d.ts +10 -2
- package/umd/boom-meeting/src/constants.d.ts +1 -0
- package/umd/boom-meeting/src/handleEvent/streamEvent.d.ts +1 -1
- package/umd/boom-meeting/src/util/emitter.d.ts +6 -1
- package/umd/index.js +2 -2
- package/umd/src/BMRoom/BMRoom.d.ts +3 -0
|
@@ -11,6 +11,7 @@ import BMStreamModel, { ConnectErrorMessage } from '../BMStream/BMStreamModel';
|
|
|
11
11
|
import BMUser from '../BMUser/BMUser';
|
|
12
12
|
import BMLiveVM from './BMLiveVM';
|
|
13
13
|
import SingletonQueue, { PullItem } from "../SingletonQueue/SingletonQueue";
|
|
14
|
+
import AudioPlay from "../audioPlay/AudioPlay";
|
|
14
15
|
interface BMRoomProps {
|
|
15
16
|
initDevices: boolean;
|
|
16
17
|
}
|
|
@@ -99,6 +100,7 @@ export default class BMRoom {
|
|
|
99
100
|
brtc: boolean;
|
|
100
101
|
};
|
|
101
102
|
brtcNetEnableWatcher: Subject<boolean>;
|
|
103
|
+
audioPlayer: AudioPlay;
|
|
102
104
|
get isSingleColumns(): boolean;
|
|
103
105
|
/**
|
|
104
106
|
* 传递信息用的,主要是用于message信令往上层业务发送消息
|
|
@@ -110,6 +112,7 @@ export default class BMRoom {
|
|
|
110
112
|
isInWaitRoom: boolean;
|
|
111
113
|
constructor({ initDevices }?: BMRoomProps);
|
|
112
114
|
handleReprocessStreamError: () => void;
|
|
115
|
+
initAudioPlayer(playerContainerId: string): void;
|
|
113
116
|
/**
|
|
114
117
|
* 初始化底层会控相关
|
|
115
118
|
* @param options
|
|
@@ -141,8 +141,10 @@ export default class BMStreamModel {
|
|
|
141
141
|
/**
|
|
142
142
|
* 更新bloud的stream,设置流状态
|
|
143
143
|
* @param streamState
|
|
144
|
+
* @param bmStreamVM
|
|
145
|
+
* @param forceSearch
|
|
144
146
|
*/
|
|
145
|
-
updateBloudStream(streamState: BloudStreamState | undefined, bmStreamVM: BMStreamModelVM): void;
|
|
147
|
+
updateBloudStream(streamState: BloudStreamState | undefined, bmStreamVM: BMStreamModelVM, forceSearch?: boolean): void;
|
|
146
148
|
private onPlayerStateChange;
|
|
147
149
|
handleStreamConnectError: () => void;
|
|
148
150
|
/**
|
|
@@ -36,8 +36,12 @@ export default class BMStreamModelVM {
|
|
|
36
36
|
localModel: BMStreamModel | null;
|
|
37
37
|
room: BMRoom | null;
|
|
38
38
|
bloudStream: any;
|
|
39
|
-
audioStream: SingleLocalStream | undefined;
|
|
40
39
|
brtcStream: SingleLocalStream | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* 后面打开摄像头存储的流,主要是关闭摄像头的时候得把它清除掉
|
|
42
|
+
*/
|
|
43
|
+
videoStream: SingleLocalStream | null;
|
|
44
|
+
audioStream: SingleLocalStream | null;
|
|
41
45
|
/**
|
|
42
46
|
* 本地是否在屏幕共享
|
|
43
47
|
*/
|
|
@@ -50,10 +54,6 @@ export default class BMStreamModelVM {
|
|
|
50
54
|
*/
|
|
51
55
|
mixStreamModelWatcher: BehaviorSubject<BMStreamModel | null>;
|
|
52
56
|
canvasTimer: NodeJS.Timeout | null;
|
|
53
|
-
/**
|
|
54
|
-
* 后面打开摄像头存储的流,主要是关闭摄像头的时候得把它清除掉
|
|
55
|
-
*/
|
|
56
|
-
videoStream: SingleLocalStream | null;
|
|
57
57
|
private _recorder;
|
|
58
58
|
private _isRecording;
|
|
59
59
|
private _slicingRecord;
|
|
@@ -6,9 +6,17 @@
|
|
|
6
6
|
* @update: 2023-06-08 16:35
|
|
7
7
|
*/
|
|
8
8
|
import { SingleStream } from "../type";
|
|
9
|
+
import { AudioPlayer } from '@hysc/core';
|
|
9
10
|
export default class AudioPlay {
|
|
10
11
|
playMap: WeakSet<SingleStream>;
|
|
11
|
-
|
|
12
|
+
playerMap: Map<string, AudioPlayer>;
|
|
13
|
+
container: HTMLDivElement | undefined;
|
|
14
|
+
muted: boolean;
|
|
15
|
+
constructor(containerId: string);
|
|
12
16
|
addStream(stream: SingleStream): void;
|
|
13
|
-
|
|
17
|
+
removeStream(stream: SingleStream): void;
|
|
18
|
+
play(stream: SingleStream): Promise<void>;
|
|
19
|
+
mute(mute: boolean): void;
|
|
20
|
+
setVolume(streamId: string, volume: number): void;
|
|
21
|
+
setDevice(deviceId: string): void;
|
|
14
22
|
}
|
package/esm/src/constants.d.ts
CHANGED
|
@@ -113,3 +113,4 @@ export declare const BIND_BIG_ELEMENT = "bind-big-element";
|
|
|
113
113
|
export declare const NO_CONTAINER = "no-container";
|
|
114
114
|
export declare const MODEL_SORT_NUM_CHANGE = "model-sort-num-change";
|
|
115
115
|
export declare const ADD_PULL_USER = "add-pull-user";
|
|
116
|
+
export declare const SET_VOLUME = "set-volume";
|
|
@@ -17,7 +17,7 @@ export declare function handleBloudReconnectStreamEvent(bmStreamVm: BMStreamMode
|
|
|
17
17
|
export declare const handleReconnectedStream: import("lodash-es").DebouncedFunc<(bmRoom: BMRoom) => void>;
|
|
18
18
|
export declare function handleStreamPublished(event: any, bmStreamVm: BMStreamModelVM, bmRoom: BMRoom, observes: any): void;
|
|
19
19
|
export declare function handleBloudStreamPublished(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
|
|
20
|
-
export declare function handleBloudStreamPubAUpdate(data: BloudStreamEventState, bmStreamVm: BMStreamModelVM): void;
|
|
20
|
+
export declare function handleBloudStreamPubAUpdate(data: BloudStreamEventState, bmStreamVm: BMStreamModelVM, isPublish?: boolean): void;
|
|
21
21
|
export declare function handleBloudStreamUnPublished(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
|
|
22
22
|
export declare function handleBloudStreamUnpublish(data: BloudUnPubEvent, bmStreamVm: BMStreamModelVM): void;
|
|
23
23
|
export declare function handleShareStreamFailed(bmRoom: BMRoom, bmStreamVm: BMStreamModelVM): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConnectErrorMessage, NoPlayerContainer, SubscribeMessage } from "../BMStream/BMStreamModel";
|
|
2
|
-
import { 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, UNSUBSCRIBE_STREAM, USER_SORT_NUM_CHANGE } from "../constants";
|
|
2
|
+
import { 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";
|
|
3
3
|
import { RaiseHandInfo } from "../BMUser/BMUser";
|
|
4
4
|
import { ChangeIsGuest } from "../BMUser/BMUserVM";
|
|
5
5
|
import { PullItem } from "../SingletonQueue/SingletonQueue";
|
|
@@ -7,6 +7,10 @@ export declare type UserSortType = {
|
|
|
7
7
|
isCommon: boolean;
|
|
8
8
|
shouldDelay: boolean;
|
|
9
9
|
};
|
|
10
|
+
export declare type VolumeInfo = {
|
|
11
|
+
streamId: string;
|
|
12
|
+
volume: number;
|
|
13
|
+
};
|
|
10
14
|
declare type Events = {
|
|
11
15
|
[RECEIVE_SUBSCRIBE_MESSAGE]: SubscribeMessage;
|
|
12
16
|
[USER_SORT_NUM_CHANGE]: UserSortType;
|
|
@@ -20,6 +24,7 @@ declare type Events = {
|
|
|
20
24
|
[NO_CONTAINER]: NoPlayerContainer;
|
|
21
25
|
[MODEL_SORT_NUM_CHANGE]: null;
|
|
22
26
|
[ADD_PULL_USER]: PullItem;
|
|
27
|
+
[SET_VOLUME]: VolumeInfo;
|
|
23
28
|
};
|
|
24
29
|
export declare const emitter: import("mitt").Emitter<Events>;
|
|
25
30
|
export declare const removeEmitter: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hysc/meeting",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.29",
|
|
4
4
|
"description": "boom meeting",
|
|
5
5
|
"main": "umd/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"author": "yangliye",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@hysc/core": "5.0.
|
|
17
|
+
"@hysc/core": "5.0.27",
|
|
18
18
|
"lodash-es": "^4.17.21",
|
|
19
19
|
"mitt": "^3.0.0",
|
|
20
20
|
"@hysc/p-queue": "6.3.0",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@hysc/utils": "1.2.3"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@hysc/core": "5.0.
|
|
26
|
+
"@hysc/core": "5.0.27"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/lodash-es": "^4.17.6"
|
|
@@ -141,8 +141,10 @@ export default class BMStreamModel {
|
|
|
141
141
|
/**
|
|
142
142
|
* 更新bloud的stream,设置流状态
|
|
143
143
|
* @param streamState
|
|
144
|
+
* @param bmStreamVM
|
|
145
|
+
* @param forceSearch
|
|
144
146
|
*/
|
|
145
|
-
updateBloudStream(streamState: BloudStreamState | undefined, bmStreamVM: BMStreamModelVM): void;
|
|
147
|
+
updateBloudStream(streamState: BloudStreamState | undefined, bmStreamVM: BMStreamModelVM, forceSearch?: boolean): void;
|
|
146
148
|
private onPlayerStateChange;
|
|
147
149
|
handleStreamConnectError: () => void;
|
|
148
150
|
/**
|
|
@@ -36,8 +36,12 @@ export default class BMStreamModelVM {
|
|
|
36
36
|
localModel: BMStreamModel | null;
|
|
37
37
|
room: BMRoom | null;
|
|
38
38
|
bloudStream: any;
|
|
39
|
-
audioStream: SingleLocalStream | undefined;
|
|
40
39
|
brtcStream: SingleLocalStream | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* 后面打开摄像头存储的流,主要是关闭摄像头的时候得把它清除掉
|
|
42
|
+
*/
|
|
43
|
+
videoStream: SingleLocalStream | null;
|
|
44
|
+
audioStream: SingleLocalStream | null;
|
|
41
45
|
/**
|
|
42
46
|
* 本地是否在屏幕共享
|
|
43
47
|
*/
|
|
@@ -50,10 +54,6 @@ export default class BMStreamModelVM {
|
|
|
50
54
|
*/
|
|
51
55
|
mixStreamModelWatcher: BehaviorSubject<BMStreamModel | null>;
|
|
52
56
|
canvasTimer: NodeJS.Timeout | null;
|
|
53
|
-
/**
|
|
54
|
-
* 后面打开摄像头存储的流,主要是关闭摄像头的时候得把它清除掉
|
|
55
|
-
*/
|
|
56
|
-
videoStream: SingleLocalStream | null;
|
|
57
57
|
private _recorder;
|
|
58
58
|
private _isRecording;
|
|
59
59
|
private _slicingRecord;
|
|
@@ -6,9 +6,17 @@
|
|
|
6
6
|
* @update: 2023-06-08 16:35
|
|
7
7
|
*/
|
|
8
8
|
import { SingleStream } from "../type";
|
|
9
|
+
import { AudioPlayer } from '@hysc/core';
|
|
9
10
|
export default class AudioPlay {
|
|
10
11
|
playMap: WeakSet<SingleStream>;
|
|
11
|
-
|
|
12
|
+
playerMap: Map<string, AudioPlayer>;
|
|
13
|
+
container: HTMLDivElement | undefined;
|
|
14
|
+
muted: boolean;
|
|
15
|
+
constructor(containerId: string);
|
|
12
16
|
addStream(stream: SingleStream): void;
|
|
13
|
-
|
|
17
|
+
removeStream(stream: SingleStream): void;
|
|
18
|
+
play(stream: SingleStream): Promise<void>;
|
|
19
|
+
mute(mute: boolean): void;
|
|
20
|
+
setVolume(streamId: string, volume: number): void;
|
|
21
|
+
setDevice(deviceId: string): void;
|
|
14
22
|
}
|
|
@@ -113,3 +113,4 @@ export declare const BIND_BIG_ELEMENT = "bind-big-element";
|
|
|
113
113
|
export declare const NO_CONTAINER = "no-container";
|
|
114
114
|
export declare const MODEL_SORT_NUM_CHANGE = "model-sort-num-change";
|
|
115
115
|
export declare const ADD_PULL_USER = "add-pull-user";
|
|
116
|
+
export declare const SET_VOLUME = "set-volume";
|
|
@@ -17,7 +17,7 @@ export declare function handleBloudReconnectStreamEvent(bmStreamVm: BMStreamMode
|
|
|
17
17
|
export declare const handleReconnectedStream: any;
|
|
18
18
|
export declare function handleStreamPublished(event: any, bmStreamVm: BMStreamModelVM, bmRoom: BMRoom, observes: any): void;
|
|
19
19
|
export declare function handleBloudStreamPublished(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
|
|
20
|
-
export declare function handleBloudStreamPubAUpdate(data: BloudStreamEventState, bmStreamVm: BMStreamModelVM): void;
|
|
20
|
+
export declare function handleBloudStreamPubAUpdate(data: BloudStreamEventState, bmStreamVm: BMStreamModelVM, isPublish?: boolean): void;
|
|
21
21
|
export declare function handleBloudStreamUnPublished(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
|
|
22
22
|
export declare function handleBloudStreamUnpublish(data: BloudUnPubEvent, bmStreamVm: BMStreamModelVM): void;
|
|
23
23
|
export declare function handleShareStreamFailed(bmRoom: BMRoom, bmStreamVm: BMStreamModelVM): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConnectErrorMessage, NoPlayerContainer, SubscribeMessage } from "../BMStream/BMStreamModel";
|
|
2
|
-
import { 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, UNSUBSCRIBE_STREAM, USER_SORT_NUM_CHANGE } from "../constants";
|
|
2
|
+
import { 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";
|
|
3
3
|
import { RaiseHandInfo } from "../BMUser/BMUser";
|
|
4
4
|
import { ChangeIsGuest } from "../BMUser/BMUserVM";
|
|
5
5
|
import { PullItem } from "../SingletonQueue/SingletonQueue";
|
|
@@ -7,6 +7,10 @@ export declare type UserSortType = {
|
|
|
7
7
|
isCommon: boolean;
|
|
8
8
|
shouldDelay: boolean;
|
|
9
9
|
};
|
|
10
|
+
export declare type VolumeInfo = {
|
|
11
|
+
streamId: string;
|
|
12
|
+
volume: number;
|
|
13
|
+
};
|
|
10
14
|
declare type Events = {
|
|
11
15
|
[RECEIVE_SUBSCRIBE_MESSAGE]: SubscribeMessage;
|
|
12
16
|
[USER_SORT_NUM_CHANGE]: UserSortType;
|
|
@@ -20,6 +24,7 @@ declare type Events = {
|
|
|
20
24
|
[NO_CONTAINER]: NoPlayerContainer;
|
|
21
25
|
[MODEL_SORT_NUM_CHANGE]: null;
|
|
22
26
|
[ADD_PULL_USER]: PullItem;
|
|
27
|
+
[SET_VOLUME]: VolumeInfo;
|
|
23
28
|
};
|
|
24
29
|
export declare const emitter: import("mitt").Emitter<Events>;
|
|
25
30
|
export declare const removeEmitter: () => void;
|