@hysc/meeting 10.9.8 → 10.9.10
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 +42 -4
- package/dist/index.d.ts +42 -4
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -230,6 +230,8 @@ declare class BMStreamModelVM {
|
|
|
230
230
|
/** 是否可以使用降噪 */
|
|
231
231
|
private _canUseNoiseFilter;
|
|
232
232
|
private _noisePlugin;
|
|
233
|
+
/** 关麦期间切换过输入设备,开麦时需要 replace 发布轨 */
|
|
234
|
+
private _audioInputDirty;
|
|
233
235
|
private rtcPublishing;
|
|
234
236
|
/**
|
|
235
237
|
* 窗口没有播放容器的错误处理
|
|
@@ -334,7 +336,7 @@ declare class BMStreamModelVM {
|
|
|
334
336
|
* @param streamModel
|
|
335
337
|
*/
|
|
336
338
|
changeSingleStreamSpeaker(streamModel: BMStreamModel): Promise<void>;
|
|
337
|
-
changeAudioInput(device: Device): Promise<boolean
|
|
339
|
+
changeAudioInput(device: Device): Promise<boolean>;
|
|
338
340
|
/**
|
|
339
341
|
* 切换视频输入设备
|
|
340
342
|
* @param device
|
|
@@ -347,9 +349,25 @@ declare class BMStreamModelVM {
|
|
|
347
349
|
*/
|
|
348
350
|
muteSpeaker(enable: boolean): Promise<undefined>;
|
|
349
351
|
/**
|
|
350
|
-
*
|
|
352
|
+
* 原始麦克风流创建参数(RNNoise 开启时关闭浏览器内置降噪)
|
|
351
353
|
*/
|
|
352
|
-
|
|
354
|
+
private getRawAudioStreamCreateOptions;
|
|
355
|
+
/**
|
|
356
|
+
* 确保存在原始麦克风流(audioStream 仅保存未降噪的采集流)
|
|
357
|
+
*/
|
|
358
|
+
private ensureRawAudioStream;
|
|
359
|
+
/**
|
|
360
|
+
* 从原始麦克风流获取用于发布的音频轨(按需经过 RNNoise 处理)
|
|
361
|
+
*/
|
|
362
|
+
private getPublishableAudioTrack;
|
|
363
|
+
/**
|
|
364
|
+
* 调试:记录发布流音频轨状态
|
|
365
|
+
*/
|
|
366
|
+
private logAudioTrackState;
|
|
367
|
+
/**
|
|
368
|
+
* 创建本地音频流(原始麦克风,不含降噪处理)
|
|
369
|
+
*/
|
|
370
|
+
createLocalAudioStream(): Promise<LocalStream>;
|
|
353
371
|
onlyBrtcPublish(): Promise<boolean>;
|
|
354
372
|
/**
|
|
355
373
|
* 创建流并且发布
|
|
@@ -441,7 +459,6 @@ declare class BMStreamModelVM {
|
|
|
441
459
|
*/
|
|
442
460
|
checkStreamStats(status: string): void;
|
|
443
461
|
setEnableNoiseFilter(enable: boolean, workletPublicUrl?: string): Promise<boolean>;
|
|
444
|
-
private getNoiseStreamTrack;
|
|
445
462
|
clearCache(): void;
|
|
446
463
|
}
|
|
447
464
|
|
|
@@ -1750,6 +1767,7 @@ declare class AudioPlay {
|
|
|
1750
1767
|
room: BMRoom;
|
|
1751
1768
|
playStateChangeWatcher: Subject<AudioPlayer>;
|
|
1752
1769
|
deviceId?: string;
|
|
1770
|
+
private setDeviceRetryTimer?;
|
|
1753
1771
|
constructor(containerId: string, room: BMRoom);
|
|
1754
1772
|
addStream(stream: SingleRemoteStream, force?: boolean): void;
|
|
1755
1773
|
removeStream(stream: SingleStream): void;
|
|
@@ -1758,6 +1776,9 @@ declare class AudioPlay {
|
|
|
1758
1776
|
mute(mute: boolean): void;
|
|
1759
1777
|
setVolume(streamId: string, volume: number): void;
|
|
1760
1778
|
setDevice(deviceId: string, force?: boolean): Promise<void>;
|
|
1779
|
+
private applySinkToAllPlayers;
|
|
1780
|
+
private applySinkToPlayer;
|
|
1781
|
+
private resubscribeStream;
|
|
1761
1782
|
addPlayerEvent(player: AudioPlayer): void;
|
|
1762
1783
|
clear(): void;
|
|
1763
1784
|
destroy(): void;
|
|
@@ -1793,6 +1814,10 @@ declare class BMRoom {
|
|
|
1793
1814
|
selectVideoDevice: Device | null;
|
|
1794
1815
|
selectAudioDevice: Device | null;
|
|
1795
1816
|
selectAudioOutputDevice: Device | null;
|
|
1817
|
+
/** 用户是否选择了「系统默认」麦克风(热插拔后需保持该选项) */
|
|
1818
|
+
private _preferSystemDefaultMic;
|
|
1819
|
+
/** 用户是否选择了「系统默认」扬声器 */
|
|
1820
|
+
private _preferSystemDefaultSpeaker;
|
|
1796
1821
|
streamQueue: SingletonQueue;
|
|
1797
1822
|
/**
|
|
1798
1823
|
* 这个参数是和业务相关的功能,业务上的参会者列表是可以配置的,如果设置了只展示一列,那么所有的用户都要存储
|
|
@@ -1955,6 +1980,19 @@ declare class BMRoom {
|
|
|
1955
1980
|
* @param devices
|
|
1956
1981
|
*/
|
|
1957
1982
|
private filterDevice;
|
|
1983
|
+
/** 枚举列表里由 enumAudioInputDevices 注入的「系统默认(xxx)」项 */
|
|
1984
|
+
private getSystemDefaultDevice;
|
|
1985
|
+
/** 解析或合成「系统默认(xxx)」设备项 */
|
|
1986
|
+
private resolveSystemDefaultDevice;
|
|
1987
|
+
private ensureSystemDefaultNamedDevice;
|
|
1988
|
+
/** 拔掉蓝牙等场景:优先选仍在线的物理麦克风,避免落到已失效的默认设备 */
|
|
1989
|
+
private pickFallbackAudioDevice;
|
|
1990
|
+
/**
|
|
1991
|
+
* 蓝牙等设备热插拔时,系统枚举列表更新略滞后于 track ended 事件,短暂等待后再切换
|
|
1992
|
+
*/
|
|
1993
|
+
private static readonly DEVICE_CHANGE_SETTLE_MS;
|
|
1994
|
+
/** 热插拔期间合并扬声器切换,避免连续 setSinkId 导致播放中断 */
|
|
1995
|
+
private applySpeakerOnDeviceChange;
|
|
1958
1996
|
/**
|
|
1959
1997
|
* 处理用户设备变化之后的逻辑
|
|
1960
1998
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -230,6 +230,8 @@ declare class BMStreamModelVM {
|
|
|
230
230
|
/** 是否可以使用降噪 */
|
|
231
231
|
private _canUseNoiseFilter;
|
|
232
232
|
private _noisePlugin;
|
|
233
|
+
/** 关麦期间切换过输入设备,开麦时需要 replace 发布轨 */
|
|
234
|
+
private _audioInputDirty;
|
|
233
235
|
private rtcPublishing;
|
|
234
236
|
/**
|
|
235
237
|
* 窗口没有播放容器的错误处理
|
|
@@ -334,7 +336,7 @@ declare class BMStreamModelVM {
|
|
|
334
336
|
* @param streamModel
|
|
335
337
|
*/
|
|
336
338
|
changeSingleStreamSpeaker(streamModel: BMStreamModel): Promise<void>;
|
|
337
|
-
changeAudioInput(device: Device): Promise<boolean
|
|
339
|
+
changeAudioInput(device: Device): Promise<boolean>;
|
|
338
340
|
/**
|
|
339
341
|
* 切换视频输入设备
|
|
340
342
|
* @param device
|
|
@@ -347,9 +349,25 @@ declare class BMStreamModelVM {
|
|
|
347
349
|
*/
|
|
348
350
|
muteSpeaker(enable: boolean): Promise<undefined>;
|
|
349
351
|
/**
|
|
350
|
-
*
|
|
352
|
+
* 原始麦克风流创建参数(RNNoise 开启时关闭浏览器内置降噪)
|
|
351
353
|
*/
|
|
352
|
-
|
|
354
|
+
private getRawAudioStreamCreateOptions;
|
|
355
|
+
/**
|
|
356
|
+
* 确保存在原始麦克风流(audioStream 仅保存未降噪的采集流)
|
|
357
|
+
*/
|
|
358
|
+
private ensureRawAudioStream;
|
|
359
|
+
/**
|
|
360
|
+
* 从原始麦克风流获取用于发布的音频轨(按需经过 RNNoise 处理)
|
|
361
|
+
*/
|
|
362
|
+
private getPublishableAudioTrack;
|
|
363
|
+
/**
|
|
364
|
+
* 调试:记录发布流音频轨状态
|
|
365
|
+
*/
|
|
366
|
+
private logAudioTrackState;
|
|
367
|
+
/**
|
|
368
|
+
* 创建本地音频流(原始麦克风,不含降噪处理)
|
|
369
|
+
*/
|
|
370
|
+
createLocalAudioStream(): Promise<LocalStream>;
|
|
353
371
|
onlyBrtcPublish(): Promise<boolean>;
|
|
354
372
|
/**
|
|
355
373
|
* 创建流并且发布
|
|
@@ -441,7 +459,6 @@ declare class BMStreamModelVM {
|
|
|
441
459
|
*/
|
|
442
460
|
checkStreamStats(status: string): void;
|
|
443
461
|
setEnableNoiseFilter(enable: boolean, workletPublicUrl?: string): Promise<boolean>;
|
|
444
|
-
private getNoiseStreamTrack;
|
|
445
462
|
clearCache(): void;
|
|
446
463
|
}
|
|
447
464
|
|
|
@@ -1750,6 +1767,7 @@ declare class AudioPlay {
|
|
|
1750
1767
|
room: BMRoom;
|
|
1751
1768
|
playStateChangeWatcher: Subject<AudioPlayer>;
|
|
1752
1769
|
deviceId?: string;
|
|
1770
|
+
private setDeviceRetryTimer?;
|
|
1753
1771
|
constructor(containerId: string, room: BMRoom);
|
|
1754
1772
|
addStream(stream: SingleRemoteStream, force?: boolean): void;
|
|
1755
1773
|
removeStream(stream: SingleStream): void;
|
|
@@ -1758,6 +1776,9 @@ declare class AudioPlay {
|
|
|
1758
1776
|
mute(mute: boolean): void;
|
|
1759
1777
|
setVolume(streamId: string, volume: number): void;
|
|
1760
1778
|
setDevice(deviceId: string, force?: boolean): Promise<void>;
|
|
1779
|
+
private applySinkToAllPlayers;
|
|
1780
|
+
private applySinkToPlayer;
|
|
1781
|
+
private resubscribeStream;
|
|
1761
1782
|
addPlayerEvent(player: AudioPlayer): void;
|
|
1762
1783
|
clear(): void;
|
|
1763
1784
|
destroy(): void;
|
|
@@ -1793,6 +1814,10 @@ declare class BMRoom {
|
|
|
1793
1814
|
selectVideoDevice: Device | null;
|
|
1794
1815
|
selectAudioDevice: Device | null;
|
|
1795
1816
|
selectAudioOutputDevice: Device | null;
|
|
1817
|
+
/** 用户是否选择了「系统默认」麦克风(热插拔后需保持该选项) */
|
|
1818
|
+
private _preferSystemDefaultMic;
|
|
1819
|
+
/** 用户是否选择了「系统默认」扬声器 */
|
|
1820
|
+
private _preferSystemDefaultSpeaker;
|
|
1796
1821
|
streamQueue: SingletonQueue;
|
|
1797
1822
|
/**
|
|
1798
1823
|
* 这个参数是和业务相关的功能,业务上的参会者列表是可以配置的,如果设置了只展示一列,那么所有的用户都要存储
|
|
@@ -1955,6 +1980,19 @@ declare class BMRoom {
|
|
|
1955
1980
|
* @param devices
|
|
1956
1981
|
*/
|
|
1957
1982
|
private filterDevice;
|
|
1983
|
+
/** 枚举列表里由 enumAudioInputDevices 注入的「系统默认(xxx)」项 */
|
|
1984
|
+
private getSystemDefaultDevice;
|
|
1985
|
+
/** 解析或合成「系统默认(xxx)」设备项 */
|
|
1986
|
+
private resolveSystemDefaultDevice;
|
|
1987
|
+
private ensureSystemDefaultNamedDevice;
|
|
1988
|
+
/** 拔掉蓝牙等场景:优先选仍在线的物理麦克风,避免落到已失效的默认设备 */
|
|
1989
|
+
private pickFallbackAudioDevice;
|
|
1990
|
+
/**
|
|
1991
|
+
* 蓝牙等设备热插拔时,系统枚举列表更新略滞后于 track ended 事件,短暂等待后再切换
|
|
1992
|
+
*/
|
|
1993
|
+
private static readonly DEVICE_CHANGE_SETTLE_MS;
|
|
1994
|
+
/** 热插拔期间合并扬声器切换,避免连续 setSinkId 导致播放中断 */
|
|
1995
|
+
private applySpeakerOnDeviceChange;
|
|
1958
1996
|
/**
|
|
1959
1997
|
* 处理用户设备变化之后的逻辑
|
|
1960
1998
|
*/
|