feat(voice): persist A/V device preferences in localStorage
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useVoiceStore } from '../stores/voice.ts';
|
||||
import { saveDevicePref } from '../stores/voice.ts';
|
||||
|
||||
interface Props {
|
||||
onClose: () => void;
|
||||
@@ -48,6 +49,7 @@ export function DeviceSettingsModal({ onClose }: Props) {
|
||||
if (!room) return;
|
||||
try {
|
||||
await room.switchActiveDevice(kind, deviceId);
|
||||
saveDevicePref(kind, deviceId);
|
||||
if (kind === 'audioinput') setActiveAudioInput(deviceId);
|
||||
if (kind === 'audiooutput') setActiveAudioOutput(deviceId);
|
||||
if (kind === 'videoinput') setActiveVideoInput(deviceId);
|
||||
|
||||
Reference in New Issue
Block a user