From 683ce25cf2253f35f9db87452f8eb5d9cd458f81 Mon Sep 17 00:00:00 2001 From: tsukumi Date: Wed, 4 Dec 2024 02:59:40 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E9=9F=B3=E5=A3=B0=E3=81=AE=E5=86=8D?= =?UTF-8?q?=E7=94=9F=E3=83=87=E3=83=90=E3=82=A4=E3=82=B9=E3=82=92=E9=81=B8?= =?UTF-8?q?=E6=8A=9E=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=8F=E3=81=AA=E3=81=A3?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=9F=E3=83=AA=E3=82=B0=E3=83=AC=E3=83=83?= =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dialog/SettingDialog/SettingDialog.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/Dialog/SettingDialog/SettingDialog.vue b/src/components/Dialog/SettingDialog/SettingDialog.vue index d5b76b65..2f3723ec 100644 --- a/src/components/Dialog/SettingDialog/SettingDialog.vue +++ b/src/components/Dialog/SettingDialog/SettingDialog.vue @@ -679,7 +679,13 @@ const [ const canSetAudioOutputDevice = computed(() => { return !!HTMLAudioElement.prototype.setSinkId; }); -const currentAudioOutputDeviceComputed = computed({ +const currentAudioOutputDeviceComputed = computed< + | { + key: string; + label: string; + } + | undefined +>({ get: () => { // 再生デバイスが見つからなかったらデフォルト値に戻す // FIXME: watchなどにしてgetter内で操作しないようにする @@ -687,7 +693,7 @@ const currentAudioOutputDeviceComputed = computed({ (device) => device.key === store.state.savingSetting.audioOutputDevice, ); if (device) { - return device.key; + return device; } else if (store.state.savingSetting.audioOutputDevice !== "default") { handleSavingSettingChange("audioOutputDevice", "default"); } @@ -695,7 +701,7 @@ const currentAudioOutputDeviceComputed = computed({ }, set: (device) => { if (device) { - handleSavingSettingChange("audioOutputDevice", device); + handleSavingSettingChange("audioOutputDevice", device.key); } }, });