@hysc/meeting 4.0.83 → 4.0.85

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.
@@ -7,10 +7,11 @@ import BMStreamModelVM from "../BMStream/BMStreamModelVM";
7
7
  import { Device, VideoProfile } from '@hysc/core/esm/BoomAdapter/type/value';
8
8
  import BMRoomInfo from './BMRoomInfo';
9
9
  import { BehaviorSubject, Subject } from 'rxjs';
10
- import BMStreamModel from '../BMStream/BMStreamModel';
10
+ 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
  }
@@ -42,6 +43,11 @@ export default class BMRoom {
42
43
  * brtc断网重连的时候,所有的订阅和播放相关的处理,都不需要
43
44
  */
44
45
  BRTCConnectFailed: boolean;
46
+ /**
47
+ * 本端推流失败次数
48
+ */
49
+ pubFailedNum: number;
50
+ streamConnectedErrorQueue: Array<ConnectErrorMessage>;
45
51
  /**
46
52
  * 会议模式
47
53
  * 1 会议
@@ -81,6 +87,20 @@ export default class BMRoom {
81
87
  */
82
88
  private meetingControlOptions;
83
89
  forceId: string;
90
+ /**
91
+ * bloud brtc 断网重连的处理
92
+ * networkState 记录网络状态
93
+ * handleReconnectedStream 防抖函数,当双方有连接断网重连之后,会执行这个方法
94
+ *
95
+ * brtc 的sync-room 之后,本地会把所有的stream都销毁,清空,然后统一走一遍查询处理
96
+ * 绑定新的stream,这么做简单粗暴处理所有的brtc流,防止流重复问题i
97
+ */
98
+ networkState: {
99
+ bloud: boolean;
100
+ brtc: boolean;
101
+ };
102
+ brtcNetEnableWatcher: Subject<boolean>;
103
+ audioPlayer: AudioPlay;
84
104
  get isSingleColumns(): boolean;
85
105
  /**
86
106
  * 传递信息用的,主要是用于message信令往上层业务发送消息
@@ -44,8 +44,12 @@ export default class BMStreamModelVM {
44
44
  localModel: BMStreamModel | null;
45
45
  private room;
46
46
  bloudStream: any;
47
- audioStream: SingleLocalStream | undefined;
48
47
  brtcStream: SingleLocalStream | undefined;
48
+ /**
49
+ * 后面打开摄像头存储的流,主要是关闭摄像头的时候得把它清除掉
50
+ */
51
+ videoStream: SingleLocalStream | null;
52
+ audioStream: SingleLocalStream | null;
49
53
  /**
50
54
  * 本地是否在屏幕共享
51
55
  */
@@ -58,10 +62,6 @@ export default class BMStreamModelVM {
58
62
  mixStreamModelWatcher: BehaviorSubject<BMStreamModel | null>;
59
63
  isShareWatcher: Subject<boolean>;
60
64
  canvasTimer: NodeJS.Timeout | null;
61
- /**
62
- * 后面打开摄像头存储的流,主要是关闭摄像头的时候得把它清除掉
63
- */
64
- videoStream: SingleLocalStream | null;
65
65
  private _recorder;
66
66
  private _isRecording;
67
67
  private _slicingRecord;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @name: AudioPlay.ts
3
+ * @author: yangliye
4
+ * @date: 2023-06-08 16:35
5
+ * @description:AudioPlay.ts
6
+ * @update: 2023-06-08 16:35
7
+ */
8
+ import { SingleStream } from "../type";
9
+ import { AudioPlayer } from '@hysc/core';
10
+ export default class AudioPlay {
11
+ playMap: WeakSet<SingleStream>;
12
+ playerMap: Map<string, AudioPlayer>;
13
+ container: HTMLDivElement | undefined;
14
+ muted: boolean;
15
+ constructor(containerId: string);
16
+ addStream(stream: SingleStream): void;
17
+ removeStream(stream: SingleStream): void;
18
+ play(stream: SingleStream): void;
19
+ mute(mute: boolean): void;
20
+ }