This commit is contained in:
MythEclipse
2026-06-13 23:58:29 +07:00
parent 9a896c7993
commit f22201381f
4 changed files with 26 additions and 5 deletions
@@ -41,9 +41,20 @@ function sendWsCommand(
return false;
}
export function useAudioTransmit(socketRef: {
readonly current: WebSocket | null;
}) {
export function useAudioTransmit(
socketRef: {
readonly current: WebSocket | null;
},
): {
isStreaming: boolean;
micError: string | null;
micLevel: number;
toggle: () => Promise<void>;
stopTransmit: () => void;
startTransmit: () => Promise<void>;
stop: () => void;
start: () => Promise<void>;
} {
const [isStreaming, setIsStreaming] = useState(false);
const [micError, setMicError] = useState<string | null>(null);
const [micLevel, setMicLevel] = useState(0);