@hysc/meeting 10.3.5 → 10.4.0

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 CHANGED
@@ -168,14 +168,15 @@ declare class BMStreamModelVM {
168
168
  localModel: BMStreamModel | null;
169
169
  room: BMRoom | null;
170
170
  bloudStream: BloudStream | null;
171
+ /**
172
+ * brtc stream对象
173
+ */
171
174
  brtcStream: SingleLocalStream | null;
172
175
  /**
173
176
  * 后面打开摄像头存储的流,主要是关闭摄像头的时候得把它清除掉
174
177
  */
175
178
  videoStream: SingleLocalStream | null;
176
179
  audioStream: SingleLocalStream | null;
177
- audioStats: boolean;
178
- videoStats: boolean;
179
180
  /**
180
181
  * 本地是否在屏幕共享
181
182
  */
@@ -199,6 +200,7 @@ declare class BMStreamModelVM {
199
200
  private _speakerDetector;
200
201
  private _speakers;
201
202
  speakerWatcher: BehaviorSubject<BMUser | null>;
203
+ private rtcPublishing;
202
204
  /**
203
205
  * 窗口没有播放容器的错误处理
204
206
  */
@@ -223,6 +225,8 @@ declare class BMStreamModelVM {
223
225
  * 窗口播放事件,给到端上去做埋点
224
226
  */
225
227
  streamPlayWatcher: Subject<StreamPlayMessage>;
228
+ private muteHandlerVideo;
229
+ private muteHandlerAudio;
226
230
  constructor();
227
231
  private static filterStreamModels;
228
232
  handleStreamPlay: (info: StreamPlayMessage) => void;
@@ -285,7 +289,7 @@ declare class BMStreamModelVM {
285
289
  * @param audio
286
290
  * @param video
287
291
  */
288
- joinWithAudioAndAudio(audio: boolean, video: boolean): Promise<void>;
292
+ joinWithAudioAndAudio(audio: boolean, video: boolean): Promise<boolean | undefined>;
289
293
  /**
290
294
  * 切换扬声器
291
295
  * @param device
@@ -307,7 +311,8 @@ declare class BMStreamModelVM {
307
311
  /**
308
312
  * 创建本地音频流
309
313
  */
310
- createLocalAudioStream(): Promise<void>;
314
+ createLocalAudioStream(): Promise<LocalStream | null>;
315
+ onlyBrtcPublish(): Promise<boolean>;
311
316
  /**
312
317
  * 创建流并且发布
313
318
  * @param audio 是否发布音频流
@@ -317,9 +322,11 @@ declare class BMStreamModelVM {
317
322
  * @private
318
323
  */
319
324
  private createStreamAndPublish;
325
+ brtcStreamAddEvent(): void;
326
+ brtcStreamRemoveEvent(): void;
320
327
  publishBloudStream(audio: boolean, video: boolean): Promise<void>;
321
328
  muteHandler(type: 'video' | 'audio'): void;
322
- unpublishStream(): Promise<void>;
329
+ unpublishStream(isUnpubRTC?: boolean): Promise<void>;
323
330
  /**
324
331
  * 更改音视频状态或者取消发布
325
332
  * @param type 更改类型
@@ -328,6 +335,7 @@ declare class BMStreamModelVM {
328
335
  * @private
329
336
  */
330
337
  private muteOrUnpublishStream;
338
+ private justReplaceVideoTrack;
331
339
  toggleShareScreen(enable: boolean, opts?: any, customShare?: Result): Promise<boolean>;
332
340
  setShareScreenContentHint(contentHint: '' | 'motion' | 'detail' | 'text'): void;
333
341
  updateModelSort: lodash_es.DebouncedFunc<() => void>;
@@ -338,7 +346,7 @@ declare class BMStreamModelVM {
338
346
  createCanvas(): void;
339
347
  private canvasDisplay;
340
348
  private static getCanvasStream;
341
- private createVideoStream;
349
+ private createVideoStreamTrack;
342
350
  /**
343
351
  * 启动录制
344
352
  * @param {String} opts.filename - 录制文件名
@@ -394,6 +402,7 @@ declare class BMStreamModelVM {
394
402
  */
395
403
  checkStreamStats(status: string): void;
396
404
  clearCache(): void;
405
+ isH5(): boolean;
397
406
  }
398
407
 
399
408
  /**
@@ -1198,6 +1207,7 @@ declare class BMRoomInfo {
1198
1207
  totalUserWatcher: BehaviorSubject<number>;
1199
1208
  totalWaitRoomUserWatcher: BehaviorSubject<number>;
1200
1209
  isOpenWaitRoom: Subject<boolean>;
1210
+ originJoinRoomParams: any;
1201
1211
  constructor(room: BMRoom);
1202
1212
  get roomName(): string;
1203
1213
  /**
@@ -1793,6 +1803,8 @@ declare class BMRoom {
1793
1803
  bmLiveVM: BMLiveVM;
1794
1804
  isInWaitRoom: boolean;
1795
1805
  shouldPlayAudio: boolean;
1806
+ /** 设备是否正在变更中 */
1807
+ deviceChanging: boolean;
1796
1808
  constructor({ initDevices }?: BMRoomProps);
1797
1809
  /**
1798
1810
  * 是否自动播放声音
@@ -1858,7 +1870,7 @@ declare class BMRoom {
1858
1870
  /**
1859
1871
  * 处理用户设备变化之后的逻辑
1860
1872
  */
1861
- handleMediaDevicesChange: () => Promise<void>;
1873
+ handleMediaDevicesChange: (e: any) => Promise<void>;
1862
1874
  setSelectAudioDevice(device: Device): void;
1863
1875
  setSelectVideoDevice(device: Device): void;
1864
1876
  setSelectSpeakerDevice(device: Device): void;
@@ -2003,7 +2015,7 @@ declare class BMRoom {
2003
2015
  *
2004
2016
  * @returns 设备列表
2005
2017
  */
2006
- enumVideoDevices: typeof BRTC.enumVideoDevices;
2018
+ enumVideoDevices: () => Promise<Device[]>;
2007
2019
  /**
2008
2020
  * 枚举音频输入设备
2009
2021
  *
package/dist/index.d.ts CHANGED
@@ -168,14 +168,15 @@ declare class BMStreamModelVM {
168
168
  localModel: BMStreamModel | null;
169
169
  room: BMRoom | null;
170
170
  bloudStream: BloudStream | null;
171
+ /**
172
+ * brtc stream对象
173
+ */
171
174
  brtcStream: SingleLocalStream | null;
172
175
  /**
173
176
  * 后面打开摄像头存储的流,主要是关闭摄像头的时候得把它清除掉
174
177
  */
175
178
  videoStream: SingleLocalStream | null;
176
179
  audioStream: SingleLocalStream | null;
177
- audioStats: boolean;
178
- videoStats: boolean;
179
180
  /**
180
181
  * 本地是否在屏幕共享
181
182
  */
@@ -199,6 +200,7 @@ declare class BMStreamModelVM {
199
200
  private _speakerDetector;
200
201
  private _speakers;
201
202
  speakerWatcher: BehaviorSubject<BMUser | null>;
203
+ private rtcPublishing;
202
204
  /**
203
205
  * 窗口没有播放容器的错误处理
204
206
  */
@@ -223,6 +225,8 @@ declare class BMStreamModelVM {
223
225
  * 窗口播放事件,给到端上去做埋点
224
226
  */
225
227
  streamPlayWatcher: Subject<StreamPlayMessage>;
228
+ private muteHandlerVideo;
229
+ private muteHandlerAudio;
226
230
  constructor();
227
231
  private static filterStreamModels;
228
232
  handleStreamPlay: (info: StreamPlayMessage) => void;
@@ -285,7 +289,7 @@ declare class BMStreamModelVM {
285
289
  * @param audio
286
290
  * @param video
287
291
  */
288
- joinWithAudioAndAudio(audio: boolean, video: boolean): Promise<void>;
292
+ joinWithAudioAndAudio(audio: boolean, video: boolean): Promise<boolean | undefined>;
289
293
  /**
290
294
  * 切换扬声器
291
295
  * @param device
@@ -307,7 +311,8 @@ declare class BMStreamModelVM {
307
311
  /**
308
312
  * 创建本地音频流
309
313
  */
310
- createLocalAudioStream(): Promise<void>;
314
+ createLocalAudioStream(): Promise<LocalStream | null>;
315
+ onlyBrtcPublish(): Promise<boolean>;
311
316
  /**
312
317
  * 创建流并且发布
313
318
  * @param audio 是否发布音频流
@@ -317,9 +322,11 @@ declare class BMStreamModelVM {
317
322
  * @private
318
323
  */
319
324
  private createStreamAndPublish;
325
+ brtcStreamAddEvent(): void;
326
+ brtcStreamRemoveEvent(): void;
320
327
  publishBloudStream(audio: boolean, video: boolean): Promise<void>;
321
328
  muteHandler(type: 'video' | 'audio'): void;
322
- unpublishStream(): Promise<void>;
329
+ unpublishStream(isUnpubRTC?: boolean): Promise<void>;
323
330
  /**
324
331
  * 更改音视频状态或者取消发布
325
332
  * @param type 更改类型
@@ -328,6 +335,7 @@ declare class BMStreamModelVM {
328
335
  * @private
329
336
  */
330
337
  private muteOrUnpublishStream;
338
+ private justReplaceVideoTrack;
331
339
  toggleShareScreen(enable: boolean, opts?: any, customShare?: Result): Promise<boolean>;
332
340
  setShareScreenContentHint(contentHint: '' | 'motion' | 'detail' | 'text'): void;
333
341
  updateModelSort: lodash_es.DebouncedFunc<() => void>;
@@ -338,7 +346,7 @@ declare class BMStreamModelVM {
338
346
  createCanvas(): void;
339
347
  private canvasDisplay;
340
348
  private static getCanvasStream;
341
- private createVideoStream;
349
+ private createVideoStreamTrack;
342
350
  /**
343
351
  * 启动录制
344
352
  * @param {String} opts.filename - 录制文件名
@@ -394,6 +402,7 @@ declare class BMStreamModelVM {
394
402
  */
395
403
  checkStreamStats(status: string): void;
396
404
  clearCache(): void;
405
+ isH5(): boolean;
397
406
  }
398
407
 
399
408
  /**
@@ -1198,6 +1207,7 @@ declare class BMRoomInfo {
1198
1207
  totalUserWatcher: BehaviorSubject<number>;
1199
1208
  totalWaitRoomUserWatcher: BehaviorSubject<number>;
1200
1209
  isOpenWaitRoom: Subject<boolean>;
1210
+ originJoinRoomParams: any;
1201
1211
  constructor(room: BMRoom);
1202
1212
  get roomName(): string;
1203
1213
  /**
@@ -1793,6 +1803,8 @@ declare class BMRoom {
1793
1803
  bmLiveVM: BMLiveVM;
1794
1804
  isInWaitRoom: boolean;
1795
1805
  shouldPlayAudio: boolean;
1806
+ /** 设备是否正在变更中 */
1807
+ deviceChanging: boolean;
1796
1808
  constructor({ initDevices }?: BMRoomProps);
1797
1809
  /**
1798
1810
  * 是否自动播放声音
@@ -1858,7 +1870,7 @@ declare class BMRoom {
1858
1870
  /**
1859
1871
  * 处理用户设备变化之后的逻辑
1860
1872
  */
1861
- handleMediaDevicesChange: () => Promise<void>;
1873
+ handleMediaDevicesChange: (e: any) => Promise<void>;
1862
1874
  setSelectAudioDevice(device: Device): void;
1863
1875
  setSelectVideoDevice(device: Device): void;
1864
1876
  setSelectSpeakerDevice(device: Device): void;
@@ -2003,7 +2015,7 @@ declare class BMRoom {
2003
2015
  *
2004
2016
  * @returns 设备列表
2005
2017
  */
2006
- enumVideoDevices: typeof BRTC.enumVideoDevices;
2018
+ enumVideoDevices: () => Promise<Device[]>;
2007
2019
  /**
2008
2020
  * 枚举音频输入设备
2009
2021
  *