This commit is contained in:
Timothy Jaeryang Baek
2026-05-09 01:17:33 +09:00
parent 4fe2de7864
commit 5c3edc2539
@@ -63,7 +63,12 @@
console.log(videoInputDevices);
if (selectedVideoInputDeviceId === null && videoInputDevices.length > 0) {
selectedVideoInputDeviceId = videoInputDevices[0].deviceId;
const savedDeviceId = localStorage.getItem('selectedVideoInputDeviceId');
if (savedDeviceId && videoInputDevices.some((d) => d.deviceId === savedDeviceId)) {
selectedVideoInputDeviceId = savedDeviceId;
} else {
selectedVideoInputDeviceId = videoInputDevices[0].deviceId;
}
}
};
@@ -890,6 +895,7 @@
on:change={async (e) => {
console.log(e.detail);
selectedVideoInputDeviceId = e.detail;
localStorage.setItem('selectedVideoInputDeviceId', e.detail);
await stopVideoStream();
await startVideoStream();
}}