(feat): add deaf & mute button
(feat): add ping graph (via recharts) (feat): remove old expand button
This commit is contained in:
parent
246163486c
commit
d01df7c02c
6 changed files with 212 additions and 53 deletions
17
packages/call/src/components/buttons/deaf.tsx
Normal file
17
packages/call/src/components/buttons/deaf.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { Button } from "@tensamin/ui";
|
||||
import { useCall } from "../../context";
|
||||
import { HeadphoneOff, Headphones } from "lucide-react";
|
||||
|
||||
export default function DeafButton({ className }: { className?: string }) {
|
||||
const { toggleDeaf, deaf } = useCall();
|
||||
|
||||
return (
|
||||
<Button
|
||||
variant={deaf ? "destructive" : "default"}
|
||||
onClick={toggleDeaf}
|
||||
className={className}
|
||||
>
|
||||
{deaf ? <HeadphoneOff /> : <Headphones />}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
17
packages/call/src/components/buttons/mute.tsx
Normal file
17
packages/call/src/components/buttons/mute.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { Button } from "@tensamin/ui";
|
||||
import { useCall } from "../../context";
|
||||
import { Mic, MicOff } from "lucide-react";
|
||||
|
||||
export default function MuteButton({ className }: { className?: string }) {
|
||||
const { room } = useCall();
|
||||
const micEnabled = room.localParticipant.isMicrophoneEnabled;
|
||||
|
||||
return (
|
||||
<Button
|
||||
variant={micEnabled ? "default" : "destructive"}
|
||||
className={className}
|
||||
>
|
||||
{micEnabled ? <Mic /> : <MicOff />}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue