channels
This commit is contained in:
@@ -10,7 +10,7 @@ export interface SyncedPreferences {
|
||||
export const usePreferences = createGlobalState(() => {
|
||||
const { videoInputs, audioInputs, audioOutputs } = useDevices()
|
||||
|
||||
const synced = ref(false)
|
||||
const fetched = ref(false)
|
||||
|
||||
const inputDeviceId = useLocalStorage<MediaDeviceInfo['deviceId']>('INPUT_DEVICE_ID', 'default')
|
||||
const outputDeviceId = useLocalStorage<MediaDeviceInfo['deviceId']>('OUTPUT_DEVICE_ID', 'default')
|
||||
@@ -53,7 +53,7 @@ export const usePreferences = createGlobalState(() => {
|
||||
)
|
||||
|
||||
return {
|
||||
synced,
|
||||
fetched,
|
||||
inputDeviceId,
|
||||
outputDeviceId,
|
||||
autoGainControl,
|
||||
|
||||
@@ -7,9 +7,9 @@ export default defineNuxtRouteMiddleware(async () => {
|
||||
if (!me.value)
|
||||
return
|
||||
|
||||
const { synced, toggleInputHotkey, toggleOutputHotkey } = usePreferences()
|
||||
const { fetched, toggleInputHotkey, toggleOutputHotkey } = usePreferences()
|
||||
|
||||
if (synced.value)
|
||||
if (fetched.value)
|
||||
return
|
||||
|
||||
try {
|
||||
@@ -20,7 +20,7 @@ export default defineNuxtRouteMiddleware(async () => {
|
||||
|
||||
toggleInputHotkey.value = preferences.toggleInputHotkey ?? toggleInputHotkey.value
|
||||
toggleOutputHotkey.value = preferences.toggleOutputHotkey ?? toggleOutputHotkey.value
|
||||
synced.value = true
|
||||
fetched.value = true
|
||||
}
|
||||
catch {}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user