import React from "react"; import { useModalTriggerState } from "../Modal"; import { SettingsModal } from "../settings/SettingsModal"; import { InviteModal } from "./InviteModal"; import { Button, HangupButton, InviteButton, SettingsButton } from "../button"; import { Header, LeftNav, RightNav, RoomSetupHeaderInfo } from "../Header"; import { ReactComponent as AddUserIcon } from "../icons/AddUser.svg"; import { ReactComponent as SettingsIcon } from "../icons/Settings.svg"; import styles from "./PTTCallView.module.css"; import { Facepile } from "../Facepile"; import { PTTButton } from "./PTTButton"; import { PTTFeed } from "./PTTFeed"; import { useMediaHandler } from "../settings/useMediaHandler"; import useMeasure from "react-use-measure"; import { ResizeObserver } from "@juggle/resize-observer"; export function PTTCallView({ groupCall, participants, client, roomName, microphoneMuted, toggleMicrophoneMuted, userMediaFeeds, activeSpeaker, onLeave, setShowInspector, showInspector, roomId, }) { const { modalState: inviteModalState, modalProps: inviteModalProps } = useModalTriggerState(); const { modalState: settingsModalState, modalProps: settingsModalProps } = useModalTriggerState(); const { audioOutput } = useMediaHandler(); const [containerRef, bounds] = useMeasure({ polyfill: ResizeObserver }); const facepileSize = bounds.width < 800 ? "sm" : "md"; return (
{`${participants.length} ${ participants.length > 1 ? "people" : "person" } connected`}
00:01:24
Press and hold spacebar to talk
{userMediaFeeds.map((callFeed) => (