Chat animation, Audio-Berechtigungsabfrage, Berechtigung Fehlermeldung

This commit is contained in:
PxlLoewe
2025-07-12 00:48:48 -07:00
parent 01bef65218
commit cea632c47a
4 changed files with 29 additions and 8 deletions

View File

@@ -51,11 +51,16 @@ export const SettingsBtn = () => {
}, [user, setMic]);
useEffect(() => {
if (typeof navigator !== "undefined" && navigator.mediaDevices?.enumerateDevices) {
navigator.mediaDevices.enumerateDevices().then((devices) => {
const setDevices = async () => {
if (typeof navigator !== "undefined" && navigator.mediaDevices?.enumerateDevices) {
const stream = await navigator.mediaDevices.getUserMedia({ video: false, audio: true });
const devices = await navigator.mediaDevices.enumerateDevices();
setInputDevices(devices.filter((d) => d.kind === "audioinput"));
});
}
stream.getTracks().forEach((track) => track.stop());
}
};
setDevices();
}, []);
return (
@@ -101,6 +106,10 @@ export const SettingsBtn = () => {
<p className="flex items-center gap-2 text-base mb-2 justify-start w-full">
<Volume2 size={20} /> Eingabelautstärke
</p>
{/*
TODO: Livekit Kann aktuell keine Lautstärke manuell überschreiben, daher ist die MicVolumeBar deaktiviert
<div className="w-full">
<input
type="range"
@@ -125,7 +134,7 @@ export const SettingsBtn = () => {
</div>
{showIndication && (
<MicVolumeBar deviceId={selectedDevice ? selectedDevice : ""} volumeInput={micVol} />
)}
)} */}
<div className="divider w-full" />
</div>
<p className="flex items-center gap-2 text-base mb-2">