refac: audio

This commit is contained in:
Timothy J. Baek
2024-06-07 20:51:53 -07:00
parent 16615010f7
commit 27417dd771
4 changed files with 23 additions and 16 deletions
+8 -1
View File
@@ -913,7 +913,14 @@
try {
await navigator.mediaDevices.getUserMedia({ audio: true, video: true });
// If the user grants the permission, proceed to show the call overlay
showCallOverlay.set(true);
if ($config.audio.stt.engine !== 'web') {
showCallOverlay.set(true);
} else {
toast.error(
$i18n.t('Call feature is not supported when using Web STT engine')
);
}
} catch (err) {
// If the user denies the permission or an error occurs, show an error message
toast.error($i18n.t('Permission denied when accessing media devices'));