@huddle01/react
Version:
The Huddle01 React SDK offers a comprehensive suite of hooks, methods and event listeners that allow for seamless real-time audio and video communication with minimal coding required.
22 lines (19 loc) • 680 B
TypeScript
import { VolatileDataMessage } from '@huddle01/web-core/types';
declare const useDataMessage: (props?: {
onMessage?: (payload: string, from: string, label?: string) => void;
onVolatileMesssage?: (data: VolatileDataMessage) => void;
}) => {
sendData: (data: Parameters<(data: {
to: string[] | "*";
payload: string;
label?: string;
}) => Promise<{
success: boolean;
error?: string;
}>>[0]) => Promise<{
success: boolean;
error?: string;
}>;
sendVolatileData: (data: Parameters<(data: Omit<VolatileDataMessage, "to" | "from">) => Promise<void>>[0]) => Promise<void>;
};
export { useDataMessage };