added last talking info to Audio Pannel

This commit is contained in:
PxlLoewe
2025-05-21 15:20:04 -07:00
parent c2799fbb49
commit f22335b1bf
6 changed files with 82 additions and 16 deletions

View File

@@ -39,9 +39,12 @@ export const Audio = () => {
useEffect(() => {
setShowSource(true);
setTimeout(() => {
const timeout = setTimeout(() => {
setShowSource(false);
}, 2000);
}, 6000);
return () => {
clearTimeout(timeout);
};
}, [source, isTalking]);
useEffect(() => {
const joinRoom = async () => {
@@ -65,7 +68,7 @@ export const Audio = () => {
<div className="h-4 flex items-center">{message}</div>
)}
{showSource && source && (
<div className="h-4 flex items-center">{source}</div>
<div className="h-4 flex items-center ml-2">{source}</div>
)}
<button
onClick={() => {