test publish
Some checks failed
Deploy / deploy (push) Has been cancelled
Deploy / publish-web (push) Successful in 1m43s
Deploy / publish-tauri (push) Has been cancelled

This commit is contained in:
2025-12-22 19:23:06 +06:00
parent e3d0106d8f
commit 76f0ec74b5
27 changed files with 2123 additions and 1344 deletions

View File

@@ -1,4 +1,6 @@
import { createGlobalState } from '@vueuse/core'
import { getVersion } from '@tauri-apps/api/app'
import { computedAsync, createGlobalState } from '@vueuse/core'
import { useClients } from '~/composables/use-clients'
export const useApp = createGlobalState(() => {
@@ -11,6 +13,10 @@ export const useApp = createGlobalState(() => {
const previousInputMuted = ref(inputMuted.value)
const isTauri = computed(() => '__TAURI_INTERNALS__' in window)
const version = computedAsync(() => isTauri.value ? getVersion() : 'web', '-')
function muteInput() {
inputMuted.value = true
}
@@ -43,13 +49,13 @@ export const useApp = createGlobalState(() => {
watch(inputMuted, async (inputMuted) => {
if (inputMuted) {
await mediasoup.muteMic()
await mediasoup.pauseProducer('microphone')
}
else {
if (outputMuted.value) {
outputMuted.value = false
}
await mediasoup.unmuteMic()
await mediasoup.resumeProducer('microphone')
}
const toastText = inputMuted ? 'Microphone muted' : 'Microphone activated'
@@ -79,5 +85,7 @@ export const useApp = createGlobalState(() => {
muteOutput,
unmuteOutput,
toggleOutput,
version,
isTauri,
}
})