refactor(voice): remove the native voice engine from the renderer (#1787)

This commit is contained in:
Hampus authored and GitHub committed 2026-08-20 17:43:38 +02:00
1 parent b144e650f2
commit 9731bac40f
103 files changed
+308 -15553

No files matched your search

@@ -44,7 +44,6 @@ import {useVoiceCallFullscreenViewState} from '@app/features/voice/components/us
import {VoiceCallView} from '@app/features/voice/components/VoiceCallView';
import {VoiceE2EEIndicator} from '@app/features/voice/components/VoiceE2EEIndicator';
import MediaEngine from '@app/features/voice/engine/MediaEngineFacade';
import {isNativeVoiceEngineSelected} from '@app/features/voice/engine/native_voice_engine/getVoiceEngine';
import {useCompactCallExpansionState} from '@app/features/voice/hooks/useCompactCallExpansionState';
import {usePendingVoiceConnection} from '@app/features/voice/hooks/usePendingVoiceConnection';
import {getGuildVoiceCallExpansionKey} from '@app/features/voice/state/CompactVoiceCallHeight';
@@ -182,7 +181,7 @@ export const GuildChannelView = observer(({channelId, guildId}: GuildChannelView
isVoiceChannel &&
connectedChannelId === channelId &&
(connectedGuildId ?? null) === (channel?.guildId ?? null) &&
(room || (isNativeVoiceEngineSelected() && MediaEngine.connected)),
room,
);
const matureContentGateReason = GuildMatureContentAgree.getGateReason({channelId, guildId});
const matureContentResolved = GuildMatureContentAgree.getResolvedContext({channelId, guildId});
@@ -3,7 +3,6 @@
import Authentication from '@app/features/auth/state/Authentication';
import type {Channel} from '@app/features/channel/models/Channel';
import MediaEngine from '@app/features/voice/engine/MediaEngineFacade';
import {isNativeVoiceEngineSelected} from '@app/features/voice/engine/native_voice_engine/getVoiceEngine';
import CallInitiator from '@app/features/voice/state/CallInitiator';
import CallState, {type Call} from '@app/features/voice/state/CallState';
@@ -40,9 +39,7 @@ export function useCallHeaderState(channel?: Channel | null): CallHeaderState {
const matchesConnectionContext = Boolean(
channelId && MediaEngine.channelId === channelId && (MediaEngine.guildId ?? null) === normalizedGuildId,
);
const isDeviceInRoomForChannelCall = Boolean(
matchesConnectionContext && (MediaEngine.room || (isNativeVoiceEngineSelected() && MediaEngine.connected)),
);
const isDeviceInRoomForChannelCall = Boolean(matchesConnectionContext && MediaEngine.room);
const isDeviceConnectingToChannelCall =
matchesConnectionContext && (MediaEngine.connecting || (MediaEngine.connected && !isDeviceInRoomForChannelCall));
const controlsVariant: CallHeaderControlsVariant = !callExistsAndOngoing