diff --git a/src-tauri/Info.plist b/src-tauri/Info.plist new file mode 100644 index 000000000..7026b9f81 --- /dev/null +++ b/src-tauri/Info.plist @@ -0,0 +1,12 @@ + + + + + NSMicrophoneUsageDescription + Request Microphone for Calling + NSMicrophoneUsageDescription + Request Microphone for Calling + NSCameraUsageDescription + Request Camera for Calling + + \ No newline at end of file diff --git a/src/lib/components/settings/VideoTest.svelte b/src/lib/components/settings/VideoTest.svelte index b8aadcf13..82ead20aa 100644 --- a/src/lib/components/settings/VideoTest.svelte +++ b/src/lib/components/settings/VideoTest.svelte @@ -6,17 +6,9 @@ import { _ } from "svelte-i18n" import { get } from "svelte/store" - export let audioInput: string | undefined - export let videoInput: string | undefined - let video: HTMLVideoElement let stream: MediaStream - Store.state.devices.video.subscribe(d => { - videoInput = d - switchCamera(videoInput) - }) - async function switchCamera(selectedVideoDeviceId: string) { try { if (stream) { @@ -35,13 +27,10 @@ } async function startVideoTest() { - videoInput = get(Store.state.devices.video) - const constraints = { - audio: { - deviceId: audioInput ? { exact: audioInput } : undefined, - }, + let videoInput = get(Store.state.devices.video) + const constraints: MediaStreamConstraints = { video: { - deviceId: videoInput ? { exact: videoInput } : undefined, + deviceId: videoInput && videoInput !== "default" ? { exact: videoInput } : undefined, }, } @@ -60,7 +49,7 @@ video.srcObject = stream video.play() } catch (err) { - console.error("Accessing the microphone failed:", err) + console.error("Accessing the camera failed:", err) } } diff --git a/src/routes/settings/audio_video/+page.svelte b/src/routes/settings/audio_video/+page.svelte index 6919d3a55..6d5b90be6 100644 --- a/src/routes/settings/audio_video/+page.svelte +++ b/src/routes/settings/audio_video/+page.svelte @@ -185,7 +185,7 @@ }} />
- +