Drop camera settings from join room dialog
This commit is contained in:
+1
-18
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user