@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.
@@ -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
- audioCtx: AudioContext;
12
+ playerMap: Map<string, AudioPlayer>;
13
+ container: HTMLDivElement | undefined;
14
+ muted: boolean;
15
+ constructor(containerId: string);
12
16
  addStream(stream: SingleStream): void;
13
- play(stream: SingleStream): void;
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;