Take a piece
The voice engine
@gryt/voice is the calling half of Gryt with nothing else attached — signalling, ICE, tracks and audio behind a set of React hooks. It talks to a Gryt SFU, and that is the only Gryt piece it needs.
import { SFUConnectionState, useSFU } from "@gryt/voice";
function JoinButton({ channelId }: { channelId: string }) {
const { connect, disconnect, connectionState } = useSFU();
if (connectionState === SFUConnectionState.CONNECTED) {
return <button onClick={() => disconnect()}>Leave</button>;
}
return <button onClick={() => connect(channelId)}>Join</button>;
}Two things have to be true above that, and both fail quietly. <VoiceSingletonHooks /> has to be mounted, or every singleton hook just hands back its starting value while the app builds and launches like normal. And Vite has to leave the package alone with optimizeDeps.exclude, or the RNNoise worker looks for itself somewhere it isn’t and you ship without noise suppression.
The package is AGPL. It only makes sense pointed at a Gryt SFU anyway, so the licence is not the thing standing between you and using it — the SFU is a separate Go service and you would be running one.