diff --git a/client/app/composables/use-mediasoup.ts b/client/app/composables/use-mediasoup.ts index e44935e..84bba54 100644 --- a/client/app/composables/use-mediasoup.ts +++ b/client/app/composables/use-mediasoup.ts @@ -32,7 +32,7 @@ export const useMediasoup = createSharedComposable(() => { const sfx = useSfx() const signaling = useSignaling() - const { addClient, removeClient } = useClients() + const { addClient, removeClient, me } = useClients() const preferences = usePreferences() const { getShareStream } = useDevices() @@ -170,6 +170,9 @@ export const useMediasoup = createSharedComposable(() => { addClient(...joinedClients) + if (me.value) + sfx.playRandomConnectionSound(me.value.socketId).then() + toast.add({ severity: 'success', summary: 'Joined', closable: false, life: 1000 }) await enableMic() diff --git a/client/app/composables/use-sfx.ts b/client/app/composables/use-sfx.ts index 84b11ec..a50083c 100644 --- a/client/app/composables/use-sfx.ts +++ b/client/app/composables/use-sfx.ts @@ -74,7 +74,7 @@ export const useSfx = createSharedComposable(() => { async function playRandomConnectionSound(seed: string) { await playEvent('stream-on') - await play(CONNECTION_SOUNDS[hashStringToNumber(seed, CONNECTION_SOUNDS.length + 1)]!, 0.1) + await play(CONNECTION_SOUNDS[hashStringToNumber(seed, CONNECTION_SOUNDS.length)]!, 0.1) } return { diff --git a/client/src-tauri/tauri.conf.json b/client/src-tauri/tauri.conf.json index ad03721..81f07d7 100644 --- a/client/src-tauri/tauri.conf.json +++ b/client/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "Chad", - "version": "0.2.32", + "version": "0.2.33", "identifier": "xyz.koptilnya.chad", "build": { "frontendDist": "../.output/public",