Drop camera settings from join room dialog

This commit is contained in:
mplorentz
2026-04-02 11:34:20 -04:00
parent e88ff822cb
commit 93359011a1
2 changed files with 2 additions and 54 deletions
+1 -18
View File
@@ -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<void> => {
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)