diff --git a/apps/dispatch-server/socket-events/connect-desktop.ts b/apps/dispatch-server/socket-events/connect-desktop.ts index 9cddd34e..a6d1ce3f 100644 --- a/apps/dispatch-server/socket-events/connect-desktop.ts +++ b/apps/dispatch-server/socket-events/connect-desktop.ts @@ -38,7 +38,7 @@ export const handleConnectDesktop = (socket: Socket, io: Server) => () => { : user.publicId, }; if (data.shouldTransmit) { - socket.to("pilots").emit("other-ptt", otherPttData); + socket.to("dispatchers").emit("other-ptt", otherPttData); socket.to("pilots").emit("other-ptt", otherPttData); } }); diff --git a/apps/dispatch/app/_components/Audio.tsx b/apps/dispatch/app/_components/Audio.tsx index c19300f4..c765ed56 100644 --- a/apps/dispatch/app/_components/Audio.tsx +++ b/apps/dispatch/app/_components/Audio.tsx @@ -1,6 +1,6 @@ "use client"; -import { useEffect, useRef, useState } from "react"; +import { useEffect, useState } from "react"; import { usePilotConnectionStore } from "_store/pilot/connectionStore"; import { Disc, @@ -18,12 +18,10 @@ import { useAudioStore } from "_store/audioStore"; import { cn } from "helpers/cn"; import { ConnectionQuality } from "livekit-client"; import { ROOMS } from "_data/livekitRooms"; -import { useSession } from "next-auth/react"; export const Audio = () => { const connection = usePilotConnectionStore(); const [showSource, setShowSource] = useState(false); - const serverSession = useSession(); const { isTalking, @@ -41,12 +39,6 @@ export const Audio = () => { useEffect(() => { setShowSource(true); - const timeout = setTimeout(() => { - setShowSource(false); - }, 6000); - return () => { - clearTimeout(timeout); - }; }, [source, isTalking]); useEffect(() => { @@ -68,7 +60,19 @@ export const Audio = () => { <>
{state === "error" &&
{message}
} - {showSource && source &&
{source}
} + {showSource && source && ( +
+ +
+ )}