From 93359011a1bc7b7ac3c9e7daa8590578d7ea1721 Mon Sep 17 00:00:00 2001 From: mplorentz Date: Thu, 2 Apr 2026 11:34:20 -0400 Subject: [PATCH] Drop camera settings from join room dialog --- src/app/components/VoiceRoomJoinDialog.svelte | 37 +------------------ src/app/voice.ts | 19 +--------- 2 files changed, 2 insertions(+), 54 deletions(-) diff --git a/src/app/components/VoiceRoomJoinDialog.svelte b/src/app/components/VoiceRoomJoinDialog.svelte index 61bb8ee2..47ef4d2e 100644 --- a/src/app/components/VoiceRoomJoinDialog.svelte +++ b/src/app/components/VoiceRoomJoinDialog.svelte @@ -26,21 +26,16 @@ const spaceLabel = $derived(displayRelayUrl(url)) let audioInputs = $state([]) - let videoInputs = $state([]) let selectedDeviceId = $state("") - let selectedVideoDeviceId = $state("") let startWithoutMic = $state(false) - let joinWithCamera = $state(false) const loadDevices = async () => { if (!navigator.mediaDevices?.enumerateDevices) return try { const devices = await navigator.mediaDevices.enumerateDevices() audioInputs = devices.filter(d => d.kind === "audioinput") - videoInputs = devices.filter(d => d.kind === "videoinput") } catch { audioInputs = [] - videoInputs = [] } } @@ -57,8 +52,6 @@ h, startWithoutMic, startWithoutMic ? undefined : selectedDeviceId || undefined, - joinWithCamera, - joinWithCamera ? selectedVideoDeviceId || undefined : undefined, ) } @@ -76,7 +69,7 @@ -

Choose devices for the call:

+

Select a microphone to join the call:

{/snippet} -
- - -
- - {#snippet label()} -

Camera

- {/snippet} - {#snippet input()} - - {/snippet} -
diff --git a/src/app/voice.ts b/src/app/voice.ts index 4a70b83d..81e7e510 100644 --- a/src/app/voice.ts +++ b/src/app/voice.ts @@ -11,7 +11,6 @@ import { Track, supportsAudioOutputSelection, type AudioCaptureOptions, - type VideoCaptureOptions, } from "livekit-client" import {derived, get, writable} from "svelte/store" import {map, removeUndefined, uniqBy} from "@welshman/lib" @@ -291,8 +290,6 @@ export const joinVoiceRoom = async ( h: string, startMuted = true, preferredMicId?: string, - joinWithCamera = false, - preferredCameraId?: string, ): Promise => { cancelJoinVoiceRoom() @@ -343,26 +340,12 @@ export const joinVoiceRoom = async ( const muted = await setUpMicrophone(startMuted, preferredMicId, liveKitRoom.localParticipant) - let cameraOn = false - if (joinWithCamera) { - const videoCapture: VideoCaptureOptions | undefined = preferredCameraId - ? {deviceId: preferredCameraId} - : undefined - try { - await liveKitRoom.localParticipant.setCameraEnabled(true, videoCapture) - cameraOn = true - bumpVideoCallLayoutRevision() - } catch (e) { - pushToast({theme: "error", message: "Could not access camera"}) - } - } - currentVoiceSession.set({ url, h, room: liveKitRoom, muted, - cameraOn, + cameraOn: false, screenShareOn: false, }) voiceState.set(VoiceState.Connected)