This commit is contained in:
@@ -6,6 +6,7 @@ import { useClients } from '~/composables/use-clients'
|
||||
export const useApp = createGlobalState(() => {
|
||||
const { clients } = useClients()
|
||||
const mediasoup = useMediasoup()
|
||||
const signaling = useSignaling()
|
||||
const toast = useToast()
|
||||
|
||||
const ready = ref(false)
|
||||
@@ -36,7 +37,7 @@ export const useApp = createGlobalState(() => {
|
||||
toast.add({ severity: 'info', summary: toastText, closable: false, life: 1000 })
|
||||
})
|
||||
|
||||
watch(outputMuted, (outputMuted) => {
|
||||
watch(outputMuted, async (outputMuted) => {
|
||||
if (outputMuted) {
|
||||
previousInputMuted.value = inputMuted.value
|
||||
muteInput()
|
||||
@@ -45,6 +46,10 @@ export const useApp = createGlobalState(() => {
|
||||
inputMuted.value = previousInputMuted.value
|
||||
}
|
||||
|
||||
const updatedMe = await signaling.socket.value?.emitWithAck('updateClient', {
|
||||
outputMuted,
|
||||
})
|
||||
|
||||
const toastText = outputMuted ? 'Sound muted' : 'Sound resumed'
|
||||
toast.add({ severity: 'info', summary: toastText, closable: false, life: 1000 })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user