feat: Add UI optional UI locking when microphone is hot (#2484)
This commit is contained in:
committed by
dermotduffy
parent
9a763db1f3
commit
be7e7d79dc
@@ -119,6 +119,13 @@ export class MicrophoneManager {
|
||||
return !this._stream || this._stream.getTracks().every((track) => !track.enabled);
|
||||
}
|
||||
|
||||
public isLocking(): boolean {
|
||||
// The user-facing rationale: while the microphone is hot (e.g. mid 2-way
|
||||
// audio), prevent accidental swipes, pauses, view changes.
|
||||
const microphoneConfig = this._api.getConfigManager().getConfig()?.live.microphone;
|
||||
return !!microphoneConfig?.lock && !this.isMuted();
|
||||
}
|
||||
|
||||
private _setDesiredMuteOnStream(): void {
|
||||
this._stream?.getTracks().forEach((track) => {
|
||||
track.enabled = !this._desireMute;
|
||||
|
||||
Reference in New Issue
Block a user