This commit is contained in:
Timo K
2026-05-18 20:06:54 +02:00
parent bc81da43c2
commit e19d5865b0
3 changed files with 16 additions and 31 deletions

View File

@@ -110,10 +110,11 @@ function buildDeviceBehaviors(
toggleBlur$: scope.behavior( toggleBlur$: scope.behavior(
combineLatest([backgroundBlurSettings.value$, disableSwitcher$]).pipe( combineLatest([backgroundBlurSettings.value$, disableSwitcher$]).pipe(
map(([current, switcherDisabled]) => { map(([current, switcherDisabled]) => {
return () => return !switcherDisabled && supportsBackgroundProcessors()
!switcherDisabled && supportsBackgroundProcessors() ? (): void => {
? (): void => backgroundBlurSettings.setValue(!current) backgroundBlurSettings.setValue(!current);
: constant(undefined); }
: undefined;
}), }),
), ),
), ),

View File

@@ -70,16 +70,7 @@ export const MediaMuteAndSwitchButton: FC<MediaMuteAndSwitchButtonProps> = ({
const [menuOpen, setMenuOpen] = useState(false); const [menuOpen, setMenuOpen] = useState(false);
const { t } = useTranslation(); const { t } = useTranslation();
let button; let button;
let toggles = let toggles: { label: string; enabled: boolean; id: string }[] = [];
backgroundBlurToggleClick === undefined
? []
: [
{
label: t("action.blur_background"),
enabled: videoBlurEnabled,
id: BLUR_ID,
},
];
switch (iconsAndLabels) { switch (iconsAndLabels) {
case "video": case "video":
button = ( button = (
@@ -94,7 +85,15 @@ export const MediaMuteAndSwitchButton: FC<MediaMuteAndSwitchButtonProps> = ({
data-testid="incall_videomute" data-testid="incall_videomute"
/> />
); );
toggles = []; if (backgroundBlurToggleClick !== undefined) {
toggles = [
{
label: t("action.blur_background"),
enabled: videoBlurEnabled ?? false,
id: BLUR_ID,
},
];
}
break; break;
case "audio": case "audio":
button = ( button = (

View File

@@ -108,7 +108,6 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
const [footerVm, setFooterVm] = useState<ViewModel<FooterSnapshot> | null>( const [footerVm, setFooterVm] = useState<ViewModel<FooterSnapshot> | null>(
null, null,
); );
const { supportsReactions } = useReactionsSender();
const urlParams = useUrlParams(); const urlParams = useUrlParams();
const mediaDevices = useMediaDevices(); const mediaDevices = useMediaDevices();
const trackProcessorState$ = useTrackProcessorObservable$(); const trackProcessorState$ = useTrackProcessorObservable$();
@@ -135,16 +134,6 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
reactionsReader.reactions$, reactionsReader.reactions$,
scope.behavior(trackProcessorState$), scope.behavior(trackProcessorState$),
); );
const footerVm = createCallFooterViewModel(
scope,
vm,
props.muteStates,
mediaDevices,
supportsReactions
? `${props.client.getUserId()}:${props.client.getDeviceId()}`
: undefined,
);
setFooterVm(footerVm);
// TODO move this somewhere else once we use the callViewModel in the lobby as well! // TODO move this somewhere else once we use the callViewModel in the lobby as well!
vm.join(); vm.join();
setVm(vm); setVm(vm);
@@ -164,7 +153,6 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
mediaDevices, mediaDevices,
trackProcessorState$, trackProcessorState$,
props.client, props.client,
supportsReactions,
]); ]);
useEffect(() => { useEffect(() => {
@@ -176,9 +164,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
vm, vm,
props.muteStates, props.muteStates,
mediaDevices, mediaDevices,
supportsReactions `${props.client.getUserId()}:${props.client.getDeviceId()}`,
? `${props.client.getUserId()}:${props.client.getDeviceId()}`
: undefined,
); );
setFooterVm(footerVm); setFooterVm(footerVm);
@@ -195,7 +181,6 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
mediaDevices, mediaDevices,
trackProcessorState$, trackProcessorState$,
props.client, props.client,
supportsReactions,
vm, vm,
]); ]);