Skip to content

Commit

Permalink
Merge branch 'dev' into empty-scrollbar-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stavares843 authored Jan 2, 2025
2 parents 28682c5 + 46ca18c commit 213c712
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
12 changes: 12 additions & 0 deletions src-tauri/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSMicrophoneUsageDescription</key>
<string>Request Microphone for Calling</string>
<key>NSMicrophoneUsageDescription</key>
<string>Request Microphone for Calling</string>
<key>NSCameraUsageDescription</key>
<string>Request Camera for Calling</string>
</dict>
</plist>
19 changes: 4 additions & 15 deletions src/lib/components/settings/VideoTest.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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,
},
}
Expand All @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/routes/settings/audio_video/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
}} />
</SettingSection>
<div class="flex-row">
<VideoTest audioInput={selectedInput} videoInput={undefined} />
<VideoTest />
</div>

<SettingSection hook="section-echo-cancellation" name={$_("settings.audio.echoCancellation")} description={$_("settings.audio.echoCancellationDescription")}>
Expand Down

0 comments on commit 213c712

Please sign in to comment.