import "@styles/Viewer.scss"; import useTSRemoteApp, { IClient } from "react-ts5-remote-app-api"; export default function Viewer({ remoteAppPort = 5899, showChannelName = false, hideNonTalking = false, clientLimit = 0, }: { remoteAppPort?: number; showChannelName?: boolean; hideNonTalking?: boolean; clientLimit?: number; }) { const { clients, activeConnectionId, currentChannel } = useTSRemoteApp({ remoteAppPort: remoteAppPort, auth: { identifier: "de.tealfire.obs", version: "2.0.3", name: "TS5 OBS Overlay", description: "A OBS overlay for TS5 by DerTyp7", }, logging: true, }); const currentClients = clients.map((client) => { if (client.channel?.id === currentChannel?.id && client.channel.connection.id === activeConnectionId) { return client; } }) as IClient[]; return (
{client.properties.nickname}