mirror of
https://github.com/vector-im/element-call.git
synced 2026-02-05 04:15:58 +00:00
20 lines
611 B
TypeScript
20 lines
611 B
TypeScript
/*
|
|
Copyright 2025 New Vector Ltd.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
Please see LICENSE in the repository root for full details.
|
|
*/
|
|
|
|
import { combineLatest, startWith } from "rxjs";
|
|
|
|
import { setAudioEnabled$ } from "../controls";
|
|
import { muteAllAudio as muteAllAudioSetting } from "../settings/settings";
|
|
|
|
/**
|
|
* This can transition into sth more complete: `GroupCallViewModel.ts`
|
|
*/
|
|
export const muteAllAudio$ = combineLatest(
|
|
[setAudioEnabled$.pipe(startWith(true)), muteAllAudioSetting.value$],
|
|
(outputEnabled, settingsMute) => !outputEnabled || settingsMute,
|
|
);
|