@hysc/meeting 5.0.67 → 5.0.69

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.
@@ -1,6 +1,7 @@
1
1
  import { SingleStream, SubscribeOptions } from "../type";
2
2
  import BMUser from "../BMUser/BMUser";
3
3
  import { BehaviorSubject, Subject } from "rxjs";
4
+ import { Player } from "@hysc/core/esm";
4
5
  import BMStreamModelVM from "./BMStreamModelVM";
5
6
  import { BloudStreamState } from "../handleEvent/attachEvents";
6
7
  /**
@@ -73,8 +74,8 @@ export default class BMStreamModel {
73
74
  */
74
75
  pulledStreamGoal: StreamType;
75
76
  bigPlayerId: string;
76
- private player;
77
- private isPlayingBig;
77
+ player: Player | undefined | null;
78
+ isPlayingBig: boolean;
78
79
  /**
79
80
  * 是否静音了扬声器,brtc不会处理业务上静音的逻辑,所以需要自己处理
80
81
  * 如果静音了,就把所有的流都重新静音播放一遍
@@ -250,7 +251,7 @@ export default class BMStreamModel {
250
251
  *
251
252
  * @returns
252
253
  */
253
- resume(): Promise<any> | undefined;
254
+ resume(): void;
254
255
  /**
255
256
  * 是否有音频流
256
257
  */
@@ -8,12 +8,14 @@
8
8
  import { SingleStream } from "../type";
9
9
  import { AudioPlayer } from '@hysc/core';
10
10
  import BMRoom from "../BMRoom/BMRoom";
11
+ import { Subject } from "rxjs";
11
12
  export default class AudioPlay {
12
13
  playMap: WeakSet<SingleStream>;
13
14
  playerMap: Map<string, AudioPlayer>;
14
15
  container: HTMLDivElement | undefined;
15
16
  muted: boolean;
16
17
  room: BMRoom;
18
+ playStateChangeWatcher: Subject<AudioPlayer>;
17
19
  constructor(containerId: string, room: BMRoom);
18
20
  addStream(stream: SingleStream): void;
19
21
  removeStream(stream: SingleStream): void;
@@ -21,4 +23,6 @@ export default class AudioPlay {
21
23
  mute(mute: boolean): void;
22
24
  setVolume(streamId: string, volume: number): void;
23
25
  setDevice(deviceId: string): void;
26
+ addPlayerEvent(player: AudioPlayer): void;
27
+ destroy(): void;
24
28
  }
@@ -114,3 +114,4 @@ 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
116
  export declare const SET_VOLUME = "set-volume";
117
+ export declare const ADD_AUDIO_PLAY = "add-audio-play";
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { Emitter } from "mitt";
9
9
  import { ConnectErrorMessage, NoPlayerContainer, SubscribeMessage } from "../BMStream/BMStreamModel";
10
- 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";
10
+ import { ADD_AUDIO_PLAY, 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";
11
11
  import { RaiseHandInfo } from "../BMUser/BMUser";
12
12
  import { ChangeIsGuest } from "../BMUser/BMUserVM";
13
13
  import { PullItem } from "../SingletonQueue/SingletonQueue";
@@ -33,6 +33,7 @@ declare type Events = {
33
33
  [MODEL_SORT_NUM_CHANGE]: null;
34
34
  [ADD_PULL_USER]: PullItem;
35
35
  [SET_VOLUME]: VolumeInfo;
36
+ [ADD_AUDIO_PLAY]: SubscribeMessage;
36
37
  };
37
38
  export default class BoomEmitter {
38
39
  static emitter: Emitter<Events> | undefined;